Last-minute reading for Azure AI Solution Certification

Vijay Borkar (VBCloudboy)
11 min readMar 17, 2021

[Q] Why we should know Artificial Intelligence (AI) and its services?

Artificial Intelligence (AI) empowers amazing new solutions and experiences and with AI we can build solutions that can enable an transformation and advancement in health care, financial management, environmental protection, and other areas to make a better world for everyone.Artificial Intelligence enables the creation of powerful solutions to many kinds of problems. AI systems can exhibit human characteristics to analyze the world around them, make predictions or inferences, and act on them in ways that we could only imagine a short time ago.With this power, comes responsibility. As developers of AI solutions, we must apply principles that ensure that everyone benefits from AI without disadvantaging any individual or section of society.

[Q] What is AI?

AI you can memorize as "MACNC" like an abbrevation McKinsey where each word stands as;
- M: Machine learning
- A: Anomaly detection
- C: Computer vision
- N: Natural language processing
- C: Conversational AI

[Q] In an Ideal scenario how machine learning works?

Step-1: Collect all the data (structure, un-structured & semi-structured)
Step-2: Data scientists use all of that data to train machine learning models
Step-3: Now that ML-model can make predicitions based on the inferences based on the relationships they find in the data.
Step-4: Data scientists will keep optimizing the model to sharpen the outputs.

[Q] Does Microsoft Azure offer a Machine Learning platform?

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

[Q] What are the features and capabilities of Azure Machine Learning Service?

- 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: Professionals can define pipelines to orchestrate model training, deployment, and management tasks.

[Q] Does Microsoft Azure offer an Anomaly detection service?

In Microsoft Azure, the Anomaly Detector service provides an application programming interface (API) that developers can use to create anomaly detection solutions.

[Q] Does Microsoft Azure offer any visual processing service?

Computer Vision is an area of AI that deals with visual processing, It also provides few cognitive services to help us create computer vision solutions like;
- Computer Vision: This service is used to analyze images and video, and extract descriptions, tags, objects, and text.
- Custom Vision: This service is used to train custom image classification and object detection models using your own images.
- Face: The Face service enables you to build face detection and facial recognition solutions.
- Form Recognizer: This service used to extract information from scanned forms and invoices.

[Q] Does Microsoft Azure offer any service which understands written and spoken language?

Natural language processing (NLP) is the area of AI that deals with creating software that understands written and spoken language.NLP allow us to create software applications which can;
- Analyze and interpret text in documents, email messages, and other sources.
- Interpret spoken language, and synthesize speech responses.
Automatically translate spoken or written phrases between languages.
- Interpret commands and determine appropriate actions.
- Automatically translate spoken or written phrases between languages.

[Q] Which cognitive services we can leverage on cognitive to build natural language processing solutions?

- Text Analytics service: This service is used to analyze text documents and extract key phrases, detect entities (such as places, dates, and people), and evaluate sentiment (how positive or negative a document is).
- Translator Text service: This service is used to translate text between more than 60 languages.
- Speech service: This service is used to recognize and synthesize speech, and to translate spoken languages.
- Language Understanding Intelligent Service (LUIS): This service is used to train a language model that can understand spoken or text-based commands.

[Q] Which Azure Cognitive services we can rely on to create conversational AI solutions?

- QnA Maker Service: This cognitive service enables us to quickly build a knowledge base of questions and answers that can form the basis of a dialog between a human and an AI agent.
- Azure Bot Service: This service provides a platform for creating, publishing, and managing bots. Developers can use the Bot Framework to create a bot and manage it with Azure Bot Service - integrating back-end services like QnA Maker and LUIS, and connecting to channels for web chat, email, Microsoft Teams, and others.

[Q] Explain Responsible AI

Artificial Intelligence is a powerful tool that can be used to greatly benefit the world. However, like any tool, it must be used responsibly. At Microsoft, AI software development is guided by a set of six principles, designed to ensure that AI applications provide amazing solutions to difficult problems without any unintended negative consequences.1. Fairness: AI systems should treat all people fairly.
2. Reliability and safety: AI systems should perform reliably and safely.
3. Privacy and security: AI systems should be secure and respect privacy.
4. Inclusiveness: AI systems should empower everyone and engage people.
5. Transparency: AI systems should be understandable.
6. Accountability: People should be accountable for AI systems.
The principles of responsible AI can help us to understand some of the challenges facing by developers as they try to create ethical AI solutions. It's easy to read about the principles, or watch a video; but it's much harder to put the principles into practice.

[Q] How storage works in Neural Network?

1. Short term storage is used for data Ingestion and filtering
2. Medium term storage is used for data processing
3. Long term storage for retrieval of enriched data
4. Archival storage for long-term data retention

[Q] What are the Storage options for azure AI solutions?

