Build Generative Applications with Microsoft Foundry
The seven decisions behind a Foundry application
A team ships a chat feature against the Azure OpenAI endpoint, then picks up a requirement to answer from the company's uploaded PDFs. The model does not change. The code does, because file search is a Foundry platform tool, meaning a capability the model can invoke while it is producing a response, and platform tools are only reachable through the Responses API in the project endpoint[1], never through the direct model route. The Responses API is the request shape that carries those tools, and the third section takes it apart. One requirement, arriving late, moved the application onto a different endpoint. That is why this page walks its material in the order a build actually commits to it.
A platform tool is not the same thing as a Foundry Tool, despite the near-identical name: Foundry Tools are the prebuilt services such as Vision, Speech, and Content Safety, which have their own SDKs and their own tool-specific endpoints[1]. Everything on this page means the first sense.
Microsoft Foundry (formerly Azure AI Foundry, and Azure AI Studio before that) is the platform all of this runs on, and this is the first of three pages covering it for generative and agentic work. It starts from a single project endpoint and the two clients built from it, taking nothing else about Foundry as familiar, and ends with an application that constrains its own output, grounds its answers, coordinates several steps, and is graded by evaluators that name which stage failed. This page owns the application: the endpoint it connects to, the call it makes, the shape it demands back, the tools and retrieval attached to that call, the way several steps are coordinated, and the evaluators that grade the result. The page on building Foundry agents owns the agent object itself, meaning how a prompt agent or hosted agent is defined, versioned, and equipped with memory and knowledge tools. The page on optimizing and operationalizing owns what happens after the application works: prompt structure, sampling parameters, tracing, caching, and model routing.
The seven decisions, in build order
These seven names are used consistently for the rest of the page, and each has its own section below. The figure below lays them out as one spine.
- Connect: which endpoint the application is configured with, and which client objects it builds from it.
- Call: which of the three request routes carries a given call, and which deployment name goes in the
modelargument. - Output contract: whether the answer comes back as free text, as merely-parseable JSON, or as JSON bound to a schema you supply.
- Tools: which capabilities the model may invoke, and whether your process or the platform executes them.
- Grounding: where the facts in the answer come from, and which retrieval tool fetches them.
- Orchestration: how several agents or steps are sequenced when one call is not enough.
- Evaluation: which measurements tell you whether the result is good, and which failure each one isolates.
The order is not arbitrary. Each decision constrains the ones under it: the endpoint decides which call surfaces exist, the call surface decides which tools exist, and the tools decide which evaluators have anything to score. Read top to bottom the first time.
One project endpoint, two clients
Configuration for a Foundry application is one value. The Foundry SDK is a thin client over all Foundry project APIs reached through a single project endpoint[1] of the form https://<resource-name>.services.ai.azure.com/api/projects/<project-name>, where <resource-name> is the Foundry resource (or its custom subdomain, if the organization uses one) and <project-name> is the project inside it. Models, agents, tools, and evaluations all sit behind that one string.
From that endpoint the SDK gives you two client objects, because Foundry and OpenAI have different API shapes. The project client covers Foundry-native operations that have no OpenAI equivalent: reading project properties, listing and resolving connections, and enabling tracing. The OpenAI-compatible client, returned by get_openai_client(), covers everything modeled on OpenAI concepts: responses, conversations, files, vector stores (the indexed stores the file search tool queries, covered in the grounding section), evaluations, and fine-tuning. Most production applications hold both, and the figure below shows the split. A predictable early mistake is to reach for project.responses.create(...), which does not exist; responses live on the OpenAI-compatible client.
Building both clients (Python)
The AI-103 audience profile expects experience developing apps by using Python[2], so this page's listings are Python, and this one is the shape every later listing assumes: the project client is constructed once from the endpoint plus a credential, and the OpenAI-compatible client is derived from it rather than configured separately. The Python package is azure-ai-projects 2.x, installed with pip install "azure-ai-projects>=2.0.0".
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
project = AIProjectClient(
endpoint="https://<resource-name>.services.ai.azure.com/api/projects/<project-name>",
credential=DefaultAzureCredential(), # Entra ID token; no key in configuration
)
openai = project.get_openai_client() # OpenAI-shaped surface: responses, vector stores, evaluations
response = openai.responses.create(
model="gpt-5.2", # a DEPLOYMENT name in this project, not a catalog model id
input="What is the size of France in square miles?",
)
print(response.output_text)
# ... error handling and client cleanup omitted
DefaultAzureCredential is the Azure Identity credential chain: it tries environment variables, a managed identity, and the signed-in developer tooling in turn, so the same code runs locally and in production without a key. The model argument is discussed in the next section; it names a deployment, not a catalog model.
Connections keep credentials out of the application
A project connection is a named pointer from the project to an external resource. Connections let you authenticate to Microsoft and other resources within your Foundry projects[3] and are required for scenarios such as building standard agents or building with agent knowledge tools; different connection types support different authentication methods, and a Custom key connection stores keys alongside related properties such as targets and versions. For a tool, the connection holds the endpoint, the authentication selection, and any credentials, and the supported methods are key-based, Microsoft Entra with the agent identity, Microsoft Entra with the project managed identity, OAuth identity passthrough, and unauthenticated access[4]. Tool definitions then reference the connection by its project_connection_id instead of carrying the secret themselves, which is why an Azure AI Search tool definition[5] contains a connection resource ID and an index name but no key. Putting the downstream key in an environment variable or a tool header block works, and it also removes rotation and per-project scoping from the platform's hands, so the connection is the documented path.
Three things to carry forward from this section: one endpoint string configures the application, two clients come out of it and they are not interchangeable, and anything the application reaches outside Foundry arrives through a named connection rather than through a secret in your configuration.
Three routes out of the application
The endpoint an application is configured with decides what it can ever reach, so this is the decision with the longest shadow. Foundry exposes three request routes for model and agent traffic, drawn in the figure below, and a project that mixes model families uses more than one of them. Foundry Tools such as Vision and Speech sit outside this set on their own tool-specific endpoints.
The project endpoint carries the Responses API and is the only route to Foundry agents, Foundry-exclusive platform tools, and Foundry evaluations. The Azure OpenAI route, https://<resource-name>.openai.azure.com/openai/v1, offers the full OpenAI API surface with the best latency and maximum OpenAI compatibility[1], and it is where Chat Completions lives, but it does not provide access to agents, evaluations, or Foundry-exclusive tools. Anthropic Claude deployments answer on a third route, https://<resource-name>.services.ai.azure.com/anthropic, using the Anthropic Messages API and the Anthropic SDK rather than the OpenAI-compatible client. Two consequences follow directly. A chat application that later needs file search or a Model Context Protocol (MCP) server has to move off the direct Azure OpenAI route, and an application that adds a Claude deployment needs a second client path rather than a different model string.
Embeddings are the documented exception
The single-endpoint promise has one hole worth memorizing: the project endpoint used by the Foundry SDK doesn't currently route embedding requests[1]. An application that generates its own vectors sends those calls to the Azure OpenAI /openai/v1 endpoint[6] with the OpenAI SDK while the rest of it keeps talking to the project endpoint. The request is not transparently forwarded, so pointing an embedding call at the project endpoint fails rather than quietly working. Note that this only matters when the application builds its own vectors; the file search tool embeds on your behalf, which the grounding section covers.
The model argument names a deployment
On every route, the model argument carries the name of a deployment created in the project, not a catalog model identifier such as gpt-5.2. The two often look identical because deployments are conventionally named after the model they serve, and that convention is not a requirement. The practical consequence is that swapping models is a deployment-level change[7]: repointing a deployment at a newer version, or creating a same-named deployment backed by a different model, changes behavior without any code edit. The matching failure is a hard-coded catalog string that matches no deployment in the target project, which is why the same code can work in development and fail in production.
The takeaway for the exam is a two-part test. Ask first which route a scenario needs, because that is what the Foundry SDK, OpenAI SDK, and Anthropic SDK choices come down to, and ask second whether a stated model name is a deployment or a catalog entry.
Where the conversation state lives
Multi-turn behavior on the Responses API is a storage decision before it is a code decision, because the service keeps response history by default. The store parameter defaults to true[8], so a response is persisted and can be retrieved later. Three patterns follow from that default, and the figure below sets them side by side.
The lightest pattern passes previous_response_id on the next call. Because the prior turn is already stored, the service carries its context forward and the client sends only the new input, with no message array to rebuild and no conversation object to create. Rebuilding and resending the whole history when a response id already carries it is the classic wasted-token pattern here.
The second pattern creates a conversation object with conversations.create() and passes its id on each response. Items are appended to it automatically as responses generate, which gives several calls one shared thread of items rather than a chain of ids. Conversations are the state object Foundry agents are built around, so the Foundry agents page covers their lifecycle in depth; for a plain application, treat a conversation as a named container that a series of responses can share.
The third pattern turns persistence off. With store set to false the service does not persist the response, so previous_response_id has nothing to reference and the application must pass the earlier output items back as input on the next request. This is the pattern for zero-data-retention environments and for teams that want full control of conversation state, and its failure mode is quiet: a team sets store=false thinking of it as a logging switch, and follow-up turns arrive with no context at all. The two statements sit together cleanly once you read store as the thing that decides whether there is a server-side copy to point at, rather than as an audit setting.
A response also returns more than text. Alongside output_text, which holds the final assistant message, the call returns an output list of typed items such as message, function_call, function_call_output, code_interpreter_call, and reasoning. Inspecting what a turn actually did therefore means iterating response.output and switching on item.type, not reading the wording of the answer. That typed array is what the next two sections operate on.
Choosing the output contract
Ask what the caller of your application does with the answer. If a person reads it, plain text is the contract. If a parser reads it, the question becomes how much of the shape the model is actually obliged to honor, and there are two very different answers. The figure below stacks the three options by how much they guarantee.
JSON mode[9] constrains the model to emit syntactically valid JSON and stops there. Field names, types, nesting, and the presence of required keys are unenforced, so a downstream parser can still break on a renamed or missing property. Structured outputs is the stronger contract: it makes a model follow a JSON Schema definition that you provide as part of your inference API call[10], and the docs draw the same distinction, describing JSON mode as the older feature that guaranteed valid JSON but could not ensure strict adherence to the supplied schema. Reaching for JSON mode in a schema-driven extraction pipeline and then adding validation retries is solving at parse time a problem the generation call can enforce.
The supported schema subset
Structured outputs binds generation to your schema only when strict is set to true, and strict mode accepts a documented subset of JSON Schema rather than the whole specification. The rules that decide most exam items are these:
| Rule | Detail |
|---|---|
| All fields required | Every property must appear in required; a genuinely optional property is rejected |
| Optionality | Emulate an optional parameter with a union type that includes null, for example "type": ["string", "null"] |
additionalProperties |
Must be set to false on every object |
| Root type | A root object can't be the anyOf type; anyOf is supported below the root |
| Size | Up to 100 object properties in total, with up to five levels of nesting |
| Keywords | Type-specific keywords such as minLength, pattern, format, minimum, maximum, minItems, and uniqueItems are unsupported |
Definitions via $defs and recursive schemas using # are supported, so a nested structure does not force you out of strict mode. Key ordering in the output follows the order of the schema you send.
A strict schema on a request
The listing below is the response-format block from a Chat Completions request; the Responses API expresses the same thing through the response text format. It shows the four constraints from the table working together on one small object, and the prose above the table names each key it uses.
{
"type": "json_schema",
"json_schema": {
"name": "CalendarEventResponse",
"strict": true,
"schema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"date": { "type": "string" },
"venue": { "type": ["string", "null"] }
},
"required": ["name", "date", "venue"],
"additionalProperties": false
}
}
}
The venue property is the optional-field pattern: it is listed in required like every other property, and its optionality is expressed by allowing null in its type. Note two documented gaps before planning around this feature. Structured outputs are not supported with parallel function calls, so a request that uses both sets parallel_tool_calls to false, and the docs list Foundry Agent Service among the scenarios structured outputs are not currently supported with.
So the decision reduces to one question about the consumer and one about the schema: a parser downstream means structured outputs rather than JSON mode, and a schema that survives strict mode is one where every property is required, every object closes with additionalProperties: false, and optionality is spelled as a union with null.
Function tools and who executes them
Two things called tools behave in opposite ways, and the difference is simply who runs the code. Service-side tools such as Azure Functions, OpenAPI tools, and MCP tools are invoked by the platform. A plain function tool is not: the model can only ask for it, and your own process has to answer. Expecting Foundry Agent Service to execute a Python function you registered is the misread this section exists to remove.
When the model selects a client-side function tool, it emits a function_call item into the response's output array carrying three things: the function name, its arguments as a JSON string, and a call_id. The turn then suspends. Your application parses the arguments, runs the code, and posts a function call output item keyed to that same call_id; only then does the model produce its final message. A single response can carry several function_call items, as the docs show with a single tool called for three different locations in one turn[11], and each one needs its own output keyed to its own call_id. The figure below traces the whole loop, including the suspension in the middle that makes it two API calls rather than one.
Handling the suspended turn (Python)
This listing continues the openai client built in the connect section and fills in steps 4 and 5 of the figure: it walks the typed output array, executes each requested call, and sends the outputs back keyed by call_id.
tools = [{
"type": "function",
"name": "get_current_time",
"description": "Get the current time in a given location", # <= 1,024 characters
"parameters": {
"type": "object",
"properties": {"location": {"type": "string"}},
"required": ["location"],
},
}]
first = openai.responses.create(model="gpt-5.2", input=user_text, tools=tools)
follow_up = []
for item in first.output: # the typed output array, not the answer text
if item.type == "function_call":
result = dispatch(item.name, item.arguments) # your code, in your process
follow_up.append({
"type": "function_call_output",
"call_id": item.call_id, # must match the call_id the model emitted
"output": result,
})
second = openai.responses.create(
model="gpt-5.2",
previous_response_id=first.id, # the prior turn is already stored
input=follow_up,
)
print(second.output_text)
# ... argument validation and error paths omitted
The call_id is the join key of the whole exchange, and dispatch here stands in for your own router from a function name to a Python callable. Because the model fills the arguments from the tool name, description, and parameter schema alone, wrong-tool and bad-argument failures are fixed in the tool definition rather than in the prompt, and the docs cap tool and function descriptions at 1,024 characters.
Forcing or suppressing a tool call
tool_choice decides whether a tool has to be used on this turn. The default auto lets the model decide on its own whether to call a function and which one, which means it may answer from what it already knows and never touch the tool. Setting tool_choice to required makes it invoke one of its tools, which is how you guarantee that a retrieval or delegation step actually ran and that citations exist. You can also name one tool explicitly to force that specific function, or set none to force a user-facing message. This is worth holding onto for troubleshooting: an answer that comes back with no citations is often not a broken retriever but a model that simply chose not to call the tool, and the file search troubleshooting guidance recommends exactly this fix.
Grounding: file search or your own search index
Grounding is where the facts in an answer come from, and inside a Foundry application there are two managed paths to it. The choice turns on one question: does the corpus arrive as uploads from your application, or does an index for it already exist? The figure below draws both paths converging on the same model context.
When the application owns the documents
The file search tool takes documents your application uploads and handles the whole ingestion pipeline itself, the managed ingestion step in the figure below. Adding a file to a vector store automatically parses, chunks, embeds, and stores[12] it in a vector database supporting both keyword and semantic search, and at query time the tool rewrites the query, breaks complex queries into parallel searches, runs hybrid search, and reranks the results. Standing up a separate chunking and embedding pipeline in front of an upload duplicates work the tool already performs.
The defaults are documented, which makes them fair game for a question:
| Setting | Default |
|---|---|
| Chunk size | 800 tokens |
| Chunk overlap | 400 tokens |
| Embedding model | text-embedding-3-large at 256 dimensions |
| Maximum chunks placed in context per query | 20 |
The limits around a vector store matter just as much. Each store holds up to 10,000 files, the maximum file size is 512 MB, and each file should contain no more than 5,000,000 tokens. At most one vector store attaches to an agent and at most one to a conversation, so widening coverage means consolidating files into a single store rather than attaching several. Vector stores created through conversation helpers carry a default expiration policy of seven days after they were last active, and when one expires the runs on that conversation fail; the documented fix is to recreate the store with the same files and reattach it.
Where the files and vector stores physically live depends on the environment rather than on the code. Under basic agent setup, uploaded files sit in Microsoft-managed storage and vector stores are built on a Microsoft-managed search resource. Under standard agent setup, the same tool stores files in your connected Azure Blob Storage account and creates vector stores in your connected Azure AI Search resource. The documentation is explicit that the code is identical for both setups and the only variation is where your files and vector stores are stored, so a residency requirement is answered by the environment choice, not by a rewrite.
When an index already exists
The Azure AI Search tool retrieves documents from an index you already maintain[5] so the model can answer with inline citations. It is the right choice when an enriched index is already refreshed by your own indexer or skillset pipeline, because re-uploading that content into file search creates a second copy that drifts away from the source. The tool takes a project_connection_id and an index_name as required parameters, and optionally top_k, which defaults to 5, and query_type, which defaults to vector_semantic_hybrid and also accepts simple, vector, semantic, and vector_simple_hybrid. Two constraints shape designs around it: the tool can only target one index, and the search resource and the Foundry agent must be in the same tenant.
So the two paths differ in who owns ingestion, not in what the model finally sees. File search means the service ingests for you and you accept its chunking defaults; the Azure AI Search tool means you own ingestion and the agent consumes the result. The retrieval and grounding pipelines page covers building and enriching that index itself.
Retrieval, fine-tuning, and prompting
You get a requirement list asking for answers that track a product catalog updated nightly, always written in the company's support-desk voice, and rendered in the caller's language. It is tempting to read that as one problem with three candidate solutions. It is three problems, each with one right lever, and the figure below keys them to the question each one answers: how often does this thing change?
Retrieval-augmented generation (RAG) is the lever for facts that change faster than a model can be retrained, or that come in too many distinct values to fit in any prompt (high-cardinality facts, such as a per-customer price list). Microsoft's own guidance is to use RAG when you need answers grounded in private or frequently changing data, and to use fine-tuning when you need to change model behavior, style, or task performance rather than add fresh knowledge[13]. The application fetches the current source of truth at query time and puts it in the model's context, so the answer tracks the data rather than the weights. Fine-tuning is the lever for conventions that do not change: a house voice, a fixed output shape, a domain vocabulary. Encoding those in weights means they hold without spending prompt tokens on them at every call. The prompt itself carries what varies per session, such as the caller's language, entitlement tier, or the current date.
The fastest way to get this wrong is to fine-tune on volatile data. A catalog that changes daily, baked into weights, produces answers that were correct at training time and needs a retraining cycle at every refresh, which is exactly the cost RAG exists to avoid. The mirror-image mistake is prompting your way to a durable convention: pasting a two-page style guide into every request works and it also pays for that style guide in tokens on every call, forever.
Because the three answer different questions, a requirement set that names all three needs all three, and the levers combine without conflict. In practice a Foundry application that grounds on file search, calls a fine-tuned deployment, and passes session variables in its system instructions is using one of each, and the evaluation section is where you find out which of the three is actually failing.
Coordinating multiple steps
One call with several tools handles most applications. Coordination becomes its own decision when a process has stages that different agents own, such as a triage agent handing a refund case to a policy agent, or when a human has to approve that refund before the order moves on. Foundry offers two ways to express that, and which one you pick is now partly a calendar question.
A Foundry workflow is a declarative, predefined sequence of actions that orchestrates agents and business logic in a visual builder. Three templates cover the three coordination shapes, drawn in the figure below: Human in the loop asks the user a question and awaits input to proceed, Sequential passes the result from one agent to the next in a defined order, and Group chat dynamically passes control between agents based on context or rules[14]. In the Human in the loop shape the run pauses at the question and resumes only once the user answers. Reaching for Group chat when the process is a fixed pipeline adds nondeterminism to a sequence that has to be auditable; Sequential is the template for a process whose order is part of the requirement.
Inside a workflow, the common node types are Agent to invoke an agent, Logic for if/else, go to, or for each, Data transformation to set a variable or parse a value, and Basic chat to send a message or ask a question. Power Fx formulas compute values inside those nodes, and every variable reference needs a scope prefix: System. for system variables and Local. for local ones. Omitting the prefix does not silently resolve; it raises a Name isn't valid formula error, which the troubleshooting table resolves by adding the prefix. Two operational details are easy to miss. Foundry does not save workflows automatically, and each save creates a new, unchangeable version, visible under the Version dropdown.
Two limits that redirect the design
Hosted agents aren't supported in the workflow designer. A hosted agent is your own container image run by Foundry, as opposed to a prompt agent, which is declarative configuration the platform runs with no container of yours; the Foundry agents page covers both types in full. When a hosted agent has to coordinate other agents or run a multistep process, the guidance is to use Microsoft Agent Framework workflows from inside that agent's code. Planning a portal workflow around a hosted agent and only then discovering that agent nodes accept prompt agents is a costly ordering mistake.
The second limit is a date. Microsoft is retiring workflows on December 1, 2026, and directs new work to Microsoft Agent Framework. The capability itself is not disappearing: the same orchestration patterns are expressible in code or declarative YAML, the exported workflow YAML is the portable artifact to carry across, and after that date Foundry continues to run YAML-based workflow definitions when they are deployed as a hosted agent. The documented alternatives are Agent Framework for a code-first runtime, Azure Logic Apps if a fully visual low-code designer is the reason you wanted workflows, and a direct agent-to-agent (A2A) call for a lightweight hand-off between two agents. Agent Framework is available in Python and .NET, and its foundry package depends on the Foundry SDK to access Foundry models, tools, and project configuration[1], so a code-first orchestration still runs on the platform's hosted-agent runtime rather than needing hosting of its own.
For the exam, hold three things: which template matches which coordination shape, the two scope prefixes Power Fx requires, and the fact that the designer accepts prompt agents while hosted agents orchestrate in code.
Grading the application with evaluators
A retrieval-augmented application that answers badly has at least three possible culprits, and tuning the wrong one wastes a sprint. Evaluators exist to tell them apart, and the useful mental model is a map rather than a leaderboard (an analogy for how to read them, not Microsoft terminology): each evaluator watches one junction of the pipeline. The figure below pins each one to the stage it observes. Note that the first evaluator shares its name with a pipeline stage; capitalized Retrieval in this section always means the evaluator, and retrieval step always means the search that runs before generation.
Retrieval measures how effectively the system retrieves relevant information[15], Groundedness measures how grounded the response is in the retrieved context, and Relevance measures how relevant the response is with respect to the query. Reading those as three flavors of the same score is the trap. A fabricated citation is a Groundedness signal, because the answer went beyond what the context supported. An answer that misses the obviously right document is a Retrieval signal, and no amount of prompt work recovers context that never came back. An answer that is faithful to its context and still does not address what the user asked is a Relevance signal. Microsoft's own recommended combination for a RAG application is Retrieval plus Groundedness plus Relevance plus Content Safety, which is the same map read as a checklist.
Two Groundedness evaluators, two different answers
Groundedness returns a score from 1 to 5 using a model-based judgment, so it needs a judge model, meaning a model deployment of your own whose job is to score another model's output rather than to serve users, and it can rank a near-miss answer against a threshold. Groundedness Pro, which is in preview, uses the Azure AI Content Safety service instead, returns a binary pass or fail, and requires no model deployment. That makes Pro cheaper to stand up and unable to grade degrees, so a team that wants to route borderline answers to human review needs the graded evaluator, not the binary one.
Judges versus overlap metrics
The textual similarity family splits along whether it needs a reference answer. F1 Score, BLEU, GLEU, ROUGE, and METEOR all measure overlaps in n-grams or tokens between the response and a ground truth, so they are unusable when no labeled answer exists. Planning a BLEU or ROUGE gate for open-ended generation is therefore a dead end. Similarity, along with the general-purpose Coherence and Fluency evaluators and the RAG evaluators above, is AI-assisted: a judge model scores the output, so no reference text is required but a judge deployment is. Document Retrieval and Response Completeness sit on the ground-truth side of the same line.
Turn level or conversation level
One run-level setting quietly rejects otherwise sensible evaluator combinations. Each evaluator declares which levels it supports in supported_evaluation_levels, and an evaluation run carries an evaluation_level that is turn (individual agent responses) by default or conversation (entire multi-turn conversations, the same multi-turn exchange the state section called a conversation). All evaluators in a run must support the specified level, and you can't mix evaluators with incompatible levels in the same run. Name recognition is not a reliable guide to which is which, so check the catalog rather than assuming that an evaluator about satisfaction must be conversation level.
The scope line for this page ends here: choosing and reading evaluators for an application is part of building it, while calibrating a judge against human labels, writing custom weighted rubrics, and evaluating production traffic continuously belong to the optimize and operationalize page, and the agent-specific evaluators such as Intent Resolution and Tool Call Accuracy belong to the Foundry agents page.
Decision 2: the three call surfaces a Foundry application can use
| Property | Project endpoint (Responses API) | Azure OpenAI /openai/v1 | Foundry /anthropic route |
|---|---|---|---|
| Client library | OpenAI-compatible client returned by get_openai_client() | OpenAI SDK pointed at the Azure OpenAI resource | Anthropic SDK |
| Foundry agents and platform tools | Available | Not available | Not available |
| Multi-turn state | Stored server-side by default; previous_response_id continues the exchange | Caller resends the message array | Caller resends the message array |
| Embedding calls | Not routed by the project endpoint | Supported | Not offered |
| Foundry evaluations | Available | Not available | Not available |
| Pick it when | The app needs agents, platform tools, or Foundry evaluations | You want the plain OpenAI shape and the lowest latency | The deployment is an Anthropic Claude model |
Decision tree
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- One Foundry project endpoint fronts every project API, and AIProjectClient is built from it plus a credential
The Foundry SDK (Python package azure-ai-projects 2.x) is a thin client over all Foundry project APIs reached through a single project endpoint of the form https://.services.ai.azure.com/api/projects/. You construct AIProjectClient with that endpoint and a credential such as DefaultAzureCredential, so one configuration value covers models, agents, tools, and evaluations.
Trap Configuring the app with the Azure OpenAI resource endpoint (https://.openai.azure.com/openai/v1) instead - that surface serves model inference only and cannot reach Foundry agents, project connections, or evaluations.
16 questions test this
- A developer on your team builds a project client against your Foundry project endpoint and successfully lists the project's connections. She then tries to open a multi-turn chat with an agent the team
- Your Python service builds an AIProjectClient on a Microsoft Foundry project endpoint and uses it for the project's agents, connections, and evaluation runs. A new requirement screens customer-submitt
- Your team is standing up a new Python service inside a Microsoft Foundry project. The service creates agent versions, resolves the project's connections to external resources, and later runs evaluatio
- Your Foundry project runs in the application team's subscription. A shared platform subscription holds a different Foundry resource carrying the large chat deployment that the platform team wants ever
- You are wiring up a new Python application on a Foundry resource that hosts a single project. At startup it must construct an AIProjectClient that can invoke the project's agents, enumerate the projec
- Your Python service builds an AIProjectClient from your Foundry project endpoint and uses it for the project's agents and connections. The product team now wants a summarization feature that runs on a
- You are building a Python application on Microsoft Foundry that must invoke a deployed chat model, call a project agent, list the project's connections, and launch an evaluation run. Your team wants o
- A containerized Python service authenticates to a Microsoft Foundry project with a workload managed identity that already holds the Foundry User role. Every call the service makes returns 404 Not Foun
- Your team currently configures three environment variables for the application: an Azure OpenAI inference URL, an agents URL, and an evaluations URL, and they frequently drift out of sync across envir
- A contractor prototyping against your Foundry project asks to authenticate the Foundry SDK's project client with one of the Foundry resource's API keys, arguing that key authentication is faster to ar
- During a design review an architect claims that because the Foundry project endpoint fronts every project API, the application needs no other base URL at all. The application will create agent version
- Your Foundry application uses two clients: an AIProjectClient on the project endpoint for agents and evaluations, and a separate OpenAI SDK client pointed at your Azure OpenAI resource's /openai/v1 en
- Your team runs its agent orchestration inside an existing container app instead of packaging it as a Foundry hosted agent. The orchestrator is written with Microsoft Agent Framework and must reach Fou
- A single Microsoft Foundry resource in your subscription hosts two projects: a shared research project and a regulated claims project that keeps its own connections and agents. A new Python service mu
- A design review covers a Foundry application that reaches agents, connections, and evaluations through one project endpoint. A new feature must generate its own vector embeddings for a similarity inde
- You are adding a custom retrieval path to a Foundry chat application. The application already reaches its agent and conversation traffic through the project endpoint, and it must now generate its own
- The project client handles Foundry-native operations while get_openai_client() returns the OpenAI-shaped client
AIProjectClient exposes Foundry-native work that has no OpenAI equivalent - reading project properties, listing and resolving connections, and enabling tracing. Calling project_client.get_openai_client() returns an OpenAI-compatible client used for anything modeled on OpenAI shapes: responses, conversations, vector stores, evaluations, and fine-tuning. Most production apps instantiate both.
Trap Expecting the project client itself to expose response or conversation methods, for example project.responses.create(...), instead of going through the OpenAI-compatible client it hands out.
14 questions test this
- You are scripting the creation of a Foundry agent that uses the Azure AI Search tool. The index and the project connection to the search service already exist, and your deployment pipeline knows only
- A developer on your team builds a project client against your Foundry project endpoint and successfully lists the project's connections. She then tries to open a multi-turn chat with an agent the team
- Your Python service builds an AIProjectClient on a Microsoft Foundry project endpoint and uses it for the project's agents, connections, and evaluation runs. A new requirement screens customer-submitt
- You are wiring up a new Python application on a Foundry resource that hosts a single project. At startup it must construct an AIProjectClient that can invoke the project's agents, enumerate the projec
- Your Foundry application reaches its agents and evaluations through an AIProjectClient built on the project endpoint. You add a nightly job that embeds thousands of product documents so they can be in
- You are extending a Foundry application that already builds a project client from the project endpoint. The next milestone adds three capabilities: reading which external resources the project is conn
- You are building a Python application on Microsoft Foundry that must invoke a deployed chat model, call a project agent, list the project's connections, and launch an evaluation run. Your team wants o
- Your Foundry application already builds an AIProjectClient from the project endpoint and uses it to enumerate model deployments and resolve connections. A new milestone requires the application to lau
- During a design review an architect claims that because the Foundry project endpoint fronts every project API, the application needs no other base URL at all. The application will create agent version
- A developer inherits a Foundry application that holds only an OpenAI-compatible client obtained earlier from get_openai_client(). The next task is to read the project's properties, enumerate the proje
- You are instrumenting a Foundry agent application so that client-side spans land in the Application Insights resource already connected to the project. You do not want the Application Insights connect
- Your team runs a nightly regression evaluation for a Microsoft Foundry agent from a CI pipeline that authenticates to the project endpoint with a managed identity. The test set is a hand-curated JSONL
- Your team runs its agent orchestration inside an existing container app instead of packaging it as a Foundry hosted agent. The orchestrator is written with Microsoft Agent Framework and must reach Fou
- Your Foundry application must hold a multi-turn support session with a named agent so that each follow-up question sees the earlier turns. A developer creates the agent version through the project cli
- Embedding requests are not routed by the Foundry project endpoint
The project endpoint used by the Foundry SDK does not currently route embedding calls. An application that generates its own vectors must send embedding requests to the Azure OpenAI /openai/v1 endpoint with the OpenAI SDK, even while the rest of the application talks to the project endpoint.
Trap Assuming the 'single endpoint' promise is absolute and pointing an embedding call at the project endpoint, which fails rather than transparently forwarding.
5 questions test this
- Your Foundry application reaches its agents and evaluations through an AIProjectClient built on the project endpoint. You add a nightly job that embeds thousands of product documents so they can be in
- During a design review an architect claims that because the Foundry project endpoint fronts every project API, the application needs no other base URL at all. The application will create agent version
- Your Foundry application uses two clients: an AIProjectClient on the project endpoint for agents and evaluations, and a separate OpenAI SDK client pointed at your Azure OpenAI resource's /openai/v1 en
- A design review covers a Foundry application that reaches agents, connections, and evaluations through one project endpoint. A new feature must generate its own vector embeddings for a similarity inde
- You are adding a custom retrieval path to a Foundry chat application. The application already reaches its agent and conversation traffic through the project endpoint, and it must now generate its own
- Project connections hold external targets and credentials that tools reference by project_connection_id
A Foundry project connection stores an external resource's target URI plus its authentication material - custom keys, OAuth app registration, project managed identity, or agent identity. Tool definitions reference the connection by project_connection_id rather than carrying the secret, so credentials never appear in agent definitions, prompts, or application configuration.
Trap Shipping the downstream API key in an environment variable or in the tool's header block, which defeats rotation and removes per-principal attribution.
8 questions test this
- You are scripting the creation of a Foundry agent that uses the Azure AI Search tool. The index and the project connection to the search service already exist, and your deployment pipeline knows only
- Your Foundry agent uses an OpenAPI tool to call a partner pricing REST API that authenticates with an API key in a custom HTTP header. Security requires the key never appear in the agent definition, t
- Your Foundry project runs in the application team's subscription. A shared platform subscription holds a different Foundry resource carrying the large chat deployment that the platform team wants ever
- A Foundry project already holds connections to Azure AI Search, Azure Storage, and a partner API stored with custom keys. A new compliance standard requires every credential the project's tools use to
- A Foundry agent calls your company's internal ticketing MCP server. Each employee who chats with the agent must see only their own tickets, and the ticketing team's audit log has to attribute every ca
- Your Foundry agent reaches a partner inventory service through an MCP tool. The partner issues a bearer token that has to be rotated every 30 days, and your security team requires that the token never
- You are instrumenting a Foundry agent application so that client-side spans land in the Application Insights resource already connected to the project. You do not want the Application Insights connect
- A Foundry agent grounds its answers in an Azure AI Search index through the Azure AI Search tool. Your network team has now disabled public network access on the search service, which is reachable onl
- Claude models deployed in Foundry answer on a separate /anthropic route, not the OpenAI-compatible surface
Anthropic Claude deployments in Foundry are called through https://.services.ai.azure.com/anthropic using the Anthropic Messages API and the Anthropic SDK. They are not served by the OpenAI-compatible client, so an application that mixes model families needs a second client path.
Trap Assuming every catalog model is reachable through the same OpenAI-compatible responses call.
- A Responses call returns output_text plus a typed output array that exposes every tool invocation
openai.responses.create(...) returns output_text for the final assistant text and an output list of typed items such as message, function_call, file_search_call, and web_search_call. Inspecting tool behavior therefore means iterating response.output and switching on item.type, not parsing the answer text.
Trap Trying to infer which tool ran from the wording of the final message instead of reading the output items.
13 questions test this
- Your team ships a Foundry feature that calls the Responses API with the web search tool on a reasoning-capable model. The code reads response.output[0] and treats it as the assistant message, but it i
- Your Foundry app calls the Responses API with a custom function tool named get_order_status. To actually run the function, your code needs the exact arguments the model chose for this turn, and it mus
- You are building a Foundry-powered chat UI that must show small badges under each answer indicating which built-in tools the model used for that turn—for example a "Web" badge when it browsed and a "F
- Your Foundry chat backend calls the Responses API and chains every turn with previous_response_id; it never creates a conversation object. A customer disputes an answer the assistant produced last wee
- Your Microsoft Foundry order assistant calls the Responses API with a custom pricing function tool, and the service keeps no copy of the payload it sends. A tester reports one turn where the quoted pr
- Your team is migrating a Foundry chat backend from Chat Completions to the Responses API on the same deployment and the same guardrail configuration. A compliance feature logs, for every successful ca
- Your Microsoft Foundry chat backend streams Responses API output to a browser so users see tokens as they arrive, and token-by-token rendering is a product requirement. The backend retries only when a
- You built a customer-support app in a Microsoft Foundry project that calls the Responses API with a model configured with both the file search and web search tools. For an observability dashboard, you
- Your Foundry chat app answers from an internal vector store by using the file search tool through the Responses API. Support engineers need to know, for each answer, whether the model actually perform
- A developer on your team calls the Responses API with a custom function tool and logs response.output_text, expecting it to contain the function name and arguments the model produced so the app can ex
- Your team's Foundry procurement assistant calls the Responses API in a Microsoft Foundry project with a remote MCP server attached as an mcp tool, left at its default require_approval setting. During
- You are building a Python research assistant on a Microsoft Foundry project that calls the Responses API with both the web search tool and a custom function tool enabled. Product wants per-turn teleme
- A developer on your team consumes a Microsoft Foundry agent through the Responses API. Within one turn the agent may call a custom pricing function twice and then run a file search before it answers,
- Chat Completions maximizes OpenAI compatibility, but only the Responses API reaches Foundry agents and platform tools
The Azure OpenAI /openai/v1 surface offers the full OpenAI API shape with the lowest latency and best client-library compatibility. Foundry agents, Foundry-exclusive platform tools, and evaluations are only available through the Responses API served on the project endpoint, so a chat app that later needs agent tooling must move off the direct model route.
Trap Choosing the direct Azure OpenAI endpoint for a build that also needs file search, memory, or MCP tools.
10 questions test this
- A team is porting an existing chatbot that already uses the OpenAI Python SDK over to Azure. Their requirements are to reuse the existing OpenAI client library with the fewest code changes, get the lo
- Your Microsoft Foundry data pipeline must generate vector embeddings for a large product catalog at high volume so the vectors can be written to an Azure AI Search index for retrieval. The team alread
- A team ports a Python chat service from OpenAI to Azure by pointing the OpenAI client's base_url at their Foundry resource's /openai/v1 endpoint and authenticating with DefaultAzureCredential. Their g
- Your Python service authenticates with a managed identity and calls a gpt-4.1 deployment through the OpenAI SDK at your Azure OpenAI resource's /openai/v1 endpoint. The next release must also call Azu
- Your team is migrating a Foundry chat backend from Chat Completions to the Responses API on the same deployment and the same guardrail configuration. A compliance feature logs, for every successful ca
- Your team ships a chat feature today on the Azure OpenAI /openai/v1 endpoint using the Chat Completions API for maximum client-library compatibility. The roadmap for next quarter adds a Foundry agent
- Your Python service already calls GPT deployments through the OpenAI client pointed at your Foundry resource's /openai/v1 endpoint, and a security standard requires Microsoft Entra ID authentication.
- Your Foundry chat app answers from an internal vector store by using the file search tool through the Responses API. Support engineers need to know, for each answer, whether the model actually perform
- Your Python service in a Microsoft Foundry resource already calls two GPT deployments through the OpenAI SDK pointed at the resource's /openai/v1 endpoint. Product now adds an Anthropic Claude Sonnet
- You are building the backend for a Microsoft Foundry chat application that must ground answers with file search over a Foundry knowledge source, attach the memory tool so it can recall each user's ear
- Responses are stored server-side by default so previous_response_id continues a multi-turn exchange
Because the service persists response history, the next call can pass previous_response_id and inherit the prior turn's context without the client resending any messages. This is the lightest multi-turn pattern and needs no conversation object.
Trap Rebuilding and resending the whole message array on every turn when a response id already carries the context.
12 questions test this
- A Foundry customer-support assistant calls the Responses API with default settings and chains turns with previous_response_id; it creates no conversation object, and it logs every response ID it recei
- Your Foundry chat backend calls the Responses API and chains every turn with previous_response_id; it never creates a conversation object. A customer disputes an answer the assistant produced last wee
- A Microsoft Foundry analysis service calls a gpt-5 reasoning deployment through the Responses API under a zero-data-retention standard, so every request sets store to false and the client carries cont
- You are adding a long-running research feature to a Foundry application, where a single Responses API call against a reasoning model can run for several minutes. A data-handling standard for this work
- Your Microsoft Foundry order assistant calls the Responses API with a custom pricing function tool, and the service keeps no copy of the payload it sends. A tester reports one turn where the quoted pr
- A compliance rule forbids the Responses API from persisting any response content server-side for your Microsoft Foundry assistant, so you set store to false on every call. The assistant must still hol
- You are implementing a simple single-user assistant on the Responses API in a Microsoft Foundry project. The conversation is a straight linear back-and-forth with no branching and no need for a durabl
- A Microsoft Foundry retail assistant must let a shopper leave and return months later and pick up the same history, and support engineers must be able to open that history and see the tool calls and t
- Your team is about to build its own database to store conversation history for a multi-turn assistant that calls the Responses API in a Microsoft Foundry project, assuming the client must persist and
- You are adding multi-turn chat to a stateless serverless backend that calls the Responses API in a Microsoft Foundry project. Each turn runs in a fresh function instance with no local memory, and you
- You're building a multi-turn assistant on the Responses API in a Microsoft Foundry project. Turns are getting slow and request payloads large because the client resends the entire, growing message arr
- Your team's Foundry procurement assistant calls the Responses API in a Microsoft Foundry project with a remote MCP server attached as an mcp tool, left at its default require_approval setting. During
- Setting store=false stops persistence and forces the caller to resend prior output items
With store set to false the service does not persist the response, so previous_response_id has nothing to reference and the application must pass earlier output items back as input on the following request. This is the pattern for zero-data-retention environments and for teams that require full control of conversation state.
Trap Treating store=false as a logging switch and then finding follow-up turns have lost all context.
- The model argument names a deployment in the project, so model swaps are a deployment-level change
Inference calls pass the deployment name created in the Foundry project rather than a catalog model identifier. Repointing a deployment at a newer model version, or creating a same-named deployment of a different model, changes behavior without touching application code.
Trap Hard-coding a catalog model string that does not match any deployment name in the target project.
- Structured outputs bind generation to a JSON Schema only when strict is true and the schema follows the supported subset
Setting the response text format to json_schema with strict set to true makes the model conform to the supplied schema. The supported subset requires every property to be listed in required, objects to declare additionalProperties as false, and forbids anyOf at the schema root.
Trap Writing a natural schema with genuinely optional fields; strict mode rejects it because all properties must be required (model optionality by allowing null instead).
14 questions test this
- Your support assistant in a Microsoft Foundry project calls a deployed gpt-4.1 model through chat completions with a single function tool named get_refund_policy. In testing the model answered several
- You are implementing a loan-decision extractor in a Microsoft Foundry project. Each call must return either an approval object or a decline object, so a developer defines the strict json_schema with a
- Your reconciliation service in a Microsoft Foundry project feeds a deployed gpt-4o model's JSON output into a legacy downstream reader that assumes the object's keys appear in a specific, stable order
- You are enabling structured outputs for a candidate-profile extractor in a Microsoft Foundry project. Your JSON Schema includes middle_name and a security-clearance level that many resumes simply don'
- You add strict json_schema (structured outputs) to a function tool on the Azure OpenAI chat completions endpoint so the arguments the model generates always match your parameter schema. The same assis
- Your merchandising agent in a Microsoft Foundry project asks a deployed gpt-4o model to extract salient attributes from free-form product blurbs and write them to a JSON document that analysts later q
- You are building an incident-routing agent in a Microsoft Foundry project on a deployed gpt-4.1 model. Each response must include a category field whose value is exactly one of a small closed set (net
- You are building a contract-extraction service in a Microsoft Foundry project that sends agreement text to a deployed GPT-4.1 model and returns a fixed set of fields—contract id, counterparty, effecti
- During a design review for a Microsoft Foundry project, a developer states that switching the deployed model to response_format json_object will guarantee the response matches the team's documented sc
- Your team runs a purchase-order extraction service in a Microsoft Foundry project against a deployed gpt-4.1 model, using a response format of json_schema with strict enabled, so every reply carries e
- Your team builds a compliance-tagging service in a Microsoft Foundry project. A deployed gpt-4o model must return a strict json_schema object with nested tag objects, and no keys outside the declared
- You are building a Foundry project agent whose deployed gpt-4.1 model calls a client-side function tool. To make the arguments the model generates for that tool always conform to your JSON Schema, you
- Your team's invoice-extraction pipeline in a Microsoft Foundry project calls a deployed model with response_format set to json_object and instructs it in the system message to return invoice_number, t
- Your order-intake pipeline in a Microsoft Foundry project calls a deployed gpt-4o model with response_format set to json_object and then runs a JSON Schema validator; when a key is renamed or missing
- JSON mode guarantees parseable JSON but never guarantees your field names or types
JSON mode constrains the model to emit syntactically valid JSON and nothing more. Field names, nesting, types, and presence of required keys are unenforced, so a downstream parser can still break on a renamed or missing property. Only structured outputs enforces the contract itself.
Trap Selecting JSON mode for a schema-driven extraction pipeline and adding validation retries instead of enforcing the schema at generation time.
11 questions test this
- You are adding JSON mode to a summarization service in a Microsoft Foundry project so the model returns a JSON object your app can parse. You set response_format to json_object, but calls fail with a
- Your support assistant in a Microsoft Foundry project calls a deployed gpt-4.1 model through chat completions with a single function tool named get_refund_policy. In testing the model answered several
- Your reconciliation service in a Microsoft Foundry project feeds a deployed gpt-4o model's JSON output into a legacy downstream reader that assumes the object's keys appear in a specific, stable order
- Your merchandising agent in a Microsoft Foundry project asks a deployed gpt-4o model to extract salient attributes from free-form product blurbs and write them to a JSON document that analysts later q
- You are building an incident-routing agent in a Microsoft Foundry project on a deployed gpt-4.1 model. Each response must include a category field whose value is exactly one of a small closed set (net
- A summarization endpoint in a Microsoft Foundry project runs a deployed model with response_format json_object, and most responses parse cleanly, but a subset of long documents intermittently produces
- You are building a contract-extraction service in a Microsoft Foundry project that sends agreement text to a deployed GPT-4.1 model and returns a fixed set of fields—contract id, counterparty, effecti
- During a design review for a Microsoft Foundry project, a developer states that switching the deployed model to response_format json_object will guarantee the response matches the team's documented sc
- Your team runs a purchase-order extraction service in a Microsoft Foundry project against a deployed gpt-4.1 model, using a response format of json_schema with strict enabled, so every reply carries e
- Your team's invoice-extraction pipeline in a Microsoft Foundry project calls a deployed model with response_format set to json_object and instructs it in the system message to return invoice_number, t
- Your order-intake pipeline in a Microsoft Foundry project calls a deployed gpt-4o model with response_format set to json_object and then runs a JSON Schema validator; when a key is renamed or missing
- A client-side function tool suspends the turn until your application returns the call output
When a function tool is selected, the model emits a function_call item carrying name, JSON arguments, and a call_id. Your application executes the code and posts a function call output item keyed to that call_id; only then does the model produce its final message. Multiple function_call items can be emitted in one response and each needs its own output.
Trap Expecting Agent Service to run your Python function - only service-side tools such as Azure Functions, OpenAPI, and MCP tools are executed by the platform.
13 questions test this
- Your Foundry project agent registers a client-side function tool named get_account_balance. On a customer question, the agent returns a response whose only output item has type function_call, carrying
- An operations agent in a Microsoft Foundry project defines a client-side function tool get_service_health. A user asks for the status of three services in one message, and the agent's single response
- You are writing the handler loop for an agent in a Microsoft Foundry project that uses a client-side function tool. To dispatch to the right function, parse its inputs, and return a result the agent c
- Your support assistant in a Microsoft Foundry project calls a deployed gpt-4.1 model through chat completions with a single function tool named get_refund_policy. In testing the model answered several
- Your claims agent in a Microsoft Foundry project registers a client-side function tool that submits a fraud check to a partner service, and that check routinely takes 15 to 20 minutes to return. Your
- Your Foundry project agent exposes two client-side function tools, get_ticket_status and get_sla_deadline. A customer asks about both a ticket's state and its resolution deadline in one message, and t
- You are building an order-status agent on the Responses API in a Microsoft Foundry project and register a client-side function tool named get_order_status. On a user request, the model's response cont
- A developer new to Microsoft Foundry Agent Service registers a Python function as a function tool on an agent and expects the service to import and run that Python automatically each turn, the way the
- Your travel agent on the Responses API in a Microsoft Foundry project defines a get_weather function tool. A user asks for the weather in three cities in one message, and the model's single response r
- You build a returns agent in a Microsoft Foundry project that registers a client-side function tool named get_return_window. On a customer question the agent's run produces a response containing a fun
- Your team runs an agent in a Microsoft Foundry project that must call an internal inventory lookup on every relevant turn. The team wants the tool invocation handled by the platform, so that no always
- You are building a Foundry project agent whose deployed gpt-4.1 model calls a client-side function tool. To make the arguments the model generates for that tool always conform to your JSON Schema, you
- You build an agent in a Microsoft Foundry project with a client-side function tool named get_shipment_eta. On a user question the agent's first response comes back containing a function_call item with
- tool_choice=required forces a tool call on the turn while the default auto lets the model answer unaided
Setting tool_choice to required makes the model invoke one of its tools before answering, which is how you guarantee that a retrieval or delegation step actually ran and that citations exist. The default auto lets the model answer from parametric knowledge and skip the tool entirely.
Trap Diagnosing 'no citations returned' as a retrieval failure when the model simply chose not to call the tool.
- The file search tool owns ingestion, with documented chunking and embedding defaults you do not build yourself
Adding a file to a vector store triggers managed parsing, chunking, embedding, and indexing. Defaults are 800-token chunks with 400-token overlap, text-embedding-3-large at 256 dimensions, and a maximum of 20 chunks placed in context per query.
Trap Standing up a separate chunking and embedding pipeline before uploading, duplicating work the tool already performs.
10 questions test this
- Your Foundry agent is configured with the file search tool, and you uploaded a batch of policy documents with the Files API, but the agent never returns grounded answers from them. You confirm the fil
- You are building a Foundry agent that must answer from several hundred product PDFs your team uploads directly to the app. A teammate proposes first running every PDF through a separate service that s
- You are designing a Foundry support agent whose knowledge base is whatever product PDFs and Word files customers attach to their tickets at runtime. There is no pre-existing search index, and you want
- Your team is adding grounding to a Foundry support agent that uses the file search tool over an uploaded knowledge base. A developer wants to add a custom retrieval layer that rewrites the user's ques
- Your team's Foundry agent grounds answers with the file search tool over an uploaded product-manual vector store. A senior engineer wants to insert a custom stage that runs its own keyword search and
- Your Foundry agent must answer from two bodies of content: an existing Azure AI Search index of published API references that a platform team keeps current, and ad hoc design notes that individual eng
- You are planning a Foundry agent that grounds its answers on user-uploaded product manuals through the file search tool, and the team is debating how much ingestion machinery to build up front before
- Your team is building a Microsoft Foundry agent that must answer from roughly 3,000 research reports your analysts will upload. A data engineer proposes first standing up a standalone pipeline that sp
- You are configuring the file search tool for a Foundry agent over a knowledge base your users will upload. A teammate asks which embedding model deployment they must create in the project, and how man
- You are building a Foundry agent that must answer from several hundred internal policy PDFs your team will upload. A data scientist proposes pre-splitting every document into passages, standing up a d
- Basic agent setup keeps file-search data in Microsoft-managed stores while standard setup writes to your own resources
Under basic agent setup, uploaded files sit in Microsoft-managed storage and vector stores are built on a Microsoft-managed search resource. Under standard agent setup, the same tool writes files to your connected Azure Blob Storage account and creates vector stores in your connected Azure AI Search resource. The application code is identical; only data residency and control differ.
Trap Assuming that bringing your own storage and search requires rewriting the tool configuration or the retrieval code.
7 questions test this
- A healthcare ISV runs a Microsoft Foundry agent on basic agent setup, using the file search tool over clinical-guidance PDFs its staff upload. A new compliance mandate requires that every uploaded fil
- Your company runs a Foundry agent on standard agent setup so that all file-search data stays inside resources you own. During an audit you must tell the reviewer which of your connected Azure resource
- An internal enablement team wants a Foundry agent to answer from a handful of onboarding documents they upload. The content is non-sensitive, they have no data-residency or single-tenant obligations,
- Contoso Legal is deploying a Foundry agent whose file search grounds on confidential case files. Their security standard requires that every uploaded file and the vector store built from it live in si
- Your Foundry app currently runs on basic agent setup, and its file-search code uploads files, creates a vector store, and queries it. A new requirement moves the workload to standard agent setup so fi
- Your Foundry agent uses the file search tool over uploaded contract documents. Compliance requires that every uploaded file and the vector store built from it reside in Azure resources your organizati
- Two developers want to prototype a Microsoft Foundry agent that answers from a handful of internal wiki pages they will export and upload with the file search tool. The content is non-sensitive, there
- File search covers documents the app uploads; the Azure AI Search tool grounds on an index you already maintain
Choose file search when the corpus arrives as user or application uploads and you want the service to handle ingestion end to end. Choose the Azure AI Search tool when an enriched index already exists and is refreshed by your own indexer or skillset pipeline, so the agent consumes it rather than re-ingesting the content.
Trap Re-uploading documents that are already indexed, which creates a second copy that drifts out of sync with the source index.
10 questions test this
- Your Foundry agent is configured with the file search tool, and you uploaded a batch of policy documents with the Files API, but the agent never returns grounded answers from them. You confirm the fil
- You are building a Foundry agent that must answer from several hundred product PDFs your team uploads directly to the app. A teammate proposes first running every PDF through a separate service that s
- You are designing a Foundry support agent whose knowledge base is whatever product PDFs and Word files customers attach to their tickets at runtime. There is no pre-existing search index, and you want
- Your team is adding grounding to a Foundry support agent that uses the file search tool over an uploaded knowledge base. A developer wants to add a custom retrieval layer that rewrites the user's ques
- Your data platform team already runs an Azure AI Search index of engineering standards that a nightly indexer refreshes from SharePoint, complete with vector fields and a semantic configuration. You a
- Your Foundry agent must answer from two bodies of content: an existing Azure AI Search index of published API references that a platform team keeps current, and ad hoc design notes that individual eng
- Northwind Analytics maintains a curated Azure AI Search index of policy documents that its own skillset pipeline refreshes and re-embeds every night. A developer proposes also uploading the same PDFs
- You are planning a Foundry agent that grounds its answers on user-uploaded product manuals through the file search tool, and the team is debating how much ingestion machinery to build up front before
- Your data platform team already operates an Azure AI Search index of engineering standards that a nightly indexer refreshes from SharePoint, complete with vector fields and a semantic configuration. A
- You are building a Foundry agent that must answer from several hundred internal policy PDFs your team will upload. A data scientist proposes pre-splitting every document into passages, standing up a d
- RAG, fine-tuning, and prompt engineering solve three different problems and are combined, not chosen between
Ground volatile or high-cardinality facts with retrieval so answers track the source of truth; encode durable voice, formatting, and behavioral conventions with fine-tuning so they hold without prompt bloat; and carry per-session variables such as language or entitlement tier in the prompt. A requirement set that names all three needs all three.
Trap Fine-tuning on a catalog that changes daily, which bakes stale facts into weights and still needs retraining every refresh.
6 questions test this
- A bank's Microsoft Foundry agent already grounds its answers in current policy documents with RAG and is factually accurate. Regulators require that every response, for every customer, open with a fix
- Adventure Works' Foundry agent already retrieves accurate answers from a knowledge base, but reviewers complain that its replies ignore the company's mandatory response format and legal tone. The full
- A team plans a Foundry benefits assistant with three needs: it must answer from plan documents that change at each enrollment cycle, always use HR's approved tone and disclaimer format, and honor each
- Fabrikam's Foundry agent answers questions about an inventory catalog whose prices and stock change hourly. An engineer proposes fine-tuning the chat model each night on the latest catalog export so t
- A Foundry agent already grounds on a knowledge base with RAG and produces the company's voice via a fine-tuned model. The remaining requirement is per-conversation: each session must respond in the cu
- An IT-operations Foundry agent converts engineers' natural-language requests into your internal query language. Retrieval already supplies the current schema, yet the model's generated queries are fre
- One vector store attaches to an agent and one to a conversation, and conversation-created stores expire after inactivity
A vector store holds up to 10,000 files with a 512 MB per-file ceiling. At most one vector store can be attached to an agent and one to a conversation. Vector stores created through conversation helpers carry a default expiration of seven days after last activity, and runs on that conversation fail once it lapses.
Trap Attaching several vector stores to one agent to widen coverage instead of consolidating files into a single store.
- Foundry workflow templates cover human-in-the-loop, sequential, and group-chat coordination
A Foundry workflow is a declarative, versioned orchestration over agents and business logic. Human in the loop pauses to ask the user a question or collect an approval, Sequential passes each agent's result to the next in a fixed order, and Group chat hands control between agents dynamically based on context. Every save produces a new immutable workflow version.
Trap Reaching for Group chat when the process is a fixed pipeline; dynamic handoff adds nondeterminism to a sequence that must be auditable.
20 questions test this
- A developer-support assistant begins every conversation with a generalist agent. Some issues turn out to need a database-tuning specialist, others a networking specialist, and which one is needed only
- Your team is building an incident-investigation assistant for a complex outage. There is no fixed procedure: the assistant must work out an approach on the fly, deciding which logs to pull, which serv
- Your team migrated a Microsoft Foundry visual workflow into a Microsoft Agent Framework workflow that runs as a hosted agent. For audit reasons every claim must pass through the same three executors i
- Your team is preparing to migrate a Microsoft Foundry visual workflow, currently a sequential pipeline that includes a human-in-the-loop approval and if/else branching, off the retiring designer and i
- You are building a Microsoft Foundry workflow that runs each loan application through three prompt agents in one fixed order: an intake agent, then a risk-scoring agent, then a decision agent. Complia
- Your team is comfortable authoring code and YAML and wants to move an existing agent orchestration off the Microsoft Foundry visual workflow designer onto a supported, code-first runtime. The main req
- Your team ships a containerized hosted agent in a Microsoft Foundry project that runs a Microsoft Agent Framework workflow: a triage agent summarizes each incident, then a remediation agent calls a to
- Your team builds a Microsoft Foundry workflow that turns raw meeting notes into a published summary. A drafting agent writes a first draft, an editing agent rewrites it for tone, and a formatting agen
- You need to coordinate three prompt agents from your Microsoft Foundry project into one repeatable, auditable process. It must add if/else branching, set and read variables between steps, and pause fo
- Your team builds a marketing-copy pipeline on Microsoft Agent Framework. A copywriter agent drafts a slogan and a reviewer agent critiques it, and the reviewer must be able to send the draft back for
- A regulated asset manager runs every quarterly client report through the same three specialized agents: an extraction agent pulls figures from custody statements, a reconciliation agent validates them
- Several engineers edit a shared Microsoft Foundry workflow. A change made this morning degraded output quality, and your compliance lead needs to return to the exact configuration that ran yesterday a
- Your claims process runs as a containerized hosted agent in Microsoft Foundry, coordinating an intake agent, an assessment agent, and a payout agent in a fixed sequence with Microsoft Agent Framework.
- A utility's Microsoft Foundry workflow was created from the Sequential template and runs every outage report through a triage agent, a dispatch agent, and a customer-notification agent in that fixed o
- Your team operates a customer-support solution in Microsoft Foundry where a triage agent, a billing specialist agent, and a technical specialist agent share one conversation. Depending on what the cus
- A regulated insurer must run new claims through a set of steps that is identical and auditable on every run: validate, assess, then route. The business analysts who own the process cannot write code,
- You are building a Microsoft Foundry workflow that drafts outbound customer emails with a prompt agent. Company policy says no email may be sent until a human agent has read the draft and explicitly a
- You are designing a Microsoft Foundry workflow for a bank's case-intake process. When a customer message arrives it might need a fraud specialist, a credit specialist, or a compliance specialist, but
- Several engineers share one Microsoft Foundry workflow. Your compliance lead needs assurance that once a workflow definition is saved, that exact definition can never be silently altered in place, whi
- A support-triage service that you deploy as a Foundry hosted agent drains a queue of email tickets overnight using a Microsoft Agent Framework handoff orchestration: a triage agent routes each ticket
- Workflow branching uses Logic nodes and Power Fx expressions whose variables need System. or Local. prefixes
Workflow node types are Agent (invoke an agent), Logic (if/else, go to, for each), Data transformation (set or parse a variable), and Basic chat (send a message or ask a question). Power Fx formulas compute values inside these nodes and must prefix a variable with System. for built-in context or Local. for workflow variables.
Trap Referencing a variable without its scope prefix, which raises a 'Name isn't valid' formula error rather than silently resolving.
5 questions test this
- In a Microsoft Foundry visual workflow, an agent node returns a list of flagged transactions. For every item in that list, the workflow must run the same follow-up step, sending the transaction to a r
- You need to coordinate three prompt agents from your Microsoft Foundry project into one repeatable, auditable process. It must add if/else branching, set and read variables between steps, and pause fo
- A Microsoft Foundry visual workflow receives a shipping-status string from an upstream agent, but a later if/else branch needs a specific numeric field extracted from that string and stored as a workf
- A Microsoft Foundry workflow asks the customer how many licenses they need and saves the reply in a workflow variable. A Logic node then branches: orders above a set quantity go to an enterprise quoti
- In a Microsoft Foundry workflow, an Agent node returns a JSON object containing an extracted order number. A later node needs that order number held in a workflow variable so subsequent steps can refe
- Hosted agents cannot be nodes in the workflow designer, so their orchestration lives in code
The visual workflow designer accepts prompt agents from the project but does not support hosted agents as nodes. When a containerized hosted agent must coordinate other agents or run a multistep process, that orchestration belongs in its own code using Microsoft Agent Framework workflows.
Trap Planning a portal workflow around a hosted agent and discovering only prompt agents can be assigned to agent nodes.
15 questions test this
- Your orchestrator is existing Python code that uses a non-Microsoft agent framework and must persist working files and state across turns of a long-running session. You planned to drop it onto an agen
- Your team migrated a Microsoft Foundry visual workflow into a Microsoft Agent Framework workflow that runs as a hosted agent. For audit reasons every claim must pass through the same three executors i
- Your team is preparing to migrate a Microsoft Foundry visual workflow, currently a sequential pipeline that includes a human-in-the-loop approval and if/else branching, off the retiring designer and i
- Your team is comfortable authoring code and YAML and wants to move an existing agent orchestration off the Microsoft Foundry visual workflow designer onto a supported, code-first runtime. The main req
- Your team ships a containerized hosted agent in a Microsoft Foundry project that runs a Microsoft Agent Framework workflow: a triage agent summarizes each incident, then a remediation agent calls a to
- Your team builds a Microsoft Foundry workflow that turns raw meeting notes into a published summary. A drafting agent writes a first draft, an editing agent rewrites it for tone, and a formatting agen
- You own a Microsoft Foundry visual workflow that encodes a valuable multi-agent process, and the December 1, 2026 workflow retirement is approaching. You want to preserve the orchestration you already
- Your team packages a containerized hosted agent in a Microsoft Foundry project. That agent must run a multistep process that coordinates three other agents, passing work between them and reacting to i
- Your claims process runs as a containerized hosted agent in Microsoft Foundry, coordinating an intake agent, an assessment agent, and a payout agent in a fixed sequence with Microsoft Agent Framework.
- A regulated insurer must run new claims through a set of steps that is identical and auditable on every run: validate, assess, then route. The business analysts who own the process cannot write code,
- Several engineers share one Microsoft Foundry workflow. Your compliance lead needs assurance that once a workflow definition is saved, that exact definition can never be silently altered in place, whi
- In a Microsoft Foundry workflow, an Agent node returns a JSON object containing an extracted order number. A later node needs that order number held in a workflow variable so subsequent steps can refe
- Your operations team relies on the Microsoft Foundry visual workflow designer mainly because it is a no-code canvas, and their process interleaves many deterministic steps, such as connectors to line-
- In a Microsoft Foundry project you have a general assistant agent that occasionally needs one specific task done, currency conversion, by an existing specialized agent. There is no multi-step process
- A support-triage service that you deploy as a Foundry hosted agent drains a queue of email tickets overnight using a Microsoft Agent Framework handoff orchestration: a triage agent routes each ticket
- Microsoft Agent Framework expresses the same orchestrations in code and deploys as a hosted agent
Agent Framework provides sequential, concurrent, handoff, and group-chat orchestrations in Python and .NET, authored as code or declarative YAML. Foundry is moving workflow authoring to this code-first model, and the result runs on the platform when packaged and deployed as a hosted agent.
Trap Assuming a code-first orchestration needs its own hosting; the hosted agent runtime supplies the endpoint, scaling, and identity.
- Groundedness returns a graded 1-5 model judgment while Groundedness Pro returns pass/fail from Content Safety
The Groundedness evaluator uses a judge model you deploy and reports a 1 to 5 score against the retrieved context. Groundedness Pro (preview) calls the Azure AI Content Safety service instead, returns a binary pass or fail, and requires no judge-model deployment - so it costs less to stand up but cannot rank near-miss answers.
Trap Selecting Groundedness Pro when the team needs a graded threshold for routing borderline answers to review.
12 questions test this
- During a security review of a Foundry evaluation pipeline, you must document which managed component actually produces the verdict when the team uses the Groundedness Pro evaluator on a RAG assistant.
- A colleague is adding reviewer routing on top of a Foundry evaluation run and reports that the Groundedness Pro results include a score of 4 out of 5 for several responses, and wants to send every res
- A compliance team audits a Foundry RAG assistant for regulated disclosures and finds that the standard Groundedness evaluator, with its well-rounded definition, passed answers that subtly embellished
- A mortgage-underwriting assistant on Foundry answers from a policy corpus, and your reviewers want to auto-accept clearly grounded answers, auto-reject clearly ungrounded ones, and send only the borde
- A Microsoft Foundry evaluation run for a medical-billing assistant currently uses Groundedness Pro, and the results are a single pass or fail per response. Product now wants three review tiers driven
- A Microsoft Foundry RAG agent drafts quarterly finance summaries from retrieved filings. Reviewers find that some summaries include a specific revenue figure and a source reference that appear in none
- Your platform team runs a nightly grounding check on a Foundry RAG assistant and wants the evaluator's judgment to come from a specific Azure OpenAI GPT deployment they already govern for cost and reg
- Your team must add a grounding check to a Foundry evaluation run for a customer-support RAG assistant. Governance rules prevent you from deploying and maintaining an extra GPT judge model inside the p
- Your organization's compliance policy forbids deploying any additional generative model into the Foundry project used by an IT knowledge-base assistant, yet you still must run an automated grounding g
- You must add a grounding signal to a Microsoft Foundry evaluation run for a travel-booking agent, and cost review flags two concerns: minimize the number of Azure OpenAI model deployments the evaluati
- You are building a RAG-based HR policy assistant on Microsoft Foundry and need your evaluation run to automatically detect answers that assert claims not supported by the retrieved policy passages. An
- You operate a Microsoft Foundry RAG assistant that answers homeowners insurance claim questions from a policy corpus. Reviewers want every generated answer scored for how well the retrieved policy tex
- Retrieval, Groundedness, and Relevance each isolate a different failure in a RAG application
Retrieval scores how effectively the search step surfaced and ranked useful context, Groundedness scores whether the answer is actually supported by that context, and Relevance scores whether the answer addresses the user's query at all. A fabricated citation is a Groundedness signal; 'the right document never came back' is a Retrieval signal.
Trap Tuning the prompt when Retrieval scores are the ones failing, which cannot recover context that was never returned.
11 questions test this
- A Microsoft Foundry RAG assistant over a product-manual index gives wrong answers for a cluster of questions. You confirm the correct manual section is in the index, but the passages handed to the mod
- A Foundry RAG assistant over a pharmacy drug-interaction corpus is failing a cluster of questions. On that failing set the Retrieval scores are low while Groundedness and Relevance are high, and a dev
- A Microsoft Foundry RAG agent drafts quarterly finance summaries from retrieved filings. Reviewers find that some summaries include a specific revenue figure and a source reference that appear in none
- A Foundry RAG agent drafts answers for a tax-preparation assistant. Reviewers find that some answers include a specific deduction figure and a cited form section that do not appear in any passage the
- Your search team has human relevance labels for a benchmark query set and wants to tune the RAG search parameters, comparing chunk size and vector-versus-semantic ranking by scoring how well retrieved
- Your team must add a grounding check to a Foundry evaluation run for a customer-support RAG assistant. Governance rules prevent you from deploying and maintaining an extra GPT judge model inside the p
- Reviewers of a Foundry RAG assistant for a benefits-eligibility workflow confirm that its answers never state anything unsupported by the retrieved policy text and stay on topic, but they routinely le
- You evaluate a Foundry RAG assistant for a government-benefits helpline. For a set of answers, Retrieval and Groundedness both score high, yet users complain the replies, though accurate and drawn fro
- You are building a RAG-based HR policy assistant on Microsoft Foundry and need your evaluation run to automatically detect answers that assert claims not supported by the retrieved policy passages. An
- Your Microsoft Foundry RAG team wants to measure whether the search step is returning useful context for real user questions, but they have not built any human relevance labels for their query set and
- You operate a Microsoft Foundry RAG assistant that answers homeowners insurance claim questions from a policy corpus. Reviewers want every generated answer scored for how well the retrieved policy tex
- Every evaluator in a run must support the run's evaluation_level, which is turn by default
evaluation_level is set to turn (individual responses, the default) or conversation (the whole multi-turn interaction). Each evaluator declares its levels in
supported_evaluation_levels, and every evaluator in a run must support the run's level, so you cannot mix incompatible levels. Customer Satisfaction, Task Completion, Coherence and Groundedness support both levels, whereas the tool-call and safety evaluators are turn-only and cannot be added to a conversation-level run.Trap Assuming an evaluator's name implies its scope. Customer Satisfaction and Task Completion sound conversation-only but support both levels; the tool-call and safety evaluators are the turn-only ones that will break a conversation-level run.
7 questions test this
- Your Microsoft Foundry conversation-level evaluation run for a multi-agent booking assistant keeps getting rejected before it starts. Your selected evaluators are Customer Satisfaction, Task Completio
- You configure a Foundry evaluation run for a multi-turn travel-planning agent and want a single evaluator that judges whether the agent maintains consistent reasoning and topic flow across the entire
- A data scientist evaluating a multi-turn support agent needs to pinpoint which individual assistant reply in each long conversation produced a low-quality answer, so a problem can be traced to a speci
- A team wants a single Microsoft Foundry evaluation run at conversation level for a multi-turn concierge agent, covering overall user satisfaction, end-to-end task success, cross-turn logical flow, and
- Your team wants one evaluator for a multi-turn customer-service agent that reports overall user satisfaction across the entire conversation, capturing helpfulness, tone, and whether the user's issue w
- You submit a Microsoft Foundry evaluation over a set of multi-turn support dialogs but do not set evaluation_level anywhere in the run configuration. You expected one score per conversation, yet the r
- You are configuring a Microsoft Foundry evaluation run to score whole multi-turn conversations from a customer-service agent, so you set evaluation_level to conversation. You select Customer Satisfact
- N-gram similarity metrics need reference answers, while AI-assisted judges need a judge model deployment
F1 Score, BLEU, GLEU, ROUGE, and METEOR are deterministic overlap metrics computed against ground-truth references, so they are unusable without labeled answers. Coherence, Fluency, Relevance, and Similarity are AI-assisted evaluators that call a judge model and can score outputs with no reference text.
Trap Planning a BLEU or ROUGE gate for open-ended generation where no reference answer exists.
References
- Get started with Microsoft Foundry SDKs and endpoints
- Microsoft Certified: Azure AI Apps and Agents Developer Associate (Exam AI-103)
- Add a new connection to your project
- Set up MCP server authentication
- Connect an Azure AI Search index to Foundry agents
- Embeddings with Azure OpenAI in Microsoft Foundry Models
- Deployments overview for Microsoft Foundry
- Azure OpenAI Responses API
- How to use JSON mode with Azure OpenAI in Microsoft Foundry Models
- How to use structured outputs with Azure OpenAI in Microsoft Foundry Models
- How to use function calling with Azure OpenAI in Microsoft Foundry Models
- File search tool for Microsoft Foundry agents
- Retrieval augmented generation (RAG) and indexes in Microsoft Foundry
- Build a workflow in Microsoft Foundry (Preview)
- Built-in evaluators reference