AI-3016: Develop generative AI apps by using Microsoft Foundry (APL-3016 prep)
Design, build, ground, fine-tune, and safely operate generative AI applications on Microsoft Foundry. Applied Skills exam-prep for APL-3016 through hands-on Python + portal labs anchored in the Margie's Travel scenario.
View badge details
Exam Preparation Included
Practice with real exam-style questions for the AI-3016 certification. AI-powered feedback helps you understand every answer.
About This Course
Prepare for the APL-3016 Applied Skills assessment by learning how to design, build, evaluate, and safely operate generative AI applications on Microsoft Foundry. You will explore the modernized Foundry portal, choose and deploy models from the catalog, build Python chat apps that authenticate with DefaultAzureCredential, ground answers with the Responses API's built-in file_search and web_search tools, fine-tune a base model, and apply custom content-safety guardrails to a production deployment. Every lesson is anchored in Margie's Travel a boutique travel agency whose sales agents need an AI assistant they can trust.
Course Curriculum
10 Lessons
Microsoft Foundry platform overview
Get your bearings on the modernized Microsoft Foundry portal before you build anything. In this short teaching lesson you will learn how a Foundry account, project, and deployment fit together; what APL-3016 assessment day actually covers; how the current portal maps to older "AI hub" and "prompt flow" vocabulary you may have read in study guides; and what programming model the rest of the course will use. By the end of this lesson you will be able to describe the Foundry object hierarchy, translate legacy Azure AI vocabulary to the modern equivalent, and name the seven assessment tasks the exam will grade you on.
Create a Foundry project and deploy your first model - Lab Exercises
Note: This lab pre-provisions Azure Foundry resources at start — allow up to 10 minutes for the environment to become ready before beginning the exercises.
By the end of this lab you will be able to sign in to a Microsoft Foundry project with a keyless Azure credential, choose the right chat model from the model catalog, deploy it, and confirm it is reachable from the Foundry Toolkit inside your VS Code container. You will do the work as Margie's Travel's newly-hired AI engineer, standing up the account and first deployment your sales-agent copilot will call in later lessons.
Choosing models from the Foundry catalog
By the end of this lesson you will be able to navigate the Microsoft Foundry model catalog, read a model card, interpret the benchmark leaderboard across quality, safety, cost, and throughput, and choose the right deployment SKU for a given workload. You'll learn to weigh the trade-offs between newer versus proven models and between pay-per-token versus reserved-capacity deployment options — the two decisions every Foundry project starts with.
Explore, compare, and evaluate Foundry models - Lab Exercises
Note: This lab pre-provisions Azure Foundry resources + two model deployments at start — allow up to 12 minutes for the environment to become ready before beginning the exercises.
By the end of this lab you will be able to browse the Microsoft Foundry model catalog with intent, use the benchmark leaderboard to shortlist candidates for a specific product need, run a synthetic-data evaluation across two live deployments, and defend a model choice to a stakeholder. You'll practice the whole model-selection loop against Margie's Travel prompts on two pre-deployed models — gpt-5.2 and gpt-5-mini — so the tradeoffs (quality, latency, cost) show up in real scoring rather than in the abstract.
The Foundry chat programming model
By the end of this lesson you will be able to choose confidently between the OpenAI Python SDK, the Foundry Responses API, and Foundry Agents for a given chat scenario, and authenticate against any of them with keyless DefaultAzureCredential. You will understand how the modern Foundry programming model is structured — one OpenAI client, one project endpoint, one bearer-token provider — and why it replaced the retired azure-ai-inference package on May 30, 2026.
Build a generative AI chat app in Python - Lab Exercises
Note: This lab pre-provisions Azure Foundry resources + a gpt-5.2 deployment at start — allow up to 10 minutes for the environment to become ready before beginning the exercises.
By the end of this lab you will be able to author a Python chat application that authenticates to Microsoft Foundry with DefaultAzureCredential, calls the Chat Completions API against a gpt-5.2 deployment, maintains multi-turn conversation state, and streams tokens live with the async client. You take the mental model you built in the paired teaching lesson and turn it into working code Margie's Travel could ship.
Grounding with your own data — Responses API tools
By the end of this lesson you will be able to explain why grounding matters for generative AI applications, choose between the Responses API and Chat Completions for a given task, and describe how the built-in web_search and file_search tools ground answers in real-time web results and uploaded documents without a separate retrieval pipeline. You will also know when a project should still reach for Azure AI Search directly, so the choice is deliberate rather than default.
Build a chat app with web and file tools - Lab Exercises
Note: This lab pre-provisions Azure Foundry resources + a gpt-5.2 deployment at start — allow up to 10 minutes for the environment to become ready before beginning the exercises.
By the end of this lab you will be able to ground an AI chat application in your own data using the Foundry Responses API's built-in web_search and file_search tools — no separate retrieval service required. You will complete a Python scaffold that sends prompts through the Responses API, uploads Margie's Travel brochures to a Foundry vector store, and combines web search with brochure citations in a single response — the modern replacement for prompt-flow + Azure AI Search chains.
Fine-tuning and Responsible AI guardrails
Learn when to fine-tune a language model versus lean on prompt engineering or retrieval, and how to apply responsible-AI guardrails so the model you ship stays inside your organization's tolerance for harm.
By the end of this lesson you will be able to choose between fine-tuning, prompt engineering, and RAG for a given problem; recognize the JSONL training-data shape a fine-tune job expects; describe the fine-tune job lifecycle end-to-end; explain how Microsoft Foundry's default content filter behaves across the hate, violence, sexual, and self-harm categories; and design a custom filter that combines severity overrides, a blocklist, and the protected-material detector to fit a specific business scenario.
Fine-tune a model and apply custom guardrails - Lab Exercises
Note: This lab pre-provisions Azure Foundry resources + a base model deployment at start — allow up to 12 minutes for the environment to become ready before beginning the exercises. The fine-tuning exercise takes 30–90 minutes; you start it FIRST so it runs in the background while you configure guardrails.
By the end of this lab you will be able to fine-tune a base language model on a domain-specific training set, deploy the tuned model, design a custom content-safety policy that combines tightened harm-category thresholds with a brand blocklist and a protected-material output filter, and apply that policy to a live production deployment. Working in the Margie's Travel scenario you will queue a fine-tune job first so it trains in the background, then configure the guardrails, verify them in the playground, deploy the tuned model, and recommend the production configuration to a stakeholder.