Azure Blob Storage
- Suitable as a massive unstructured data store
- Designed to scale from 500 TiB to 2 PiB per account
- Multiple levels of redundancy across zones and geo regions
- Supports multiple tiers to support "hot", "cool" and "archive" storage
- Forms the foundation of big data store with Azure Data Lake Gen2
Azure Application Insights
- Application performance monitoring service
- Suitable for storing application logs and telemetry
- Not designed as store for non-application-specific data
Azure SQL Server
- Suitable for structured, relational data
- Avaialable as full PaaS, managed IaaS and traditional VMs
- Azure SQL Hyperscale enables databases upto 100TB
- Active geo-replication for secondary read-only replicas
Azure Cosmos DB
- NoSQL database suitable for unstructured and semi-structured data
- Supports multiple data models but requires no schema
- Designed for massive scale, global replication and low latency access
- Accessible via a range of database APIs(e.g. SQL, Cassandra, Mongo)

[Q] How we can choose the right storage services for AI solutions?

By Understanding Data types the data can be classified as;
1. Structured
- Adheres to a pre-defined data model with a tabular format and relationships
2. Unstructured
- Not organized in a pre-defined manner and comes in different formats.
3. Semi-Structured
- Has a self-describing, non-formal structure for reduced complexity

[Q] What’s the role of processing in Azure AI solutions?

1. It represents the "intelligence" component of AI solution
2. Powered by a machine Learning model trained using data
3. Models can be pre-trained services or custom solutions.

[Q] What are the primary options available for enabling AI capabilities in our solutions running on Microsoft Azure?

1. Microsoft Azure Congnitive Services
- Pre-trained models categorised by different areas of capability
- Designed to aid the development of intelligent applications
- Does not require the developer to be a data scientist
- Cognitive services are available as Decision, Language, Search and Vision services.
- Accessible via a service-specific REST API or SDK
- Most services require no training data, or we can supply our own data
2. Microsoft Azure Machine Learning
- Services which enable us to build, train and deploy our own models
- Service-driven platform for the creation of custom ML models.
- Combines data, notebooks and compute to build and train models.
- Supports MLOps to manage models throughout their lifecycle.
- ML pipelines enable all processing steps to be templated and repeatable.
- Enables automated ML to constantly iterate and rank models.

[Q] Why there is a need to Process Data?

1. The quality of data directly impacts the model's ability to be trained.
2. No data source is completely clean or "machine learning ready"
3. Data science techniques are applied to clean and ready the data
4. Original data source is left untouced, models trained on clean data.

[Q] What is the use of Azure Data Factory in AI data processing?

1. Its an ETL/ELT managed service
2. Extracts data from cloud and on-premises sources
3. Transformation with data flows(Databricks)
4. Transformation on external compute targets
5. Loads to a range of connected storage targets
6. Data pipelines enable templates and orchestration

[Q] What is the use of Azure Databricks in AI data processing?

1. Build on Apache spark, fully managed azure platform
2. Focus on data Preparation and collaboration
3. Leverages notebooks for data transformation and processing
4. Integrates with Azure Data Factory for orchestration

[Q] Quick overview on a Machine learning Model

1. Its a mathematical description of real-world data or process
2. Algorithms are the model's "language" which helps to decribe the data.
3. Algorithms need data to train against the learning model.
4. A trained model can make predictions against new data.

[Q] Compare Machine Learning Versus Deep Learning

Machine Learning                
- Machine improves through experience
- Algorithm needs to be told how to predict
- Can predict with small datasets
- Does not require high-end hardware
- Requires features to be identified
- Relatively short execution time
- Output is typically a numerically value
Deep Learning
- Machine trains itself to perform a task
- Algorithm learns how to predict by itself
- Requires large datasets to predict
- Requires high-end hardware(with GPUs)
- Can Identify features from raw data
- Relatively long execution time
- Supports a wide rinage of outputs.

[Q] What is a Machine Learning Framework?

Machine learning framework is an interface or toolset to enable for rapid building of ML models. Its optimized to perform well on different different platforms and with it's user-friendly and integration with pre-existing developer tools we can containerized for process isolation and portability. The framework is designed to reduce complexity and not require us to be a data scientist.

[Q] List a few of the open-source frameworks in Azure ML services

scikit-learn: ML framework for python, built on NumPy & SciPy
TensorFlow: DNN framework created by google with pipeline visuals
PyTorch: DNN framework created by facebook, written in python
Keras: High-level python API, runs on TensorFlow, faster delivery

[Q] What is Open Neural Network Exchange (ONNX)?

ONNX is designed to promote interchangebility and interoperability which helps us to train models using one framework and transfer to another for inference. ONNX also supports native ML frameworks and others using converters whereas ONNX runtime supports model deployment across multiple platforms. It also, support hardware from different vendors for optimized performance.

[Q] List the Cognitive Services?

