SaveMyCert
Log in
5 of 5 free questions left today·for 30 a day
AI-103 · Domain 2

Implement generative AI and agentic solutions practice questions

Implement generative AI and agentic solutions is worth 33% of the AI-103 exam — the heaviest of the 5 domains. Building generative applications and agents with Microsoft Foundry: model deployment, RAG, tool-augmented and multi-agent workflows, evaluation, prompt and parameter tuning, and observability. Official weighting 30–35%. 6 fully worked examples are further down this page, answers included.

Exam weight
33%
the heaviest of the 5 domains
Questions
186
across 3 topics
Free, no account
5/day
a free account allows 30 a day
Explanations
Every option
right and wrong

Build a practice session

5 free questions left today.

Domains

How many?

Mode

Ready when you are

10 fresh questions drawn across 1 of 5 domains, in Learn mode.

Focused review

Every question you answer incorrectly, and every question you flag while practising, is saved here automatically. Finish a session and you can come back to re-drill just those.

6 sample Implement generative AI and agentic solutions questions, fully explained

Questions from the AI-103 bank mapped to domain 2, with the answer key and the reasoning behind every option. None of them repeat the examples on the main AI-103 practice page.

Question 1Implement generative AI and agentic solutions

A Python app on Azure Container Apps builds an AIProjectClient by passing the Foundry resource's API key wrapped in AzureKeyCredential, and the client fails to authenticate. The container app's system-assigned managed identity already holds the Foundry User role on the project. What should the developer change so the app connects with the fewest code changes?

Choose one.

  • a
    Read the API key from Key Vault and keep AzureKeyCredential

    Moving the key into Key Vault improves secret storage, but the client still receives a key, and AIProjectClient doesn't accept key authentication.

  • b
    Pass DefaultAzureCredential() as the client's credential Correct

    AIProjectClient authenticates with Microsoft Entra ID only. DefaultAzureCredential picks up the container app's managed identity, which already has the Foundry User role.

  • c
    Set the key in the AZURE_OPENAI_API_KEY environment variable

    That variable is read by the classic AzureOpenAI client samples. AIProjectClient ignores it and still needs a token credential.

  • d
    Grant Cognitive Services OpenAI User and keep the key credential

    A role assignment only matters to Entra ID tokens. While the code passes a key, the extra role has no effect, and Foundry User already covers the project.

The concept

The Foundry project client (azure-ai-projects) authenticates with Microsoft Entra ID tokens through a TokenCredential.

Why that’s the answer

The azure-ai-projects README states that Entra ID is the only authentication method the client currently supports. The fix is to pass a TokenCredential: DefaultAzureCredential resolves to the managed identity in Azure and to the developer's az login locally. Storing the key in Key Vault or an environment variable still hands the client a key, and adding a role does nothing while the request carries a key instead of a token.

How to reason it out
  1. Note the symptom: key-based credential rejected by AIProjectClient.
  2. Recall that AIProjectClient accepts Entra ID tokens only.
  3. Use the identity that already has Foundry User: DefaultAzureCredential finds it.
  4. Reject options that keep a key credential in place.

Exam tip: AIProjectClient takes a token credential such as DefaultAzureCredential, never an API key.

AI-103: Build Generative Apps with Foundry — Models, RAG, Tools and Evaluation — the lesson that teaches this.

Question 2Implement generative AI and agentic solutions

A developer adds keyless calls to a gpt-4.1-mini deployment on the Foundry resource contoso-ai. The code must use the v1 API so that it never pins a dated api-version.from openai import OpenAI from azure.identity import DefaultAzureCredential, get_bearer_token_provider token_provider = get_bearer_token_provider( DefaultAzureCredential(), "https://ai.azure.com/.default" ) client = OpenAI( base_url=BASE_URL, api_key=token_provider, )Which value should BASE_URL hold?

