Exams / AI-901 / D2 Implement AI solutions by using Microsoft Foundry
Implement generative AI apps and agents by using Foundry
- Create effective system and user prompts for generative AI models
- Deploy a model and interact with it in the Foundry portal
- Create a lightweight chat client application by using the Foundry SDK
- Create and test a single-agent solution in the Foundry portal
- Create a lightweight client application for an agent
From model catalog to deployment
Microsoft Foundry's model catalog lists thousands of models you can deploy directly, no training or fine-tuning required:
"In the Foundry portal, go to Build > Catalog > Model Catalog." — Deploy Microsoft Foundry Models in the Foundry portal
"After you deploy a Foundry Model, you can interact with it in the Foundry Playground and use it from code." — Deploy Microsoft Foundry Models in the Foundry portal
Two things to remember about deployment:
-
Fine-tuning and retraining are optional customizations, never a deployment prerequisite. A base model from the catalog is deployed as-is.
-
The playground only works on a deployed model. You cannot test a catalog model before it has a deployment, and the playground is not where the deployment itself gets created.
-
Region matters before anything else. A model must be available in the target region, or the deployment fails regardless of token limits, REST support or authentication method:
"Your project and resource must be in one of the supported regions of deployment for the model." — Deploy Microsoft Foundry Models in the Foundry portal
"Foundry Models: Model availability depends on the provider and deployment type." — Microsoft Foundry feature availability across cloud regions
Deployment types
| Deployment type | Purpose |
|---|---|
| Standard | Shared inference capacity; throughput can vary with demand |
| Provisioned | Dedicated, allocated capacity (PTUs) for guaranteed throughput |
| Global batch | Asynchronous, high-volume, non-interactive processing |
| Data zone standard | Standard throughput with data processed inside a defined geography |
When a scenario asks for a specified/guaranteed amount of throughput, the answer is provisioned:
"Provisioned throughput is a deployment type in Microsoft Foundry that provides dedicated model processing throughput for your deployment." — What is provisioned throughput for Foundry Models?
"When you create a provisioned deployment, you specify how many PTUs to allocate." — What is provisioned throughput for Foundry Models?
Tokens-per-minute (TPM) quota
TPM is the unit Azure uses to assign rate limits to a deployment — raising it changes throughput and scale, not the model's answers:
"When a deployment is created, the assigned TPM directly maps to the tokens-per-minute rate limit enforced on its inferencing requests." — Manage Azure OpenAI in Microsoft Foundry Models quota
A higher TPM does not change regional availability, response length, or whether citations are added — only how much traffic the deployment can absorb before throttling.
Prompting and generation parameters
| Parameter | Controls | Exam phrasing |
|---|---|---|
| Temperature | Randomness/creativity of output | "more creative/varied" vs "more deterministic" |
| Top P | Nucleus sampling — probability mass considered | alternative randomness control, used instead of temperature |
| Max Completion Tokens | Upper bound on tokens generated (including reasoning tokens) | "minimize cost", "limit response length" |
| System instructions / system message | Role, behavior, constraints, task framing | "respond in a specific role", "stay on topic", vision prompts needing task context |
Max Completion Tokens is the cost/length lever:
"To cap the total the model generates, set max_output_tokens with the Responses API or max_completion_tokens with the Chat Completions API." — Azure OpenAI reasoning models
"Reasoning tokens never appear in the message content, but they occupy space in the context window and are billed as output tokens." — Azure OpenAI reasoning models
For a vision-enabled model, the system message must describe the task so the model knows what to look for:
"We recommend you update the System Message to be specific to the task in order to avoid unhelpful responses from the model." — How to use vision-enabled chat models - Microsoft Foundry
Comparing models: the Model leaderboard
When a question asks how to compare the cost (or quality/safety/throughput) of several LLMs in the portal, the answer is the Model leaderboard, not Compliance, the Evaluator catalog, or Tools:
"Evaluate model benchmark scores across quality, safety, cost, and throughput to choose the best model for your scenario." — Compare models using the model leaderboard
Calling a deployed model from code
Whatever client library you use, calling a deployment always needs the same three things: an endpoint, credentials, and the deployment name.
"Microsoft Foundry Models provides access to a wide variety of models from many providers through a single endpoint and set of credentials." — Endpoints for Microsoft Foundry Models
"During inference, the deployment name is used in the model parameter to route requests to this particular deployment." — Deploy Microsoft Foundry Models in the Foundry portal
Exam trap: the model value sent in a request is the deployment name you chose when deploying (e.g. my-mini-gpt), not the underlying model name (gpt-4.1-mini). The base URL's host starts with the Azure OpenAI resource name:
"POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-06-01" — Azure OpenAI in Microsoft Foundry Models REST API reference
None of the following are required or sufficient to call a model: the exported playground session history, the training dataset, the Foundry project display name, or a task type field — the application needs the live endpoint + credentials + deployment name, not metadata about the project or past sessions.
The Foundry SDK and AIProjectClient
The Foundry SDK wraps the REST APIs, so you never hand-build HTTP requests or stand up a separate web service just to call a deployed model:
"The AI Projects client library is part of the Azure AI Foundry SDK and provides easy access to resources in your Azure AI Foundry Project." — Azure AI Projects client library for .NET
AIProjectClient is the project-scoped client — it is what you use to reach deployments, agents, and indexes, as opposed to a lower-level chat-completions client used only for inference calls:
"Enumerate AI Models deployed to your Foundry Project using the Deployments operations." — Azure AI Projects client library for .NET
"Create and enumerate Search Indexes using the Indexes operations." — Azure AI Projects client library for .NET
"Azure.AI.Projects can be used to create, update and delete Agents." — Azure AI Projects client library for .NET
To build and run a chat application with the SDK you must supply three things: the project/service endpoint URL, Microsoft Entra ID credentials (typically DefaultAzureCredential), and the model deployment name. The project's display name and a "task type" are not inputs the client needs.
"The samples authenticate by using DefaultAzureCredential, which comes from azure-identity." — Quickstart: Get started with Microsoft Foundry SDK
"your_project_endpoint: Your project endpoint, in the format https://<resource-name>.services.ai.azure.com/api/projects/<project-name>." — Quickstart: Get started with Microsoft Foundry SDK
Agents in Microsoft Foundry
An agent is configured declaratively: instructions, a model, and tools — no infrastructure to manage.
"You define prompt agents entirely through configuration, including instructions, model selection, and tools." — What is Microsoft Foundry Agent Service?
System instructions are what give the agent its role, constraints and expected behavior — not temperature (randomness), TPM (a capacity limit), or max completion tokens (response length).
Controlling tool calls: tool_choice
tool_choice value |
Behavior |
|---|---|
auto |
"The model decides whether to call tools." |
required |
"The model must call one or more tools." |
none |
"The model doesn't call tools." |
If an agent must always invoke a specific tool (e.g. an Azure Function) on every response, set tool_choice to required.
Save → test → publish
Saving an agent's configuration creates a new, immutable version; that version can immediately be tested in the Agents playground. Publishing is a distinct, explicit action:
"After you create the first version of a prompt-based agent, save subsequent changes as new versions." — Agent development lifecycle in Microsoft Foundry
"You can test unsaved changes in the agent playground." — Agent development lifecycle in Microsoft Foundry
"Publishing moves an agent from a development asset inside your Foundry project into a managed Azure resource that external consumers can call through a stable endpoint." — Publish your agent as an Agent Application
Consequences worth memorizing:
-
Saving ≠ publishing. Saving never auto-publishes; publishing is a separate step, and it is not required just to test in the playground.
-
An external application needs a published agent. Before publishing, only people with project access can reach the agent; publishing exposes it through a stable endpoint (and, for some agents, channels like Microsoft 365 Copilot/Teams).
-
Fine-tuning is not a publishing prerequisite. An agent can use an already-deployed model as-is.
-
Playground testing reflects the agent's own configuration (model, instructions, tools) — the same configuration the published/deployed agent uses — not a generic default or the model's bare behavior without instructions:
"Save and iterate on agent configurations before deploying." — Microsoft Foundry Playgrounds
"Edit, version, test, evaluate, monitor, and publish prompt-based agents from the Agents playground in the Foundry portal." — Agent development lifecycle in Microsoft Foundry
Finding an agent's ID for your own client code
The Foundry portal's playground Code view generates a runnable snippet, including the environment variable that identifies the agent to call — that is where you get the agent ID/name for a lightweight client app, not the model catalog, the project name, or the tool catalog:
"The chat-with-agent request reads the agent name from an environment variable:" — Quickstart: Get started with Microsoft Foundry SDK
Giving an agent a tool: Azure Language in Foundry Tools
To let an agent call Azure Language text-analysis capabilities (sentiment, key phrases, entities, summarization, etc.), configure the Azure Language MCP server — not a model deployment, an AI Search index, or a Speech endpoint:
"The Azure Language MCP server in the Foundry portal connects agents to Azure Language services through the Model Context Protocol (MCP)." — Azure Language tools and agents
The agent also needs a Foundry connection configured so it can authenticate to the Azure Language endpoint through that MCP server.
Evaluating generated responses
Evaluators measure quality and safety of what a deployed model/agent generates — they do not replace parameter configuration (like token limits) and they do not retrain anything automatically:
"Test your generative AI models and agents by running evaluations that measure performance, quality, and safety." — Run evaluations from the Microsoft Foundry portal
Evaluation produces scores/results for a human or pipeline to act on; it is not a self-retraining loop.
Exam traps
- Deployment name vs. model name: the
modelvalue in a request is always the deployment name, never the underlying model name. - Region first: before any other factor (token limits, REST support, authentication), confirm the model is available in the target Azure region.
- TPM changes throughput/scale, not response length, citations, or regional availability.
- Provisioned = guaranteed/dedicated throughput (PTUs); standard = shared, variable capacity.
- Max Completion Tokens caps cost and length (including reasoning tokens); temperature/Top P control randomness, not length or cost.
- Model leaderboard = where you compare LLM cost/quality/safety/throughput, not Compliance, Evaluator catalog, or Tools.
tool_choice:auto= model's choice,required= must call a tool,none= never calls a tool.- Saving an agent creates a version and allows playground testing; it does not publish it. Publishing is the separate step that exposes a stable endpoint to outside consumers.
- Fine-tuning/retraining is never a prerequisite for deploying a catalog model or publishing an agent.
AIProjectClientis the project-scoped class (deployments, agents, indexes, connections); it is not a chat-completions client.- Calling a deployed model needs: endpoint + credentials + deployment name. Playground history, training data, and display names are never required.
- Azure Language capabilities reach an agent through the Azure Language MCP server, not a model deployment or a Speech/Search resource.
- Evaluators assess quality/safety; they never auto-retrain a model or replace token-limit configuration.
Docs
- Deploy Microsoft Foundry Models in the Foundry portal
- Microsoft Foundry feature availability across cloud regions
- What is provisioned throughput for Foundry Models?
- Manage Azure OpenAI in Microsoft Foundry Models quota
- Azure OpenAI reasoning models
- How to use vision-enabled chat models - Microsoft Foundry
- Compare models using the model leaderboard
- Endpoints for Microsoft Foundry Models
- Azure OpenAI in Microsoft Foundry Models REST API reference
- Azure AI Projects client library for .NET
- Quickstart: Get started with Microsoft Foundry SDK
- What is Microsoft Foundry Agent Service?
- Tool best practices for Microsoft Foundry Agent Service
- Agent development lifecycle in Microsoft Foundry
- Publish your agent as an Agent Application
- Microsoft Foundry Playgrounds
- Azure Language tools and agents
- Run evaluations from the Microsoft Foundry portal