Decision Service is designed to apply a decision matrix to user interface where;
(1) Content Moderator: Detect offensive or inappropriate content
(2) Personalizer: User-specific recommendations and interactions
Language Service is designed to interpret meaning from unstructured text input where;
(1) language understanding: Enable apps to understand what people say
(2) QnA Maker: Conversational interactivity from backend data
(3) Text Analytics: Detect sentiment and key phrases in text
(4) Translator Text: Translate text to and from multiple languages
Speech Service is designed to enable speech processing in applications where;
(1) Speech to Text: Transcribe speech in to indexable text
(2) Text to Speech: Convert text input to natural language speech
(3) Speech Translation: Real-time speech translation
Vision Service is desigend to identify content from visual inputs where;
(1) Compter vision: Analyse the content within images
(2) Custom vision: customised content recognition from images
(3) Face: Identity facial characteristics, age and emotion
(4) Video Indexer: Index the content from video and audio channels
Search Service is designed to online search functionality to applications where;
(1) Bing Autosuggest: Enables type-ahead capabilities in applications
(2) Bing Web Search: Incorporate search results from online sources
(3) Bing Entity Search: Recognise entities and return targeted search results
(4) Bing Spell Check: Identify spelling errors and suggest corrections

[Q] What are the options available for training a model?

- Build, train and deploy the model from scratch against our own data.
- Select an ML framework and train our data against pre-existing models.
- Use a pre-trained framework and model via a service (Cognitive Services)

[Q] How to decide whether to choose “Custom AI model” or “Built-in AI model”?

- Large dataset size but different from the model's dataset
--> Build, train and deploy our own model from scratch
- Large dataset size and similar to take the model's dataset
--> Train our data against existing models using a framework
- Small dataset size and different to the model's dataset
--> Train your data against existing models using a framework
- Small dataset size and similar to the model's dataset
--> Use a pre-trained framework and service-based model

[Q] What are the networking considerations for AI services

1. By default, Azure services communicate via public endpoints
2. Traversing public endpoints can increase network latency
3. Restricting access to virtual networks increases solution security
4. Some organizations require services to be private by default
5. By using service endpoints;
- Makes virtual networks visible to the azure resource provider.
- Enables service-level firewalls to restrict access to Vnet traffic
- Use NSGs to control outbound access to resource providers
- Service Tags reduce deployment complexity and operational overhead
- Access from on-premise uses NAT addresses

[Q] What are some challenges we face in traditional machine learning services?

1. The process for training a model requires multiple pre-requisites
2. Data needs cleaning via preprocessing for an algorithm to be effective.
3. Hyperparameters influence the algorithm's behaviour
4. Improving the model is iterative and can involve much guesswork
5. Training a model through multiple iterations can be costly
6. choosing an appropriate framework or model gets harder
7. Introducing handover phases between teams decreases agility
8. Driving model iteration using humans doesn't scale

[Q] How we can manage cognitive service account Keys?

Whenever we launch azure cognitive service It generates an endpoint and keys which can be embedded in Azure Key-vault or can be regenerate using azure CLI- az cognitiveservices account keys list: Manages azure cognitive services accounts- az cognitiveservices account key regenerate: Manage Azure Cognitive Services accounts.

[Q] How we can manage authentication for a resource in cognitive service solutions?

Each request to an Azure Cognitive Service must include an authentication header and there are three ways to authenticate a request which are;
1. Authenticate with Single-service or multi-service subscription key
2. Authentication with token
3. Authentication with Azure Active Directory (AAD)
Also the Authentication headers available for use with azure cognitive services are;
- Ocp-Apim-Subscription-Key (Use this header to authenticate with subscription key for a specific service or a multi-service subscritpion key)
- Ocp-Apim-Subscription-Region (This header is only required when using a multi-service subscription key with the Translator service. Use this header to specify the subscription region.)
- Authorization (Use this header if you are using an authentication token)

[Q] How we can secure Cognitive services by using Azure virtual network?

Azure Cognitive Services provides a layered security model. This model enables us to secure our Cognitive Services accounts to a specific subset of networks.Security can be achieved by;
1. Controlling access from all incoming virtual networks.
2. By selecting networks and private endpoints.
3. Also by disabling few network access.
4. The private endpoint uses an IP address from the VNet address space for our Cognitive Services resource.

[Q] How we can plan for a solution that meets responsible AI principles?

We can plan for any AI solutions by following 6 guiding principles outlined by microsoft i.e., "FITA Ps-Rs"1. Fairness (AI systems should treat all people fairly)
2. Inclusiveness (AI systems should empower everyone and engage people)
3. Transparency (AI systems should be understandable)
4. Accountability (People should be accountable for AI systems)
5. Privacy & Security (AI systems should be secure and respect privacy)
6. Reliability & Safety (AI systems should perform reliably and safely)

[Q] How we can create cognitive service resource in azure ?

Azure cognitive service can be created in Azure using minimum 3 approaches;
1. By using azure portal
2. By using azure CLI
3. By using azure client management library (PL supported: C#, Java, JavaScript, Python)
4. By using an ARM template

[Q] Benefits of using Machine learning pipelines?

- Breaks apart an ML task in to an independent, repeatable workflow
- Comprised of subtasks which focus on one aspect of the workflow
- Allows teams to collaborate on different aspects without interference.
- Only steps which have been updated need to be re-run

Reference Reading Contents;

  1. Get Started with AI on Azure

--

--

Vijay Borkar (VBCloudboy)

Assisting Microsoft partners in elevating their technical capabilities in AI, analytics, and cybersecurity. Collaborating with them to create innovative product