Choose one.

  • a
    "https://contoso-ai.openai.azure.com/openai/deployments/"

    The /openai/deployments/ path belongs to the older dated API, which expects the AzureOpenAI client and an api-version query parameter.

  • b
    "https://contoso-ai.openai.azure.com/openai/v1/" Correct

    The v1 API is reached by appending /openai/v1/ to the resource endpoint; the OpenAI() client then needs no api-version and refreshes the Entra token through the provider.

  • c
    "https://contoso-ai.openai.azure.com/openai/"

    Without the v1 segment the OpenAI() client builds paths such as /openai/responses, which the service does not serve without a dated api-version.

  • d
    "https://contoso-ai.services.ai.azure.com/api/projects/default"

    This is a project endpoint for AIProjectClient. The OpenAI() client appends paths such as /responses to it, and the service does not serve them without /openai/v1 after the project path.

The concept

The Azure OpenAI v1 API lets the standard OpenAI() client call Foundry deployments through base_url <endpoint>/openai/v1/ with no api-version.

Why that’s the answer

With the v1 GA API, you pass the resource endpoint plus /openai/v1/ as base_url and set api_key to a bearer-token provider for keyless auth; the client refreshes tokens itself. The deployments path and the bare /openai/ path belong to the dated API surface, and a project endpoint is meant for AIProjectClient (which can hand you a pre-configured OpenAI client through get_openai_client()).

How to reason it out
  1. Spot the client: plain OpenAI(), not AzureOpenAI().
  2. Recall the v1 rule: append /openai/v1/ to the endpoint, drop api-version.
  3. Confirm the token provider replaces a static key.
  4. Reject the dated-API paths and the project endpoint.

Exam tip: OpenAI(base_url='https://<resource>.openai.azure.com/openai/v1/', api_key=token_provider) is the keyless v1 pattern.

AI-103: Build Generative Apps with Foundry — Models, RAG, Tools and Evaluation — the lesson that teaches this.

Question 3Implement generative AI and agentic solutions

A team's Python app uses the AzureOpenAI client and is updated every few months to a new dated api_version so it can use new features. The team wants to stop chasing API versions and keep its code close to the standard OpenAI library. Which change should the team make?

Choose one.

  • a
    Keep AzureOpenAI() and pin api_version to the newest preview

    Pinning the newest preview still ties the app to a dated version that must be bumped again for the next feature, and preview versions are not meant for production.

  • b
    Use OpenAI() with the /openai/v1/ base URL and a dated api_version

    The v1 GA API does not require an api-version. Adding one back keeps the version-chasing the team wants to stop.

  • c
    Use the OpenAI() client with the /openai/v1/ base URL and no api_version Correct

    The v1 API removes dated api-version parameters and works with the standard OpenAI() client, including automatic token refresh.

  • d
    Switch to AIProjectClient and authenticate it with the resource API key

    AIProjectClient is a reasonable SDK, but it authenticates with Entra ID only, so a key credential fails.

The concept

The v1 API decouples Azure OpenAI code from monthly dated API versions.

Why that’s the answer

Since August 2025, the v1 API lets you use the standard OpenAI() client against <endpoint>/openai/v1/ without an api-version, and features arrive without version bumps. Pinning a newer preview just restarts the cycle, re-adding an api-version defeats the point, and AIProjectClient rejects key credentials.

How to reason it out
  1. Identify the pain: dated api_version upgrades.
  2. Recall what the v1 API removes: the api-version parameter and the Azure-specific client.
  3. Pick the option that uses OpenAI() with /openai/v1/ and nothing pinned.

Exam tip: v1 API = standard OpenAI client + /openai/v1/ + no api-version.

AI-103: Build Generative Apps with Foundry — Models, RAG, Tools and Evaluation — the lesson that teaches this.

Question 4Implement generative AI and agentic solutions

A Foundry resource has a deployment named summarizer that runs gpt-4.1-mini. An app calls client.responses.create(model="gpt-4.1-mini", input=text) through the /openai/v1/ endpoint and receives HTTP 404 with the code DeploymentNotFound. What should the developer change?

