Course introduction

 AI-102- Designing and implementing a Microsoft Azure AI solution

Azure Cognitive Services, Azure Cognitive Search and Microsoft Bot Framework


his course is designed to be delivered over four days, and includes the following modules:

  • Module 1: Introduction to AI on Azure

  • Module 2: Developing AI Apps with Cognitive Services

  • Module 3: Getting Started with Natural Language Processing

  • Module 4: Building Speech-Enabled Applications

  • Module 5: Creating Language Understanding Solutions

  • Module 6: Building a QnA Solution

  • Module 7: Conversational AI and the Azure Bot Service

  • Module 8: Getting Started with Computer Vision

  • Module 9: Developing Custom Vision Solutions

  • Module 10: Detecting, Analyzing, and Recognizing Faces

  • Module 11: Reading Text in Images and Documents

  • Module 12: Creating a Knowledge Mining Solution



What is Artificial Intelligence
There can be many definitions for artificial intelligence - some philosophical some technical, but in software terms if we talk about AI is a software that exhibits one or more human like capabilities like:-

1. Visual Perception- The ability to use computer vision capabilities to accept,  interpret, and process input from images, video streams and live cameras.  

2. Text Analysis- The ability to use Natural Language Processing to not only read but also extract semantic meaning from text based data. 

3. Speech- The ability to recognize speech as input and synthesize spoken output. The combination of speech capabilities along with the ability of apply NLP analysis of text enables a form of human-compute interaction that's become known as conversational AI, in which users can interact with AI agents (called as bots) in much the same way they would with other human.

4. Decision Making - The ability to use past experiences and learned correlations to assess situations and take appropriate actions. Eg recognizing anomalies in sensor readings and taking automated action to prevent failure or system damage. 


Data Science, Machine Learning, and AI

There are several related terms that people use when talking about artificial intelligence, so it's useful to have clear definitions for each.

Data science

Data science is a discipline that focuses on the processing and analysis of data; applying statistical techniques to uncover and visualize relationships and patterns in the data, and defining experimental models that help explore those patterns.

For example, a data scientist might gather samples of data about the population of an endangered species in a geographical area, and combine it with data about levels of industrialization and economic demographics in the same area. The data can then be analyzed, using statistical techniques to extrapolate from the samples to understand trends and relationships between human activities and wildlife, and test hypotheses using models that show the likely impact of human activity on the wildlife population. By doing so, the data scientists may help determine optimal policies that balance the need for economic wellbeing for the human population with the need for conservation of the endangered wildlife.

Machine learning

Machine learning is a subset of data science that deals with the training and validation of predictive models. Typically, a data scientists prepares the data and then uses it to train a model based on an algorithm that exploits the relationships between the features in the data to predict values for unknown labels.

For example, a data scientist might use the data they have collected to train a model that predicts the annual growth or decline in population of a species based on factors such as the number of nesting sites observed, the area of land designated as protected, the human population in the local area, the daily volume of traffic on local roads, and so on. This predictive model can then be used as a tool to evaluate plans for housing, infrastructure, and industrial development in the local area and assess their likely impact on the local wildlife.

Artificial intelligence

Artificial intelligence usually (but not always) builds on machine learning to create software that emulates one or more characteristics of human intelligence.

For example, balancing the need for wildlife conservation against economic development requires accurate monitoring of the population of the endangered species being protected. It may not be feasible to rely on human experts who can positively identify the animal in question, or to monitor a large area over a sufficient period of time to get an accurate count. Indeed, the presence of human observers may deter animals and prevent their detection. In this case, a predictive model could be trained to analyze image data taken by motion-activated cameras in remote locations, and predict whether a photograph contains a sighting of the animal. The model could then be used in a software application that responds to automated identification of animals to track animal sightings across a large geographical area, identifying areas with dense animal populations that may be candidates for protected status.


Model training and inferencing

Many AI systems rely on predictive models that must be trained using sample data. The training process analyzes the data and determines relationships between the features in the data (the data values that will generally be present in new observations) and the label (the value that the model is being trained to predict).

After the model has been trained, you can submit new data that includes known feature values and have the model predict the most likely label. Using the model to make predictions is generally referred to as inferencing.

Many of the services and frameworks that software engineers can use to build AI-enabled solutions require a development process that involves training a model from existing data before it can be used to inference new values in an application.


