All Microsoft exams
Free AI-103 practice test: 30 questions with answers
30 original questions for Developing AI Apps and Agents on Azure, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 100 questions
All 30 AI-103 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Build agents and tool use (4 questions)
Question 1
An agent must look up order status by calling an internal REST API. Which mechanism lets the model decide when to call that API and with which arguments?
- ALengthening the system prompt with the full REST API documentation and example payloads
- BStoring the order table as embeddings in a vector index for lookups
- CTool or function calling with a JSON schema that describes the API parameters
- DFine-tuning the model on past order records and support transcripts
Show answer and explanationHide answer
Correct answer: CFunction calling exposes a named tool with a typed parameter schema, and the model returns structured arguments that the application then executes. Pasting documentation into the prompt or fine-tuning does not give the runtime a reliable, callable interface.
Question 2
A customer support agent must never issue refunds above 200 dollars without a human. What is the most reliable way to enforce this?
- AAsk the model to double-check its own answer text against the refund policy before replying
- BAdd an instruction to the system prompt not to exceed 200 dollars per refund issued during a support conversation
- CLower the model temperature to zero and set top-p to 0.1 so the refund decision is fixed
- DEnforce the limit in the refund tool itself and return an approval-required result above the threshold
Show answer and explanationHide answer
Correct answer: DBusiness rules belong in deterministic code, because a prompt instruction is a suggestion the model can ignore. A tool that refuses over-limit refunds and returns an approval status keeps the control outside the model.
Question 3
Multiple specialist agents need to hand work between each other in a single workflow. What is the main design benefit of this orchestration pattern?
- AEach specialist can have a narrow role and tool set, while an orchestrator routes work between them
- BIt makes model responses deterministic across runs by pinning the random seed and temperature
- CIt eliminates token costs for tool calls by caching each tool result for the session
- DIt removes the need for evaluation because agents check each other's outputs before handoffs
Show answer and explanationHide answer
Correct answer: ANarrow roles and tool sets reduce what each agent can get wrong, and an orchestrator decides which specialist handles each step. Agent handoffs do not remove the need for evaluation, and model outputs remain non-deterministic.
Question 4
An agent sometimes calls the same search tool many times in one turn and runs up cost. Which change addresses this most directly?
- AIncrease the model temperature and top-p so it explores different query phrasings each turn
- BRemove the search tool from the agent definition and hard-code a fixed list of search results into the prompt
- CRaise the tokens-per-minute rate limit on the model deployment and increase the quota ceiling for each retry attempt
- DAdd a step limit or maximum tool-call budget per turn, with clear stop criteria in the instructions
Show answer and explanationHide answer
Correct answer: DA per-turn budget bounds the loop in code rather than relying on the model's judgment. Removing the tool loses capability, and raising a rate limit lets the runaway loop spend more.
Retrieval-augmented generation (4 questions)
Question 5
A RAG app retrieves documents by keyword and returns exact product codes, but misses answers that paraphrase the question. The team wants one query that combines keyword matching with semantic similarity. Which Azure AI Search capability fits?
- AFaceted navigation over non-searchable field
- BAutocomplete with a suggester on the title field
- CHybrid search combining keyword and vector queries
- DA wildcard filter on the content field that matches prefixes
Show answer and explanationHide answer
Correct answer: CHybrid search runs a full-text query and a vector query together and merges the ranked results, so exact codes and paraphrased questions both match. Facets and suggesters do not perform semantic retrieval, and a wildcard filter does not rank by meaning.
Question 6
Answers from a 300-page manual cite the wrong section because chunks split tables and headings apart. What should the developer change first?
- AChunk along document structure such as headings and tables, with a small overlap
- BSwitch to a larger generation model with a much longer context window
- CReduce the retrieval count to one result per query to save tokens
- DIncrease the model temperature so answers vary more across repeated runs
Show answer and explanationHide answer
Correct answer: AThe retrieved chunks are the problem, so the fix belongs in indexing: splitting on structure keeps each table and section intact. Temperature and model size do not repair missing context, and returning one result usually removes evidence the model needs.
Question 7
Which two settings most directly affect how well a RAG answer is grounded in source content? (Choose two.)
- AThe color theme used by the chat interface
- BThe maximum number of output tokens allowed
- CChunk size and overlap applied during indexing
- DThe retention period for conversation logs
- EThe number and relevance of retrieved chunks placed in the prompt
Show answer and explanationHide answer
Correct answer: C, EGrounding depends on which evidence reaches the model, which is set by retrieval count and relevance, and on how well the source was chunked at indexing time. Output limits, UI theme, and log retention do not change what the model is able to cite.
Question 8
Which component converts text into numeric vectors so that semantically similar content can be found by vector search?
- AA content filter
- BA tokenizer used only to count tokens for billing
- CA reranker that scores the final answer
- DAn embedding model
Show answer and explanationHide answer
Correct answer: DAn embedding model maps text to vectors where nearby points have similar meaning, which is what vector search compares. Tokenizers, rerankers, and filters do not produce the stored vectors used for retrieval.
Model integration and deployment (4 questions)
Question 9
A team wants the lowest-latency responses for simple classification at high volume, and quality needs are modest. Which deployment choice fits best?
- AA nightly batch job that processes requests once a day
- BA smaller, faster model deployment sized for the workload
- CThe largest reasoning model with the maximum output token limit
- DFine-tuning the largest frontier model for each request
Show answer and explanationHide answer
Correct answer: BA smaller model answers faster and costs less per call, which suits a narrow classification task. Large reasoning models add latency, and a nightly batch cannot serve interactive requests.
Question 10
A developer must limit the length of answers and control spending per request. Which request setting directly caps the generated tokens?
- AShortening the embedding dimensions of stored chunks
- BLengthening the system prompt with extra examples
- CAdding more logit bias entries to the request payload
- DA maximum output token setting on the request
Show answer and explanationHide answer
Correct answer: DA maximum output token setting stops generation at a fixed length, which bounds both latency and cost. Logit bias and embedding size do not limit output length, and a longer system prompt increases input cost.
Question 11
A team wants to test a new model version with about 10 percent of live traffic before a full rollout. Which deployment technique fits?
- ABig bang cutover at midnight with every request switched at once
- BHard-coding a model version check in every client application
- CCanary release that routes about 10 percent of traffic to the new deployment
- DDeleting the old deployment before creating the new one, with no rollback
Show answer and explanationHide answer
Correct answer: CA canary release sends a fraction of traffic to the new version and lets the team compare results before expanding. A big bang cutover or deleting the old deployment first gives no controlled comparison.
Question 12
A service receives HTTP 429 responses during a peak hour from a model deployment. Which client behavior is most appropriate?
- ASwitch to a different application identity for each retry attempt
- BRetry immediately in a tight loop with no cap until a reply arrives
- CFail every request at once and show a generic error page to the user
- DRetry with exponential backoff and jitter, honoring any retry-after guidance
Show answer and explanationHide answer
Correct answer: DExponential backoff with jitter spreads retries out and respects the service's guidance, which avoids making throttling worse. Tight loops amplify load, and changing identity to dodge quotas is not a valid remedy.
Evaluation and quality (4 questions)
Question 13
Which metric in a RAG evaluation checks whether the generated answer is supported by the retrieved context?
- APerplexity of the generated text
- BThroughput in requests per second
- CToken count of the prompt
- DGroundedness
Show answer and explanationHide answer
Correct answer: DGroundedness measures whether each claim in the answer can be traced to the retrieved passages. Perplexity measures language-model fluency, and throughput and token counts measure performance and cost.
Question 14
Before releasing a prompt change, a team wants to compare the new prompt against the current one using scored metrics. What should they use?
- ARun a batch evaluation of both prompt versions on the same fixed, labeled dataset
- BShip the change to production and watch support tickets for complaints
- CRun one manual chat test on a developer laptop against staging endpoint
- DReview the diff in the pull request and check the prompt wording for clarity
Show answer and explanationHide answer
Correct answer: AA batch evaluation on the same dataset gives comparable scores for both versions, which shows whether the change helps. A single manual chat or a code review does not measure quality across representative inputs.
Question 15
A pipeline tests the generative app before each deployment. Which practice gives the fastest feedback on quality regressions?
- AA quarterly manual review by the product owner with sign-off before release
- BAutomated evaluation runs in the CI pipeline against a golden test set
- CChecking code formatting and naming conventions with a linter in the build step
- DDeploying to a production slot and waiting for user complaints to trickle in over a week
Show answer and explanationHide answer
Correct answer: BRunning evaluation automatically in CI catches regressions on every change, before release. Manual quarterly reviews and user complaints are slow, and formatting checks say nothing about answer quality.
Question 16
A RAG evaluation shows high groundedness but low relevance scores. What does this most likely indicate?
- AThe answers are supported by retrieved text but do not address what the user asked
- BThe answers invent facts not present in the retrieved context passages
- CThe index is stored in the wrong region, adding cross-region latency to queries
- DThe model's time to respond is too slow for the user's interactive needs
Show answer and explanationHide answer
Correct answer: AGroundedness measures support from context and relevance measures whether the answer addresses the question. High groundedness with low relevance means the answer is faithful to retrieved text but off-topic, often because retrieval fetched the wrong passages or the prompt is unfocused.
Plan and manage Azure AI solutions (3 questions)
Question 17
A team is building a generative AI app on Azure. They want to keep API keys out of application code and let the app call Azure OpenAI using its Azure identity. Which approach should they use?
- AAssign a managed identity to the app and grant it an Azure OpenAI data-plane role
- BCreate a long-lived shared access signature for the model endpoint, valid for twelve months and reused
- CHard-code the key in plain text inside a configuration file committed to source control
- DShare the storage account key through a pipeline variable group that every developer can read
Show answer and explanationHide answer
Correct answer: AA managed identity lets the app obtain Microsoft Entra ID tokens without storing a secret, and a role assignment limits what it can do. Hard-coded or shared keys leak easily and cannot be scoped to a single workload.
Question 18
A developer must rotate a connection string for a model endpoint every 30 days without redeploying the app. Which service should hold the secret?
- AThe appsettings.json file in the source repository, edited per environment
- BA custom tag property on the Application Insights resource
- CAzure Key Vault, with the app reading the secret reference at runtime
- DAn Azure Blob Storage container set to anonymous read access
Show answer and explanationHide answer
Correct answer: CKey Vault stores secrets centrally, supports rotation, and lets the app pick up a new version without a code change or redeployment. Config files in source control force a redeploy and expose the value to everyone with repository access.
Question 19
A solution must answer questions over internal PDFs, and the PDFs change daily. Which design keeps answers current without retraining a model?
- ACopy the PDFs into the system prompt on every request as raw text, without chunking
- BFine-tune the model on the PDFs every night using a training job and redeploy it for each update
- CStore the PDFs in a Git repository and read them from the build artifacts during each release deployment
- DIndex the documents in Azure AI Search with a scheduled indexer and retrieve at query time
Show answer and explanationHide answer
Correct answer: DRetrieval at query time reads the latest indexed content, and a scheduled indexer keeps it fresh. Fine-tuning is slow and costly for changing facts, and a build-time copy is stale between deployments.
Responsible AI and safety (3 questions)
Question 20
A content-generation app must block hateful or violent output before it reaches users. Which Azure capability is designed for this?
- AAzure Front Door web application firewall
- BAzure AI Content Safety
- CAzure Monitor alert rules
- DAzure Backup policies
Show answer and explanationHide answer
Correct answer: BAzure AI Content Safety analyzes text and images for harmful categories and can block content before it is returned. Monitoring, edge firewalls, and backup do not evaluate the meaning of generated text.
Question 21
A web app calls an Azure AI endpoint from the browser by including the API key in JavaScript. What is the main problem and fix?
- ABrowsers cannot send HTTPS requests to model endpoints directly because of the same-origin policy
- BNothing is wrong when the site uses TLS, since the encrypted channel prevents network observers from reading the key in transit
- CThe key is visible to every user, so calls should go through a server-side component that holds the credential
- DThe key is too short and should be regenerated with more characters, so use a longer key from the Azure portal page
Show answer and explanationHide answer
Correct answer: CAny script shipped to the browser is readable by every visitor, so the key is effectively public. TLS protects data in transit but not a secret that is delivered to the client, so a backend proxy should make the model call.
Question 22
A hiring-assistant app must disclose to users that they are interacting with AI and avoid automated decisions on protected attributes. Which principle does this support?
- ATransparency and fairness
- BCost-based optimization
- CContinuous availability
- DHorizontal scalability
Show answer and explanationHide answer
Correct answer: ADisclosure makes the system's nature clear to users, and avoiding decisions based on protected attributes addresses fairness. Scalability, availability, and cost are operational concerns rather than responsible AI principles.
Monitoring and observability (3 questions)
Question 23
A developer needs traces showing each model call's latency, token usage, and tool invocations in an agent run. Which service should collect this telemetry?
- AApplication Insights with OpenTelemetry instrumentation
- BAzure Storage Explorer to browse the agent's blob containers
- CAzure Cost Management budgets and spend alerts
- DAzure DNS private resolver query analytics logs
Show answer and explanationHide answer
Correct answer: AApplication Insights stores distributed traces, and OpenTelemetry instrumentation lets the agent emit spans for each model and tool call. The other services do not record per-request execution traces.
Question 24
Which three signals are most useful to monitor for a production generative AI endpoint? (Choose three.)
- AOffice 365 license count
- BThe color palette of the UI
- CRate-limit responses (HTTP 429)
- DToken usage per request
- ELatency percentiles
Show answer and explanationHide answer
Correct answer: C, D, EToken usage drives cost, latency percentiles show user experience, and 429 responses reveal quota pressure. License counts and UI colors do not describe the health or cost of the model endpoint.
Question 25
A production agent occasionally returns answers that users rate poorly. Which combination best supports continuous improvement?
- AAssuming the low ratings are random noise and changing nothing about the prompts or retrieval settings
- BDeleting the raw logs after 24 hours to protect user privacy with no review of failing sessions or feedback
- CCollecting user feedback linked to trace IDs, then reviewing failing traces to build new test cases
- DMonitoring CPU and memory usage of the host VM and its network throughput during peak hours
Show answer and explanationHide answer
Correct answer: CLinking feedback to traces lets the team inspect the exact run that failed and turn it into a regression test. Deleting logs, ignoring ratings, or watching only CPU does not reveal answer quality problems.
Security and identity (3 questions)
Question 26
Which two controls help protect an agent that calls internal APIs on behalf of users? (Choose two.)
- AGive the agent a single shared administrator credential for all calls
- BEnforce authorization checks in each downstream API, not only in the prompt
- CDisable authentication on internal endpoints for easier testing
- DPass the user's own delegated identity or scoped token to the downstream API
Show answer and explanationHide answer
Correct answer: B, DDelegated, scoped identity ensures the downstream API applies the user's permissions, and server-side authorization enforces access regardless of what the model requests. Shared admin credentials and disabled authentication remove the boundary entirely.
Question 27
Which two measures protect secrets used by an AI application running in Azure? (Choose two.)
- ARotate keys on a schedule and after any suspected exposure
- BShare one key across all environments to reduce admin work
- CLog full request headers, including authorization, for debugging
- DStore secrets in Azure Key Vault and grant access with managed identity
- EPlace API keys in the frontend bundle so they are easy to update
Show answer and explanationHide answer
Correct answer: A, DKey Vault with managed identity keeps secrets out of code, and scheduled or emergency rotation limits the impact of exposure. Frontend bundles, shared keys, and logging authorization headers each expose credentials.
Question 28
A developer's notebook needs to call the model endpoint. The organization forbids storing keys on developer laptops. Which access pattern should the team use?
- ATurn off authentication for the notebook environment and let calls reach the endpoint
- BStore the key in a shared spreadsheet that every developer can edit freely
- CEmail the key to the developer each morning so they can paste it locally
- DSign in with Microsoft Entra ID and use a role assignment scoped to the endpoint
Show answer and explanationHide answer
Correct answer: DEntra ID sign-in with a scoped role assignment gives each developer audited, revocable access without a shared secret. Emailing or sharing keys and disabling authentication break the stated policy.
Security and prompt injection (2 questions)
Question 29
Which two actions reduce the risk of prompt injection in an app that lets a model read untrusted web pages and then call tools? (Choose two.)
- APaste the full system prompt into each retrieved document
- BIncrease temperature so the model ignores odd instructions
- CGive the agent only the tools and permissions the task needs
- DDisable all logging so attackers leave no trace
- ETreat retrieved content as data rather than as instructions
Show answer and explanationHide answer
Correct answer: C, ELeast privilege limits what a hijacked agent can do, and separating retrieved content from instructions reduces the chance that page text is obeyed as a command. Temperature and logging do not stop injected instructions, and copying the system prompt into documents leaks it.
Question 30
An agent calls a tool that deletes customer records. Which control best reduces the damage from a mistaken model call?
- ACaching the tool output for longer in a shared Redis cache with a twenty-four-hour time-to-live and automatic refresh
- BRequiring human approval before destructive actions, with least-privilege credentials for the tool
- CIncreasing model temperature and top-p so the agent explores more diverse tool-call arguments for each request
- DAdding more few-shot examples to the prompt with recorded tool-call transcripts as reference for regression testing
Show answer and explanationHide answer
Correct answer: BDestructive actions need an explicit approval gate, and the tool's credentials should only permit what it needs. Prompt examples and temperature changes reduce error rates only slightly and do not stop a wrong call from executing.
Want more AI-103 questions?
The full bank has 100 questions with answers and explanations, as a PDF, an online practice exam, or both.
Both formats together. The best value.
Instant access after payment, with 90 days of updates. Checkout is on our store, AIExamCerts.