Domain 2: Implement Generative AI and Agentic Solutions (Part 1 of 3)
This lesson covers 5 exam topics: Deploying and Consuming LLMs, SLMs and Multimodal Models, Implementing RAG in an Application, Workflows and Multistep Reasoning Pipelines, Evaluating Models and Apps, Connecting Apps to Foundry with SDKs. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.
1. Deploying and Consuming LLMs, SLMs and Multimodal Models
Central question: How do apps call different kinds of deployed models?
Consuming models
- Foundry SDK (
azure-ai-projects):AIProjectClient(endpoint, credential)→get_openai_client()→responses.create(model=<deployment>, input=...). - Responses API for text, tools, multimodal input (images as content parts) and image generation.
- Reasoning models spend more effort on hard problems; code models for programming tasks; audio models for speech in/out.
- Open-source and custom models can run on managed compute; models sold directly by Azure use standard deployment types.
Choosing at runtime (design guidance)
Small models for simple, high-volume calls; LLMs or reasoning models for complex tasks; model router to choose per request.
Exam traps
- Image to a text-only model.
- Catalog name instead of deployment name.
- Keys in code instead of Entra ID.
2. Implementing RAG in an Application
Central question: How do you build retrieval-augmented generation into an app?
Pattern (verified components)
- Ingest and index content in Azure AI Search (chunking, embeddings via integrated vectorization).
- Retrieve with hybrid search plus semantic ranker (or agentic retrieval for complex questions).
- Augment the prompt with top chunks and instructions ("answer only from sources; cite").
- Generate with a Foundry model; return citations.
- Evaluate: retrieval (relevance, NDCG), groundedness, relevance, completeness.
Agents can use the Azure AI Search tool or Foundry IQ for managed RAG with citations and permissions (verified).
Exam traps
- Fine-tuning for changing facts. Use RAG.
- Vector-only retrieval missing exact terms.
- No groundedness check.
3. Workflows and Multistep Reasoning Pipelines
Central question: How do you design flows that use tools and multiple steps?
Options
| Option | Notes |
|---|---|
| Microsoft Agent Framework workflows | Functional and graph-based workflows connecting agents and functions with explicit execution paths; recommended for new work |
| Foundry workflows (UI, preview) | Sequential, group chat, human-in-the-loop templates; retiring December 1, 2026 |
| Tool-augmented flows | Model calls tools (function calling, search) in a loop until done |
| Hosted agents | Your orchestration code run by Foundry |
Design patterns (general background)
Plan → act (tools) → observe → repeat; split tasks into steps (extract, then reason, then write); deterministic code for exact logic, models for judgment; checkpoints and approvals for risky steps.
Exam traps
- New build on Foundry workflows, which retire Dec 1, 2026.
- One giant prompt for a multistep task.
- LLM for exact calculations a function should do.
4. Evaluating Models and Apps
Central question: How do you measure fabrications, relevance, quality and safety?
Evaluators
| Category | Evaluators |
|---|---|
| General quality | Coherence, fluency |
| RAG | Groundedness (precision: no content beyond context), Groundedness Pro (Content Safety), Relevance, Response Completeness (recall vs ground truth), Retrieval, Document Retrieval (NDCG, XDCG, Fidelity, Max Relevance, Holes) |
| Safety and security | Hate/unfairness, violence, protected material and more |
| Agent | Tool call accuracy, task completion |
| Custom | Your domain rules |
Evaluate datasets, generate responses from test inputs, evaluate production traces, or simulate conversations; run in CI with the evaluation GitHub Action (verified).
Exam traps
- Groundedness vs completeness. Groundedness = no fabrication (precision); completeness = nothing missing (recall).
- Evaluating only generation, not retrieval.
- One-time evaluation with no production monitoring.
5. Connecting Apps to Foundry with SDKs
Central question: How does an application connect to a Foundry project?
Connection
- Project endpoint:
https://<resource>.services.ai.azure.com/api/projects/<project>. - Foundry SDK (thin client to all project APIs): Python
azure-ai-projects(>= 2.3.0), .NET, JavaScript, Java. - Credential:
DefaultAzureCredential(Entra ID; managed identity in Azure). get_openai_client()for models;get_openai_client(agent_name=...)for an agent;agents.create_version(...)to define agents.- Agent Framework
FoundryChatClientbuilds on the Foundry SDK for code-first agents. - Connectors / connections link projects to Azure AI Search, storage and other services.
Exam traps
- Different endpoints and keys per feature. One project endpoint.
- Azure OpenAI resource endpoint expecting agent APIs. It provides only the /openai/v1 endpoint.
- Credentials in source control.
References
- AI-103 study guide — checked Oct 21, 2026
- Get started with code — checked Oct 21, 2026
- Reasoning models — checked Oct 21, 2026
- Model router — checked Oct 21, 2026
- Hybrid search — checked Oct 21, 2026
- RAG evaluators — checked Oct 21, 2026
- Foundry IQ — checked Oct 21, 2026
- Agent Framework — checked Oct 21, 2026
- Foundry workflows — checked Oct 21, 2026
- Observability — checked Oct 21, 2026
- Foundry SDKs and endpoints — checked Oct 21, 2026
Check your understanding
Call a deployed model with the Foundry SDK?Show answerHide answer
Answer
get_openai_client() then responses.create.Best default retrieval for RAG?Show answerHide answer
Answer
Hybrid plus semantic ranker.Recommended code-first orchestration?Show answerHide answer
Answer
Microsoft Agent Framework.Detect fabricated content?Show answerHide answer
Answer
Groundedness.Single URL your app needs?Show answerHide answer
Answer
The project endpoint.