Choose one.

  • a
    Pass model="gpt-4.1-mini-2025-04-14" in the request

    Adding the model version still names the base model, not the deployment, so the lookup fails the same way.

  • b
    Add api-version=2025-04-01-preview to the base URL

    The v1 endpoint doesn't need a dated api-version, and adding one does not change how the model value is resolved.

  • c
    Call client.chat.completions.create with the same model

    Switching API surfaces keeps the wrong model value, so chat completions returns the same DeploymentNotFound error.

  • d
    Pass model="summarizer" in the request Correct

    For a deployed model, the model parameter carries the deployment name. The deployment is called summarizer, so that is the value the service looks up.

The concept

Requests to Foundry model deployments identify the target by deployment name.

Why that’s the answer

The samples say it plainly: 'Replace with your model deployment name.' A deployment can have any name, so the service resolves model= against deployment names, and gpt-4.1-mini is not one here. A versioned model ID, a dated api-version or a different API surface all leave that lookup unchanged.

How to reason it out
  1. Read the error: DeploymentNotFound means the model value matched no deployment.
  2. Recall that model= takes the deployment name.
  3. Use the deployment's name, summarizer.

Exam tip: model= is the deployment name you chose, not the catalog model name.

AI-103: Build Generative Apps with Foundry — Models, RAG, Tools and Evaluation — the lesson that teaches this.

Question 5Implement generative AI and agentic solutions

A developer is building a code-review assistant on one Foundry resource. It calls a gpt-5.1-codex deployment to review pull requests and a DeepSeek-R1 deployment to write release notes. Both calls currently use client.chat.completions.create through the resource's /openai/v1/ endpoint; the release-notes call works, but the review call fails. The developer wants to keep one OpenAI() client and one endpoint. Which TWO actions should the developer take? (Select TWO.)

Choose TWO.

  • a
    Send the gpt-5.1-codex review call to the Responses API instead Correct

    gpt-5.1-codex is listed as Responses API only, so its requests must go to the Responses API.

  • b
    Keep the review call on chat completions with a dated preview api-version

    The codex model does not support chat completions on any API version, so pinning a preview version does not help.

  • c
    Move the DeepSeek-R1 release-notes deployment into a separate project

    Partner models sold by Azure are served through the same /openai/v1/ endpoint, so a second project and client add work without fixing the codex call.

  • d
    Keep the DeepSeek-R1 release-notes call on v1 chat completions Correct

    The v1 API supports chat completions for partner models such as DeepSeek through the same base URL, and that call already works.

  • e
    Redeploy gpt-5.1-codex under a new name as Data Zone Standard

    Data Zone Standard changes where data is processed and how capacity is billed, not which API surface the model supports.

The concept

Each model supports specific API surfaces; codex models use the Responses API, and the v1 endpoint also serves partner models through chat completions.

Why that’s the answer

Two facts combine. The Foundry model catalog lists gpt-5.1-codex (and the other codex models) as Responses API only, so the failing call must move to responses.create. Separately, the v1 API accepts chat completions for models from other providers such as DeepSeek on the same base URL, so the working release-notes call stays as it is, and one client serves both. Version pinning, a second project or a new deployment type don't change which API a model supports.

How to reason it out
  1. Find the failing call: the codex model on chat completions.
  2. Recall that codex models are Responses API only.
  3. Recall that partner models like DeepSeek work through v1 chat completions on the same endpoint.
  4. Reject changes to api-version, project layout or deployment type.

Exam tip: Codex models speak Responses only; one v1 endpoint still serves both OpenAI and partner models.

AI-103: Build Generative Apps with Foundry — Models, RAG, Tools and Evaluation — the lesson that teaches this.

Question 6Implement generative AI and agentic solutions