Probability and confidence scores

A well-trained machine learning model can be extremely accurate, but no predictive model is infallible. The predictions made by machine learning models are based on probability, and while software engineers don't require a deep mathematical understanding of probability theory, it's important to understand that predictions reflect statistical likelihood, not absolute truth. In most cases, predictions have an associated confidence score that reflects the probability on which the prediction is being made. Software developers should make use of confidence score values to evaluate predictions and apply appropriate thresholds to optimize application reliability and mitigate the risk of predictions that may be made based on marginal probabilities.


Responsible AI and ethics

It's important for software engineers to consider the impact of their software on users, and society in general; including ethical considerations about its use. When the application is imbued with artificial intelligence, these considerations are particularly important due to the nature of how AI systems work and inform decisions; often based on probabilistic models, which are in turn dependent on the data with which they were trained.

The human-like nature of AI solutions is a significant benefit in making applications user-friendly, but it can also lead users to place a great deal of trust in the application's ability to make correct decisions. The potential for harm to individuals or groups through incorrect predictions or misuse of AI capabilities is a major concern, and software engineers building AI-enabled solutions should apply due consideration to mitigate risks and ensure fairness, reliability, and adequate protection from harm or discrimination.


Considerations for Responsible AI

The previous topic introduced the need for considerations for responsible and ethical development of AI-enabled software. In this topic, we'll discuss some core principles for responsible AI that have been adopted at Microsoft.

Fairness

AI systems should treat all people fairly. For example, suppose you create a machine learning model to support a loan approval application for a bank. The model should make predictions of whether or not the loan should be approved without incorporating any bias based on gender, ethnicity, or other factors that might result in an unfair advantage or disadvantage to specific groups of applicants.

Fairness of machine learned systems is a highly active area of ongoing research, and some software solutions exist for evaluating, quantifying, and mitigating unfairness in machine learned models. However, tooling alone is not sufficient to ensure fairness. You must consider fairness from the beginning of the application development process; carefully reviewing training data to ensure it is representative of all potentially affected subjects, and evaluating predictive performance for subsections of your user population throughout the development lifecycle.

Reliability and safety

AI systems should perform reliably and safely. For example, consider an AI-based software system for an autonomous vehicle; or a machine learning model that diagnoses patient symptoms and recommends prescriptions. Unreliability in these kinds of system can result in substantial risk to human life.

As with any software, AI-based software application development must be subjected to rigorous testing and deployment management processes to ensure that they work as expected before release. Additionally, software engineers need to take into account the probabilistic nature of machine learning models, and apply appropriate thresholds when evaluating confidence scores for predictions.

Privacy and security

AI systems should be secure and respect privacy. The machine learning models on which AI systems are based rely on large volumes of data, which may contain personal details that must be kept private. Even after models are trained and the system is in production, they use new data to make predictions or take action that may be subject to privacy or security concerns; so appropriate safeguards to protect data and personally identifiable information must be implemented.

Inclusiveness

AI systems should empower everyone and engage people. AI should bring benefits to all parts of society, regardless of physical ability, gender, sexual orientation, ethnicity, or other factors.

One way to optimize for inclusiveness is to ensure that the design, development, and testing of your application includes input from as diverse a group of people as possible.

Transparency

AI systems should be understandable. Users should be made fully aware of the purpose of the system, how it works, and what limitations may be expected.

For example, when an AI system is based on a machine learning model, you should generally make users aware of factors that may affect the accuracy of its predictions, such as the number of cases used to train the model, or the specific features that have the most influence over its predictions. You should also share information about the confidence score for predictions.

When an AI application relies on personal data, such as a facial recognition system that takes images of people to recognize them; you should make it clear to the user how their data is used and retained, and who has access to it.

Accountability

People should be accountable for AI systems. Although many AI systems seem to operate autonomously, ultimately it is the responsibility of the developers who trained and validated the models they use, and defined the logic that bases decisions on model predictions to ensure that the overall system meets responsibility requirements. To help meet this goal, designers and developers of AI-based solution should work within a framework of governance and organizational principles that ensure the solution meets ethical and legal standards that are clearly defined.


Azure Machine Learning

Microsoft Azure provides the Azure Machine Learning service - a cloud-based platform for creating, managing, and publishing machine learning models. Azure Machine Learning provides the following features and capabilities:

Feature

Capability

Automated machine learning

This feature enables non-experts to quickly create an effective machine learning model from data.

Azure Machine Learning designer

A graphical interface enabling no-code development of machine learning solutions.

Data and compute management

Cloud-based data storage and compute resources that professional data scientists can use to run data experiment code at scale.

Pipelines

Data scientists, software engineers, and IT operations professionals can define pipelines to orchestrate model training, deployment, and management tasks.

Data scientists can use Azure Machine Learning throughout the entire machine learning lifecycle to:

  • Ingest and prepare data.

  • Run experiments to explore data and train predictive models.

  • Deploy and manage trained models as web services.

Software engineers may interact with Azure Machine Learning in the following ways:

  • Using Automated Machine Learning or Azure Machine Learning designer to train machine learning models and deploy them as REST services that can be integrated into AI-enabled applications.

  • Collaborating with data scientists to deploy models based on common frameworks su

  • ch as Scikit-Learn, PyTorch, and TensorFlow as web services, and consume them in applications.

  • Using Azure Machine Learning SDKs or command line interface (CLI) scripts to orchestrate DevOps processes that manage versioning, deployment, and testing of machine learning models as part of an overall application delivery solution.

Azure Cognitive Services

Azure Cognitive Services are cloud-based services that encapsulate AI capabilities. Rather than a single product, you should think of Azure Cognitive Services as a set of individual services that you can use as building blocks to compose sophisticated, intelligent applications.

Cognitive services offer a wide range of prebuilt AI capabilities across multiple categories, as shown in the following table.

Language

Speech

Vision

Decision

Text Analytics

Speech to Text

Computer Vision

Anomaly Detector

Translator

Text to Speech

Video Indexer

Content Moderator

QnA Maker

Speech Translation

Custom Vision

Personalizer

Language Understanding

Speaker Recognition

Face

We will explore many of these cognitive services in the remainder of this course.

Further Reading: For more information about Azure Cognitive Services, see the Azure Cognitive Services web page.

Applied AI Services

You can use Cognitive Services to build your own AI solutions, and they also underpin Azure Applied AI Services that provide out-of-the-box solutions for common AI scenarios. Applied AI Services include:

  • Azure Form Recognizer - an optical character recognition (OCR) solution that can extract semantic meaning from forms, such as invoices, receipts, and others.

  • Azure Metrics Advisor - A service built on the Anomaly Detector cognitive service that simplifies real-time monitoring and response to critical metrics.

  • Azure Video Analyzer - A comprehensive video analysts solution build on the Video Indexer cognitive service.

  • Azure Immersive Reader - A reading solution that supports people of all ages and abilities.

  • Azure Bot Service - A cloud service for delivering conversational AI solutions, or bots.

  • Azure Cognitive Search - A cloud-scale search solution that uses cognitive services to extract insights from data and documents.

Azure Bot Service

Bots are AI-powered software agents that can engage in conversational interactions. For example, a web site may include a chat bot interface in which users can submit questions using natural language and receive conversational responses, or an organization might use a bot to answer incoming phone calls and gather initial information before forwarding the call to the appropriate operator.

The Azure Bot Service is an Applied AI service for developing and delivering bot solutions that support conversational interactions across multiple channels, such as web chat, email, Microsoft Teams, and others.

You will explore bots and the Azure Bot Service in more detail later in this course.


Azure Cognitive Search

Searching for information is a common requirement in many applications, from dedicated search engine web sites to mobile apps that can find context-appropriate information based on where you are and what you want to accomplish.

Azure Cognitive Search is an Applied AI Service that enables you to ingest and index data from a variety of sources, and search the index to find, filter, and sort information extracted from the source data.

In addition to basic text-based indexing, Azure Cognitive Search enables you to define an enrichment pipeline that uses AI skills to enhance the index with insights derived from the source data - for example, by using computer vision and natural language processing capabilities to generate descriptions of images, extract text from scanned documents, and determine key phrases in large documents that encapsulate their key points.

Not only does this AI enrichment produce a more useful search experience, the insights extracted by your enrichment pipeline can be persisted in a knowledge store for further analysis or integration into a data pipeline for a business intelligence solution.

You will explore Azure Cognitive Search later in this course.

Comments

Popular posts from this blog

Module6: QnA Maker and Module7: Conversational AI and Azure Bot service