### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03-module-03.md Downloads the sample application and saves it to a folder named 'ai-900'. This is the initial step to get the necessary files for the lab. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02-module-02v2.md Downloads the sample application code from the AI-900 Fundamentals GitHub repository to your local environment. This is the first step to get the necessary scripts for image analysis. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Azure Cognitive Search Query Examples Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/05-create-cognitive-search-solution.md Demonstrates how to query an Azure Cognitive Search index using the Search explorer. Includes examples for retrieving all documents, filtering by location, and filtering by sentiment. Also shows how to view document counts and understand search scores. ```APIDOC Search Explorer Queries: 1. Retrieve all documents and count: Query string: `search=*&$count=true` Description: Returns all documents in the search index and includes the total document count in the `@odata.count` field. 2. Filter by location: Query string: `search=locations:'Chicago'` Description: Filters search results to include only documents where the 'locations' field contains 'Chicago'. 3. Filter by sentiment: Query string: `search=sentiment:'negative'` Description: Filters search results to include only documents where the 'sentiment' field is 'negative'. Note on CORS: If a 'To search in the portal, please allow the portal origin in your index CORS settings' message appears, select 'Allow portal' before searching. ``` -------------------------------- ### Initialize and Use Cloud Shell Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04-module-04v2.md This section details how to launch and configure the Azure Cloud Shell, specifically the PowerShell environment, for interacting with Azure services. It covers initial setup, including storage creation and shell type selection. ```APIDOC Azure Cloud Shell Initialization: 1. Access Cloud Shell: Click the '[>_]' icon in the Azure portal header. 2. Select Shell Type: If prompted, choose 'PowerShell'. If already open, ensure 'PowerShell' is selected from the dropdown. 3. Storage Creation: If prompted, select your subscription and click 'Create storage' to set up the necessary storage for Cloud Shell. 4. Verification: Confirm the shell type displayed is 'PowerShell'. ``` -------------------------------- ### Enable Preview Features in Azure ML Studio Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02-module-02.md Instructions for enabling preview features within Azure Machine Learning Studio. Specifically, this covers enabling the 'Guided experience for submitting training jobs with serverless compute'. ```APIDOC Enable Preview Features: 1. In Azure Machine Learning Studio, click on 'manage preview features' (loud speaker icon). 2. Enable the following feature: - Guided experience for submitting training jobs with serverless compute ``` -------------------------------- ### Initialize and Use Cloud Shell Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03e-analyze-receipts.md This section details how to launch and configure the Azure Cloud Shell, specifically the PowerShell environment, for interacting with Azure services. It covers initial setup, including storage creation and shell type selection. ```APIDOC Azure Cloud Shell Initialization: 1. Access Cloud Shell: Click the '[>_]' icon in the Azure portal header. 2. Select Shell Type: If prompted, choose 'PowerShell'. If already open, ensure 'PowerShell' is selected from the dropdown. 3. Storage Creation: If prompted, select your subscription and click 'Create storage' to set up the necessary storage for Cloud Shell. 4. Verification: Confirm the shell type displayed is 'PowerShell'. ``` -------------------------------- ### Initialize and Use Cloud Shell (PowerShell) Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04a-recognize-synthesize-speech.md This guide explains how to open and configure the Azure Cloud Shell to use PowerShell for testing the Speech service. It covers selecting PowerShell as the shell type and creating storage if prompted. ```APIDOC Cloud Shell Initialization: 1. Click the Cloud Shell button in the Azure portal. 2. Select 'PowerShell' if prompted. 3. If prompted to create storage, select your subscription and click 'Create storage'. 4. Ensure the shell type is set to 'PowerShell' from the top-left dropdown. ``` -------------------------------- ### Bing Copilot Text Generation Example Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/05-module-05.md Demonstrates how to use Bing Copilot to generate text responses based on natural language prompts. It highlights the ability to maintain conversation context and the impact of token limitations on memory. ```APIDOC Prompt: What are 3 pros and cons of traveling in the winter? Response: [Generates a response with pros and cons, including source links] Prompt: Find me 3 more pros Response: [Generates more pros, maintaining context] Prompt: Where are 3 places I can go to find fewer crowds? Response: [Generates a response, potentially losing earlier context due to token limits] ``` -------------------------------- ### Initialize and Use Cloud Shell Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03c-create-face-solutions.md This guide explains how to launch and configure the Azure Cloud Shell, specifically the PowerShell environment, to interact with Azure services. It covers selecting the shell type, creating storage if necessary, and ensuring the correct shell is active for command execution. ```PowerShell # Launch Cloud Shell # Click the '>_' icon in the Azure portal header. # Select PowerShell if prompted # If prompted to create storage, select 'Create storage'. # Ensure PowerShell is selected in the Cloud Shell pane # Use the dropdown menu on the top left if needed. ``` -------------------------------- ### Bing Copilot Image Generation Example Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/05-module-05.md Illustrates how to use Bing Copilot to generate images based on textual descriptions. It mentions that the image generation is powered by DALL-E and that responses can vary. ```APIDOC Prompt: Create an image of an elephant eating a hamburger Response: [Generates an image of an elephant eating a hamburger, stating 'Powered by DALL-E'] ``` -------------------------------- ### Using Cloud Shell (PowerShell) Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04-module-04.md This guide explains how to launch and configure the Azure Cloud Shell, specifically selecting the PowerShell environment, to interact with Azure services for text analytics. ```PowerShell # Launch Cloud Shell # Select PowerShell as the shell environment # Create storage if prompted # Ensure the shell type is PowerShell ``` -------------------------------- ### Azure Bot Service Configuration Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04d-create-a-bot.md This section outlines the configuration settings required when creating a Web App Bot in the Azure portal to connect it with a deployed knowledge base. It covers essential details for project setup, bot handle, pricing, App ID creation, and linking to the Language service. ```APIDOC Azure Bot Service Configuration: Project Details: Subscription: *Your Azure subscription* Resource group: *The resource group containing your Language resource* Instance Details: Resource group Location: *The same location as your Language service* Azure Bot: Bot handle: *A unique name for your bot* (*pre-populated*) Choose your pricing tier: Pricing tier: Free (F0) (*You may need to select *Change plan*) Microsoft App ID: Creation type: *Select Create new User-assigned managed identity* App Service: App name: *Same as the **Bot handle** with **.azurewebsites.net** appended automatically* SDK language: *Choose either C# or Node.js* App Service Plan: Creation Type: *Select Create new app service plan* App Settings: Language Resource Key: *You will need to copy your Language resource key and paste it here.* Language project name: MargiesTravel Language service endpoint hostname: *Pre-populated with your language service endpoint* Language Service Details: Subscription Id: *Pre-populated with your subscription ID* Resource Group Name: *Pre-populated with your resource group name* Account Name: *Pre-populated with your resource name* ``` -------------------------------- ### Using Cloud Shell (PowerShell) Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03-module-03v2.md This guide explains how to launch and configure the Azure Cloud Shell, specifically selecting the PowerShell environment, to interact with Azure services for text analytics. ```PowerShell # Launch Cloud Shell # Select PowerShell as the shell environment # Create storage if prompted # Ensure the shell type is PowerShell ``` -------------------------------- ### Using Cloud Shell (PowerShell) Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03d-read-text-computer-vision.md This guide explains how to launch and configure the Azure Cloud Shell to use PowerShell. It covers selecting PowerShell as the shell type, creating storage if prompted, and ensuring the correct shell is active for running commands. ```PowerShell # Launch Cloud Shell # Select PowerShell as the shell type if prompted # Create storage for Cloud Shell if prompted # Ensure the shell type is set to PowerShell ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Downloads the sample application and saves it to a local folder named 'ai-900' using Git. This is a prerequisite for the subsequent steps. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04a-recognize-synthesize-speech.md Clones the AI-900 Fundamentals GitHub repository to your local environment. This is a prerequisite for running the sample client application. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Get Azure AI Services Keys and Endpoint Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04a-recognize-synthesize-speech.md This section details how to retrieve the 'Keys and Endpoint' for an Azure AI services resource. These credentials are required for client applications to connect to the service. ```APIDOC Azure AI Services Keys and Endpoint: Navigate to your Azure AI services resource. On the Overview page, click the link to manage the keys for the service. View the Keys and Endpoint page. Required information: location/region and key ``` -------------------------------- ### Azure Cloud Shell Initialization (PowerShell) Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Steps to open and configure Azure Cloud Shell to use PowerShell. This includes selecting the shell type and setting up storage if prompted. ```APIDOC Azure Cloud Shell: Access: Click the [>_] (Cloud Shell) button in the Azure portal. Shell Selection: - If prompted, select PowerShell. - Ensure the shell type at the top left is set to PowerShell. Storage Setup: - If prompted to create storage, select Create storage and wait for creation. ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03d-read-text-computer-vision.md Downloads the sample application code from the AI-900 Fundamentals GitHub repository to a local folder named 'ai-900'. This is a prerequisite for running the client application. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04-module-04v2.md Downloads the sample application and saves it to a local folder named 'ai-900' using Git. This is a prerequisite for running the client application. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04-module-04.md Downloads the sample application and saves it to a local folder named 'ai-900'. This is a prerequisite for running the client application. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 GitHub Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03c-create-face-solutions.md Downloads the sample application code from the specified GitHub repository to a local folder named 'ai-900'. This is the initial step to obtain the necessary scripts for face analysis. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03-module-03v2.md Downloads the sample application and saves it to a local folder named 'ai-900'. This is a prerequisite for running the client application. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Clone AI-900 Fundamentals Repository Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03e-analyze-receipts.md Downloads the sample application and saves it to a local folder named 'ai-900'. This is a prerequisite for running the client application. ```PowerShell git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Initialize Cloud Shell Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02-module-02v2.md Instructions for opening and initializing the Azure Cloud Shell. Users will select PowerShell as their preferred shell and create storage if prompted. This environment is used to run command-line applications for testing AI services. ```APIDOC Azure Portal: 1. Click the 'Cloud Shell' button ('>_') at the top of the page. 2. If prompted, select 'PowerShell' as the shell type. 3. If prompted to create storage, select 'Create storage' and wait for creation. 4. Ensure the shell type is set to 'PowerShell' (use the dropdown if necessary). 5. Wait for the PowerShell environment to start. ``` -------------------------------- ### Interpreting Model Performance Metrics Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md This guide explains how to interpret the performance metrics provided by the 'Evaluate Model' module, including the confusion matrix, Accuracy, Precision, Recall, F1 Score, ROC curve, and AUC. It also demonstrates how the 'Threshold' slider affects these metrics. ```Metrics Interpretation Confusion Matrix: Observe predicted vs. actual value counts. Accuracy: Proportion of correct predictions. Precision: Of predicted positives, how many were correct. Recall: Of actual positives, how many were identified. F1 Score: Harmonic mean of Precision and Recall. ROC Curve & AUC: Visualizes classifier performance across thresholds. AUC > 0.5 indicates better than random guessing. ``` -------------------------------- ### Clone AI-900 Repository and Edit Script Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md This snippet demonstrates how to clone the AI-900 Fundamentals repository using Git and then open the object detection script for editing in the Cloud Shell environment. ```PowerShell rm -r ai-900 -f git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 cd ai-900 code detect-objects.ps1 ``` -------------------------------- ### Initialize Cloud Shell Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03-module-03.md Instructions for opening and initializing the Azure Cloud Shell. Users will select PowerShell as their preferred shell and create storage if prompted. This environment is used to run command-line applications for testing AI services. ```APIDOC Azure Portal: 1. Click the 'Cloud Shell' button ('>_') at the top of the page. 2. If prompted, select 'PowerShell' as the shell type. 3. If prompted to create storage, select 'Create storage' and wait for creation. 4. Ensure the shell type is set to 'PowerShell' (use the dropdown if necessary). 5. Wait for the PowerShell environment to start. ``` -------------------------------- ### Run Object Detection Script with Image 1 Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md Executes the detect-objects.ps1 script to perform object detection on the first sample image. The script utilizes the configured prediction URL and key. ```PowerShell ./detect-objects.ps1 1 ``` -------------------------------- ### Navigate to Project Directory and Run Analysis Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04-module-04.md Changes the current directory to the 'ai-900' folder and executes the 'analyze-text.ps1' script with a specified review file. This initiates the text analysis process using the configured Language service. ```PowerShell cd ai-900 ./analyze-text.ps1 review1.txt ``` ```PowerShell ./analyze-text.ps1 review2.txt ``` ```PowerShell ./analyze-text.ps1 review3.txt ``` ```PowerShell ./analyze-text.ps1 review4.txt ``` -------------------------------- ### Language Studio Model Training Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Steps to initiate and configure a model training job in Language Studio. This includes selecting training mode, data splitting options, and naming the model. ```APIDOC Training Jobs: Start a training job: - Train a new model: Select and choose a model name - Training mode: Standard training (free) - Data Splitting: Automatically split the testing set from the training data, keep default percentages - Action: Click Train ``` -------------------------------- ### Run Pipeline Job Configuration Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md This section details the steps for configuring and submitting a pipeline job for execution. It covers setting up the experiment name, inputs/outputs, and selecting compute resources. ```APIDOC Configure & Submit Pipeline Job: 1. Basics Page: - Run type: Select 'Create new'. - Experiment name: Set to 'mslearn-diabetes-training'. 2. Inputs & outputs Page: - No changes required. 3. Runtime settings Page: - Select compute type: 'Compute cluster'. - Select Azure ML compute cluster: Choose your existing compute cluster. 4. Review + Submit: - Review the pipeline job configuration. - Select 'Submit' to run the job. ``` -------------------------------- ### Run Object Detection Script with Image 2 Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md Executes the detect-objects.ps1 script to perform object detection on the second sample image. This tests the model's ability to detect different objects or scenarios. ```PowerShell ./detect-objects.ps1 2 ``` -------------------------------- ### Run Training Pipeline Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02a-create-regression-model.md Steps to configure and submit a training pipeline for a regression model. This involves selecting an existing experiment and monitoring the job run. ```APIDOC Configure & Submit Pipeline: Experiment Name: mslearn-auto-training Monitor Job Run: Navigate to Jobs page. Select the latest 'Auto Price Training' job run. Wait for completion (approx. 5 minutes). View Results: Right-click 'Score Model' module. Select 'Preview data' -> 'Scored dataset'. Observe 'Scored Labels' column against 'price' column. ``` -------------------------------- ### Navigate to Project Directory and Run Analysis Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03-module-03v2.md Changes the current directory to the 'ai-900' folder and executes the 'analyze-text.ps1' script with a specified review file. This initiates the text analysis process using the configured Language service. ```PowerShell cd ai-900 ./analyze-text.ps1 review1.txt ``` ```PowerShell ./analyze-text.ps1 review2.txt ``` ```PowerShell ./analyze-text.ps1 review3.txt ``` ```PowerShell ./analyze-text.ps1 review4.txt ``` -------------------------------- ### Create Custom Vision Project Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md This section details the steps to create a new project within the Custom Vision portal. It involves specifying project name, description, associated resource, project type (Object Detection), and domain (General). ```APIDOC Custom Vision Portal: Navigate to: https://customvision.ai Sign in with your Azure subscription account. Create New Project: Name: Traffic Safety Description: Object detection for road safety. Resource: The previously created Azure AI services resource Project Types: Object Detection Domains: General [A1] ``` -------------------------------- ### Run the Speaking Clock Application Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04a-recognize-synthesize-speech.md Navigates to the ai-900 directory and executes the speaking-clock.ps1 script to process audio input and generate a spoken response. ```PowerShell cd ai-900 ./speaking-clock.ps1 ``` -------------------------------- ### Create Azure Machine Learning Workspace Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02-module-02.md This section details the steps to create a new Azure Machine Learning workspace using the Azure portal. It outlines the necessary settings and configurations for resource group, region, storage account, key vault, application insights, and container registry. ```APIDOC Azure Machine Learning Workspace Creation: 1. Sign into the Azure portal at `https://portal.azure.com`. 2. Select '+ Create a resource'. 3. Search for 'Machine Learning' and select 'Azure Machine Learning'. 4. Configure the following settings: - Subscription: Your Azure subscription. - Resource group: Create or select a resource group. - Name: Enter a unique name for your workspace. - Region: Select the closest geographical region. - Storage account: Note the default new storage account. - Key vault: Note the default new key vault. - Application insights: Note the default new application insights resource. - Container registry: None (created on first model deployment). 5. Select 'Review + create', then 'Create'. 6. Launch Azure Machine Learning studio by selecting 'Launch studio' or navigating to `https://ml.azure.com`. ``` -------------------------------- ### Create Conversational Language Understanding App Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Instructions for creating a Conversational Language Understanding (CLU) app within Language Studio. This involves defining project details such as name, description, and primary language. ```APIDOC Language Studio: 1. Navigate to https://language.azure.com 2. Sign in with your Azure account. 3. Select your Language resource if prompted, or switch to it via Settings (⚙) > Resources > Switch resource. 4. From the 'Create new' menu, select 'Conversational language understanding'. 5. In the 'Create a project' dialog: - Name: A unique project name - Description: Simple home automation - Utterances primary language: English - Enable multiple languages in project: Do not select. 6. Click 'Next' on the 'Enter basic information' page. 7. On the 'Review and finish' page, click 'Create'. ``` -------------------------------- ### Create Custom Question Answering Project Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04d-create-a-bot.md Instructions for creating a new custom question answering project within Language Studio. This includes selecting the language resource, Azure search resource, project name, description, source language, and default answer. ```APIDOC Language Studio: 1. Open Language Studio at https://language.azure.com. 2. Sign in with your Azure account. 3. Select your Language resource if prompted. 4. Navigate to 'Create new' > 'Custom question answering'. Project Settings: - Language resource: Choose your created Language resource. - Azure search resource: Choose your Azure search resource. - Name: MargiesTravel - Description: A simple knowledge base - Source language: English - Default answer when no answer is returned: No answer found Project Creation: 1. Click 'Next' on the 'Choose language setting' page. 2. Enter basic information and click 'Next'. 3. Click 'Create project' on the 'Review and finish' page. ``` -------------------------------- ### Language Studio Model Deployment Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Instructions for deploying a trained model as an endpoint in Language Studio. This involves creating a deployment name and assigning the trained model. ```APIDOC Deploying a model: Add a deployment: - Create or select an existing deployment name: Select create a new deployment name. Add a unique name. - Assign trained model to your deployment name: Select the name of the trained model. - Action: Click Deploy ``` -------------------------------- ### Conversational Language Understanding Intents and Utterances Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md This section details the process of defining intents and providing sample utterances for each intent in a Conversational Language Understanding (CLU) model. It outlines the creation of 'switch_on' and 'switch_off' intents, along with the necessary utterances and entity labeling for training. ```APIDOC Intent: switch_on Utterances: - turn the light on - switch on the fan - put the fan on - put the light on - switch on the light - turn the fan on Entities: - device: fan - device: light Intent: switch_off Utterances: - turn the light off - switch off the fan - put the fan off - put the light off - turn off the light - switch the fan off Entities: - device: fan - device: light ``` -------------------------------- ### Test Knowledge Base Functionality Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04d-create-a-bot.md This outlines the steps for testing a knowledge base. Users can input various phrases to see the responses generated by the knowledge base, including custom entries and responses derived from an FAQ document. ```APIDOC Action: Click 'Test' to open the test pane Input: Test pane message - 'Hi' Expected Response: 'Hello' Input: Test pane message - 'I want to book a flight' Expected Response: Appropriate response from FAQ (short answer and answer passage) Input: Test pane message - 'How can I cancel a reservation?' Action: Click 'Test' to close the test pane ``` -------------------------------- ### Custom Vision Model Training and Performance Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md Explains how to train an object detection model and interpret its performance metrics. ```APIDOC Training and Evaluation: 1. Train Model: - Click 'Train' in the Custom Vision project. - Choose 'Quick Training'. 2. Review Performance Metrics: - Observe 'Precision', 'Recall', and 'mAP' after training. - These metrics indicate the model's prediction quality. 3. Adjust Probability Threshold: - Modify the 'Probability Threshold' slider (e.g., from 50% to 90%). - Observe the impact on performance metrics. - This threshold determines the minimum probability for a prediction to be counted. ``` -------------------------------- ### Preview Transformed Data Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md Instructions on how to preview the data after a pipeline run has completed, specifically focusing on the output of the 'Normalize Data' module. ```APIDOC Preview Transformed Data: 1. Right-click the 'Normalize Data' module on the canvas. 2. Select 'Preview data'. 3. Select 'Transformed dataset'. 4. Observe that the selected numeric columns have been normalized to a common scale. ``` -------------------------------- ### Preview Penguin Dataset Columns Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02c-create-clustering-model.md Details the columns available in the 'penguin-data' dataset and their descriptions, as observed after loading it onto the Azure Machine Learning designer canvas. ```APIDOC Penguin Dataset Columns: CulmenLength: Length of the penguin's bill in millimeters. CulmenDepth: Depth of the penguin's bill in millimeters. FlipperLength: Length of the penguin's flipper in millimeters. BodyMass: Weight of the penguin in grams. Species: Species indicator (0:"Adelie", 1:"Gentoo", 2:"Chinstrap") Missing Values: CulmenLength: 2 CulmenDepth: 2 FlipperLength: 2 BodyMass: 2 Data Scale: Measurements are in different scales (millimeters to grams). ``` -------------------------------- ### Clone AI-900 Repository and Set Up Directory Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03a-classify-images.md This snippet demonstrates how to remove an existing 'ai-900' directory if it exists, then clone the AI-900 Fundamentals repository from GitHub into a new 'ai-900' directory using PowerShell. ```PowerShell rm -r ai-900 -f git clone https://github.com/MicrosoftLearning/AI-900-AIFundamentals ai-900 ``` -------------------------------- ### Pipeline Execution and Scoring Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md Steps to run the configured training pipeline and score the validation dataset to obtain predicted labels and probabilities. ```Designer 1. Select Configure & Submit, and run the pipeline using the existing experiment named mslearn-diabetes-training. 2. Wait for the experiment run to finish. 3. Check the status of the job by selecting Jobs under the Assets. 4. Right-click the Score Model module on the canvas, select Preview data and then select Scored dataset. 5. Examine the 'Scored Labels' and 'Scored Probabilities' columns. ``` -------------------------------- ### Configure Speech Service Keys and Region Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04a-recognize-synthesize-speech.md Sets the Azure AI services subscription key and region in the speaking-clock.ps1 script. Replace placeholder values with your actual key and region. ```PowerShell $key = "1a2b3c4d5e6f7g8h9i0j...." $region="somelocation" ``` -------------------------------- ### Custom Vision Quick Test Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md Demonstrates how to perform a quick test of a trained object detection model using an image URL. ```APIDOC Quick Test: 1. Click 'Quick Test' in the Custom Vision project. 2. Enter an image URL in the 'Image URL' box (e.g., `https://aka.ms/pedestrian-cyclist`). 3. View results in the right pane under 'Predictions'. - Each detected object is listed with its tag and probability. - Select objects to highlight them in the image. 4. Refine predictions using the 'Threshold Value' slider to eliminate low-probability detections. ``` -------------------------------- ### Create and Load Dataset in Azure ML Designer Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md Instructions for creating a new pipeline in Azure Machine Learning Designer, naming it, and adding a pre-existing dataset to the design canvas. It also covers previewing the data and understanding its schema and features. ```APIDOC Pipeline Creation in Designer: 1. Navigate to Designer. 2. Select '+ New pipeline'. 3. Rename draft pipeline to 'Diabetes Training'. 4. Expand Asset library. 5. Select 'Data' tab. 6. Search for and add 'diabetes-data' to the canvas. 7. Right-click 'diabetes-data' on canvas and select 'Preview data'. 8. Review 'Profile' tab for data schema and column distributions. 9. Observe 'Diabetic' column values (0 and 1) representing classes. 10. Review other columns as features and note the need for normalization due to varying scales. ``` -------------------------------- ### Real-time Endpoint Deployment Configuration Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02a-create-regression-model.md This outlines the configuration parameters for deploying a real-time inference endpoint. It specifies the name, description, and compute type for the service. ```APIDOC Deploy a new real-time endpoint: Name: predict-auto-price Description: Auto price regression Compute type: Azure Container Instance ``` -------------------------------- ### Language Studio Model Testing Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Procedures for testing a deployed model in Language Studio. This includes entering utterances, running tests, and reviewing predicted intents and entities from the JSON output. ```APIDOC Testing deployments: Select deployed model: - Input utterance: e.g., "switch the light on" - Action: Select Run the test - Review output: Check predicted intent (e.g., switch_on) and entity (e.g., device) with confidence scores. Additional tests: - Input utterances: "turn off the fan", "put the light on", "put the fan off" ``` -------------------------------- ### Test Another Command Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Executes the 'understand.ps1' script with a different natural language command to test the model's understanding of various user intents. ```PowerShell ./understand.ps1 "Switch the fan off" ``` -------------------------------- ### Select Columns and Normalize Data Modules Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md This section describes the process of using 'Select Columns in Dataset' and 'Normalize Data' modules in a machine learning pipeline. It details how to configure these modules to select specific columns and apply MinMax normalization. ```APIDOC Select Columns in Dataset Module: Purpose: Selects specific columns from a dataset. Configuration: - Edit column: Allows selection of columns. - Selection method: 'By name' or 'With Rules'. - Columns to select: Specify by name or rules. - Example (By name): Select 'Pregnancies', 'PlasmaGlucose', 'DiastolicBloodPressure', 'TricepsThickness', 'SerumInsulin', 'BMI', 'DiabetesPedigree', 'Age'. Exclude 'PatientID'. Normalize Data Module: Purpose: Normalizes numeric columns to a common scale. Configuration: - Transformation method: 'MinMax' (scales data to a range of 0 to 1). - Use 0 for constant columns when checked: Set to 'True'. - Columns to transform: Specify columns using 'Edit columns' -> 'With Rules' -> 'Include column names'. - Example columns: Pregnancies, PlasmaGlucose, DiastolicBloodPressure, TricepsThickness, SerumInsulin, BMI, DiabetesPedigree, Age. ``` -------------------------------- ### Knowledge Store Structure and Access Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/05-create-cognitive-search-solution.md Details on accessing and reviewing data stored in the Azure Cognitive Search knowledge store. Explains how to navigate to containers, view JSON projections, and access image data. ```APIDOC Knowledge Store Navigation: 1. Accessing Blob Storage: - Navigate to your Azure storage account. - Select 'Containers' in the left-hand menu. - Select the 'knowledge-store' container. 2. Viewing JSON Projections: - Inside the 'knowledge-store' container, select an item. - Click on the 'objectprojection.json' file. - Select 'Edit' to view the JSON data for a document. 3. Accessing Image Projections: - Navigate back to 'Containers' and select the 'coffee-skillset-image-projection' container. - Select any item (e.g., a .jpg file). - Select 'Edit' to view the stored image. 4. Reviewing Table Projections: - Navigate to 'Storage browser' on the left-hand panel and select 'Tables'. - Select the table corresponding to an entity (e.g., 'coffeeSkillsetKeyPhrases'). - Examine the fields, including key phrases extracted by the skillset. ``` -------------------------------- ### Custom Vision Object Detection Workflow Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03b-create-object-detection-solution.md This outlines the general workflow for object detection using Custom Vision, from data preparation to model training and evaluation. ```APIDOC Workflow: 1. Data Preparation: - Download and extract training images. - Upload images to a Custom Vision project. - Tag objects within images using bounding boxes. - Assign appropriate labels (e.g., 'Cyclist', 'Pedestrian'). 2. Model Training: - Initiate training with tagged images. - Select training options (e.g., 'Quick Training'). - Monitor training progress and performance metrics (Precision, Recall, mAP). 3. Model Testing & Evaluation: - Use 'Quick Test' with image URLs or uploads. - Analyze predictions, including tags and probabilities. - Adjust 'Probability Threshold' to refine prediction accuracy. - Evaluate model performance based on adjusted thresholds. ``` -------------------------------- ### Create Tabular Dataset in Azure ML Studio Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02b-create-classification-model.md Steps to create a new tabular data asset in Azure Machine Learning studio. This involves specifying the name, description, data source (web files), web URL, file format, delimiter, encoding, column headers, and schema. ```APIDOC Data Asset Creation: Name: diabetes-data Description: Diabetes data Dataset type: Tabular Data source: From web files Web URL: https://aka.ms/diabetes-data Skip data validation: false File format: Delimited Delimiter: Comma Encoding: UTF-8 Column headers: Only first file has headers Skip rows: None Dataset contains multi-line data: false Schema: Include all columns other than 'Path' Review and Create. ``` -------------------------------- ### Adding and Using the Evaluate Model Module Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02c-create-clustering-model.md Instructions for adding the 'Evaluate Model' module to an Azure ML Designer pipeline, connecting it, running the pipeline, and reviewing evaluation metrics. ```APIDOC Evaluate Model Module: Adding to Pipeline: - Open the pipeline draft in Azure ML Designer. - Search for 'Evaluate Model' in the Asset library. - Place it on the canvas and connect the output of the preceding module (e.g., 'Assign Data to Clusters') to the 'Scored dataset' input. Pipeline Execution & Monitoring: - Follow the same 'Configure & Submit' and monitoring steps as for the training pipeline. Reviewing Evaluation Results: - Right-click the 'Evaluate Model' module after the run completes. - Select 'Preview data' and then 'Evaluation results'. - Key metrics include: - Average Distance to Other Center - Average Distance to Cluster Center - Number of Points - Maximal Distance to Cluster Center ``` -------------------------------- ### Evaluate Regression Model Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02a-create-regression-model.md Instructions for adding and running the 'Evaluate Model' module to assess the performance of a trained regression model. It details connecting modules and interpreting metrics. ```APIDOC Add Evaluate Model Module: Open the 'Auto Price Training' pipeline. In Asset library, search for and add 'Evaluate Model' module. Connect 'Score Model' output to 'Evaluate Model' input ('Scored dataset'). Run Evaluation Pipeline: Configure & Submit Pipeline: Experiment Name: mslearn-auto-training Monitor Job Run: Navigate to Jobs page. Select the latest 'Auto Price Training' job run. Wait for completion (approx. 2 minutes). View Evaluation Results: Select 'Job detail'. Right-click 'Evaluate Model' module. Select 'Preview data' -> 'Evaluation results'. Review Metrics: Mean Absolute Error (MAE) Root Mean Squared Error (RMSE) Relative Squared Error (RSE) Relative Absolute Error (RAE) Coefficient of Determination (R^2) ``` -------------------------------- ### Run OCR Script on Sample Images Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03d-read-text-computer-vision.md Executes the 'ocr.ps1' script to perform OCR on specified image files ('advert.jpg' and 'letter.jpg'). The script analyzes the images and returns detected text along with bounding box coordinates. ```PowerShell cd ai-900 ./ocr.ps1 advert.jpg ``` ```PowerShell ./ocr.ps1 letter.jpg ``` -------------------------------- ### Run Face Analysis Script Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/03c-create-face-solutions.md Executes the 'find-faces.ps1' script with a specified image file (e.g., 'store-camera-1.jpg') to perform face detection and analysis. The script outputs information about detected faces, including bounding box coordinates. ```PowerShell cd ai-900 ./find-faces.ps1 store-camera-1.jpg ``` -------------------------------- ### Azure Cognitive Search Import Data Wizard Configuration Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/05-create-cognitive-search-solution.md Configuration details for the Azure Cognitive Search Import data wizard, including data source, cognitive skills, and indexer settings. ```APIDOC Data Source: Type: Azure Blob Storage Name: coffee-customer-data Data to extract: Content and metadata Parsing mode: Default Connection string: Select existing connection to storage account, 'coffee-reviews' container Managed identity authentication: None Cognitive Skills: Skillset Name: coffee-skillset Enable OCR and merge all text into merged_content field: True Source data field: merged_content Enrichment granularity level: Pages (5000 character chunks) Enable incremental enrichment: False Enriched Fields: - Extract location names -> locations - Extract key phrases -> keyphrases - Detect sentiment -> sentiment - Generate tags from images -> imageTags - Generate captions from images -> imageCaption Knowledge Store: Projections: - Image projections - Documents - Pages - Key phrases - Entities - Image details - Image references Azure blob projections: Document Container name: knowledge-store Target Index: Index Name: coffee-index Key: metadata_storage_path Suggester name: (blank) Search mode: autopopulated Index Fields: - Default settings with 'filterable' selected for all default fields Indexer: Indexer Name: coffee-indexer Schedule: Once Advanced options: - Base-64 Encode Keys: True ``` -------------------------------- ### Test Service with Sample Data Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02a-create-regression-model.md This snippet provides the JSON payload used to test the deployed real-time inference endpoint. It includes sample input features for a vehicle to predict its price. ```json { "Inputs": { "WebServiceInput0": [ { "symboling": 3, "normalized-losses": 1.0, "make": "alfa-romero", "fuel-type": "gas", "aspiration": "std", "num-of-doors": "two", "body-style": "convertible", "drive-wheels": "rwd", "engine-location": "front", "wheel-base": 88.6, "length": 168.8, "width": 64.1, "height": 48.8, "curb-weight": 2548, "engine-type": "dohc", "num-of-cylinders": "four", "engine-size": 130, "fuel-system": "mpfi", "bore": 3.47, "stroke": 2.68, "compression-ratio": 9, "horsepower": 111, "peak-rpm": 5000, "city-mpg": 21, "highway-mpg": 27 } ] }, "GlobalParameters": {} } ``` -------------------------------- ### Bing Copilot Code Generation and Translation Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/05-module-05.md Shows how Bing Copilot can generate code in a specified language and translate existing code to another language, leveraging conversation history for context. ```APIDOC Prompt: Use Python to create a list Response: ```python my_list = [] ``` Prompt: Translate that into C# Response: ```csharp var myList = new List(); ``` ``` -------------------------------- ### Deploy Real-Time Endpoint Configuration Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/02c-create-clustering-model.md Configuration settings for deploying a new real-time endpoint to Azure Container Instance. This includes specifying the name, description, and compute type for the service. ```APIDOC Endpoint Deployment Settings: Name: predict-penguin-clusters Description: Cluster penguins. Compute type: Azure Container Instance ``` -------------------------------- ### Create Azure AI Services Resource Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04a-recognize-synthesize-speech.md This snippet outlines the steps to create an Azure AI services resource in the Azure portal. It specifies the necessary configurations like subscription, resource group, region, name, and pricing tier (Standard S0). ```APIDOC Azure AI Services Resource Creation: Subscription: Your Azure subscription Resource group: Select or create a resource group with a unique name Region: Choose any available region Name: Enter a unique name Pricing tier: Standard S0 Acknowledgement: By checking this box I acknowledge that I have read and understood all the terms below ``` -------------------------------- ### Navigate and Open Code Editor Source: https://github.com/microsoftlearning/ai-900-aifundamentals/blob/main/instructions/04c-conversational-language-understanding.md Changes the current directory to the 'ai-900' folder and opens the root of this folder in the default code editor (VS Code). This allows for modification of the project files. ```PowerShell cd ai-900 code . ```