An insurance app sends a photo of a damaged windscreen, stored as a local JPEG on the app server, with the question "Is the crack in the driver's line of sight?" to a vision-capable model through the Responses API. Which content item should the app add to the input message alongside the input_text item?

Choose one.

  • a
    {"type": "input_image", "image_url": "data:image/jpeg;base64,<data>"} Correct

    The Responses API takes images as input_image items, and a local file is sent as a base64 data URI with its MIME type.

  • b
    {"type": "input_text", "text": "data:image/jpeg;base64,<data>"}

    Inside an input_text item the data URI is plain text, so the model receives a long string of characters instead of an image.

  • c
    {"type": "image_url", "image_url": {"url": "C:/claims/glass.jpg"}}

    This shape comes from Chat Completions, and a local disk path is not reachable by the service in either API.

  • d
    {"type": "input_image", "image_url": "file:///srv/claims/windscreen.jpg"}

    The item type is right, but a file:// path points at the app server's disk, which the model service cannot read.

The concept

Multimodal models receive images as dedicated image content items, sent either as a reachable URL or as a base64 data URI.

Why that’s the answer

In a Responses API request, an image is an input_image content item whose image_url holds an https URL or a data URI such as data:image/jpeg;base64,... (PNG, JPEG, WebP and non-animated GIF are supported). A data URI inside input_text is only text. A local path, written as a plain path or file://, is never reachable from the service, whatever the item type.

How to reason it out
  1. Note that the image is local, so it can't be passed by URL.
  2. Recall the Responses API image item: input_image.
  3. Encode the file as a base64 data URI with the image/jpeg MIME type.

Exam tip: Local images go to the model as input_image with a base64 data URI.

AI-103: Build Generative Apps with Foundry — Models, RAG, Tools and Evaluation — the lesson that teaches this.

What AI-103 domain 2 tests, topic by topic

The official exam guide breaks Implement generative AI and agentic solutions into 3 topics. The question bank follows the same split, so a weak topic shows up as a cluster of misses you can go back and read.

Published AI-103 practice questions per topic in Implement generative AI and agentic solutions
TopicWhat it coversQuestions
Build generative applications by using FoundrySkills outline section (AI-103, as of April 16, 2026). Deploy and consume LLMs, small models, code models, and multimodal models; Implement retrieval-augmented generation (RAG) in an application; Design workflows, tool-augmented flows, and multistep reasoning pipelines; Evaluate models and apps, including detecting fabrications, relevance, quality, and safety; Integrate generative workflows into applications by using Foundry SDKs and connectors; Configure an application to connect to a Foundry project.62
Build agents by using FoundrySkills outline section (AI-103, as of April 16, 2026). Define agent roles, goals, conversation-tracking approach, and tool schemas; Build agents that integrate retrieval, function-calling, and conversation memory; Integrate agent tools, including APIs, knowledge stores, search, content understanding, and custom functions; Implement orchestrated multi-agent solutions; Build autonomous or semiautonomous workflows with safeguards and approval flow controls; Integrate monitoring into deployed agents, evaluate agent behavior, and perform error analysis.62
Optimize and operationalize generative AI systemsSkills outline section (AI-103, as of April 16, 2026). Tune generation behavior, such as prompt engineering and adjusting model parameters; Implement model reflection, chain-of-thought evaluations, and self-critique loops; Set up observability by implementing tracing, token analytics, safety signals, and latency breakdowns; Orchestrate multiple models, flows, or hybrid LLM and rules engines.62
Total186

Revise Implement generative AI and agentic solutions before you drill it

Other AI-103 domains

Implement generative AI and agentic solutions: your questions

Implement generative AI and agentic solutions is domain 2 of the AI-103 exam guide and carries 33% of the scored content — the heaviest of the 5 domains. On a 50-question paper that works out to roughly 17 questions, though Microsoft Azure does not publish an exact per-domain count and individual exam forms vary.

Source

The domain weight and topic list on this page come from the official AI-103 exam guide.