Skip to main content

AI-200 · 25% of the exam

Connect to and Consume Azure Services practice questions

10 free Connect to and Consume Azure Services questions for the Microsoft Certified: Azure AI Cloud Developer Associate (AI-200) exam, each with the correct answer and an explanation for every option.

What this domain covers

Calling Azure services from application code: AI services, messaging, events and APIs.

Exam weight
25%
On a real exam
≈ 13 questions
In our bank
128 questions

Topics that come up most

  • Azure OpenAI and Azure AI services endpoints
  • Service Bus queues and topics
  • Event Grid and Event Hubs
  • API Management policies
  • SDK authentication patterns

How to study it

Learn the difference between messages and events (Service Bus vs Event Grid vs Event Hubs); the exam leans on it.

Sample Connect to and Consume Azure Services questions

Try each one before opening the answer. Original questions written to the official exam objectives.

  1. Question 1

    Several internal applications call the same Azure OpenAI chat completions deployment, and many of them send identical or near-identical prompts. You want every application to benefit from responses already generated for any other application, so that fewer tokens are consumed. Which approach meets this goal?

    • ARoute all applications through one API Management instance that uses the llm-semantic-cache-lookup and llm-semantic-cache-store policies with an Azure Managed Redis external cache that isn't partitioned per application
    • BRoute all applications through API Management and apply the llm-token-limit policy with a counter key based on each application's subscription, so each application's token consumption is capped
    • CRoute all applications through API Management with semantic caching, setting the lookup policy's vary-by element to each calling application's subscription ID so that entries are keyed per caller
    • DHave each application keep its own in-process memory cache of prompts and responses, and look up a stored response there before calling the Azure OpenAI deployment
    Show answer and explanation

    Answer: A) Route all applications through one API Management instance that uses the llm-semantic-cache-lookup and llm-semantic-cache-store policies with an Azure Managed Redis external cache that isn't partitioned per application

    Putting API Management in front of Azure OpenAI with the semantic cache lookup and store policies, backed by Azure Managed Redis, gives all callers one shared response cache. Partitioning the cache per application with vary-by, or keeping a cache inside each application, removes the cross-application benefit.

    • ACorrect. API Management semantic caching returns stored responses for identical and semantically similar prompts from an external Azure Managed Redis cache (RediSearch module enabled). If all applications go through the same gateway and the cache isn't split per caller, a response generated for one application can be returned to the others without calling the model again.
    • BIncorrect. llm-token-limit caps token consumption per key and returns 429 (rate exceeded) or 403 (quota exceeded) to callers. It never stores or reuses responses, so identical prompts still reach the model and consume tokens.
    • CIncorrect. vary-by partitions the cache. Keying it on each application's subscription ID means an application only gets cache hits on its own earlier requests, which defeats the goal of sharing responses across applications.
    • DIncorrect. Separate in-process caches are siloed. Each application has to pay for its own first call for every prompt and never benefits from responses generated for other applications.
  2. Question 2

    An application sends requests to a GPT-5 series reasoning model deployment in Azure OpenAI through the Chat Completions API. Simple lookups should return quickly and use few tokens. Complex multi-step analysis requests should get deeper reasoning. Which request parameter should the developer set differently for each type of request?

    • Areasoning_effort, set to a lower value for simple lookups and a higher value for complex analysis
    • Btemperature, set lower for simple lookups and higher for complex analysis
    • Cmax_completion_tokens, set to a small cap for simple lookups and a large cap for complex analysis
    • Dtop_p, set to a narrow value for simple lookups and a wider value for complex analysis
    Show answer and explanation

    Answer: A) reasoning_effort, set to a lower value for simple lookups and a higher value for complex analysis

    Azure OpenAI reasoning models expose reasoning_effort, which trades speed and cost against reasoning depth for each request. Sampling parameters such as temperature and top_p aren't supported, and max_completion_tokens only caps output length.

    • ACorrect. Reasoning models accept a reasoning_effort parameter (for example low, medium or high). Lower effort produces faster, cheaper responses with less internal reasoning. Higher effort lets the model reason more thoroughly on demanding requests.
    • BIncorrect. Temperature controls sampling randomness, not reasoning depth. It is also not a supported parameter for Azure OpenAI reasoning models.
    • CIncorrect. max_completion_tokens caps the total tokens the model can generate, including reasoning tokens. A low cap can cut off a response, but it doesn't tell the model how much reasoning effort to apply.
    • DIncorrect. top_p is a nucleus-sampling control, not a reasoning-depth setting, and reasoning models don't support it.
  3. Question 3

    A team uses integrated vectorization in Azure AI Search. A skillset splits documents into chunks under /document/pages/*, and an AML skill sends each chunk to a serverless deployment of Cohere-embed-v3-multilingual from the Microsoft Foundry model catalog. The embeddings are stored in the index and searched later with user queries. Which value should the AML skill pass in its input_type input?

    • Asearch_document
    • Bsearch_query
    • Cclassification
    • Dclustering
    Show answer and explanation

    Answer: A) search_document

    Cohere Embed models take an input_type that tells the model what role the text plays. For retrieval, embed the indexed corpus with search_document and the queries with search_query, which is why the Azure AI Search AML skill sample uses 'search_document' for chunked pages.

    • ACorrect. Cohere Embed uses input_type to tell the model what role the text plays. Text stored in a vector index for retrieval should be embedded as search_document. The sample AML skill payload in the Azure AI Search docs sets input_type to 'search_document' for chunked content.
    • BIncorrect. search_query is for the user's query text at search time, when you look for matching documents in the vector store. The chunks being indexed are the corpus, so they use search_document.
    • CIncorrect. classification is for embeddings that will feed a text classifier. It isn't meant for a corpus that will be searched with queries.
    • DIncorrect. clustering is for embeddings that will be grouped into clusters. For search and retrieval, embed the corpus with search_document and the queries with search_query.
  4. Question 4

    An application calls a GPT-4o deployment in Azure OpenAI on a Standard deployment. Every request is built in this order: the current timestamp and user ID, then the same 3,000 tokens of instructions, then a short user question. The team expected discounted cached input tokens, but prompt_tokens_details.cached_tokens is always 0. What should they do so prompt caching can reduce the cost?

    • AMove the fixed 3,000 tokens of instructions to the start of the prompt and put the timestamp, user ID, and question after them
    • BShorten the fixed instructions to fewer than 1,024 tokens so that the shorter prompt prefix is eligible for caching
    • CSet the temperature parameter to 0 so that the service treats repeated requests as identical and serves them from cache
    • DTurn on prompt caching in the deployment settings, because the feature is turned off by default for Standard deployments
    Show answer and explanation

    Answer: A) Move the fixed 3,000 tokens of instructions to the start of the prompt and put the timestamp, user ID, and question after them

    Azure OpenAI prompt caching is automatic for supported models. It only applies when a prompt is at least 1,024 tokens long and its first 1,024 tokens are identical across requests, so put fixed content at the start of the prompt and changing content at the end to get discounted cached tokens.

    • ACorrect. A prompt is only cached when it's at least 1,024 tokens long and its first 1,024 tokens are identical across requests. Starting every prompt with a timestamp and user ID changes those first tokens on every call, so there's never a cache hit. Microsoft's guidance is to put fixed content first and changing content last.
    • BIncorrect. A request has to be at least 1,024 tokens long to be cached at all. A shorter prompt would rule out caching instead of enabling it.
    • CIncorrect. Prompt caching reuses the processing of identical input at the start of the prompt. It doesn't look at sampling settings, and it doesn't change the output content. Temperature has no effect on whether cached input tokens are reused.
    • DIncorrect. Prompt caching is on by default for supported models, including GPT-4o and newer. The cache misses come from the prompt structure, not from a disabled setting.
  5. Question 5

    An application sometimes sends a very long document to an Azure OpenAI chat deployment in one request. Those requests fail with an HTTP 400 error saying the input exceeds the model's maximum context length. What should the developer do?

    • ASplit, summarize, or trim the document so each request's input stays within the model's input token limit
    • BIncrease the deployment's tokens-per-minute (TPM) quota allocation so that larger requests are accepted
    • CRaise the max_tokens parameter on the request so the model can accept a larger amount of input text
    • DRetry the same request using exponential backoff and honor the retry-after-ms response header value
    Show answer and explanation

    Answer: A) Split, summarize, or trim the document so each request's input stays within the model's input token limit

    Each model has a maximum input token limit that quota and request parameters can't change. Oversized inputs must be chunked, summarized or trimmed to fit within that limit.

    • ACorrect. The maximum prompt tokens per request depends on the model and is a fixed property of that model. The fix is to send less in each request, for example by chunking the document, summarizing it first, or removing unneeded context.
    • BIncorrect. TPM sets throughput per minute, and Microsoft documents that TPM allocation isn't related to a model's maximum input token limit. Raising TPM doesn't let a single request go beyond the model's context length.
    • CIncorrect. max_tokens limits the length of the generated output, not the input. A higher value also uses up more of the context window and counts toward the rate-limit estimate, which makes the problem worse.
    • DIncorrect. Backoff and retry-after-ms are for 429 throttling responses. An input that's too long fails validation with HTTP 400, so resending the same request fails the same way.
  6. Question 6

    A chat application in Microsoft Foundry receives a mix of simple lookups and multi-step reasoning prompts. The team wants each prompt to be served by a smaller, cheaper model when that model is good enough, and by a larger or reasoning model when the prompt needs it. The application must call a single deployment and must not contain any model-selection logic. What should the team deploy?

    • AA model router deployment that uses the Balanced or Cost routing mode and selects an underlying model for each prompt
    • BAn API Management backend pool that uses weighted load balancing across a small-model and a large-model deployment
    • CA Global Standard deployment of the largest model, which routes traffic dynamically across Azure datacenters
    • DA Global Provisioned deployment with enough PTUs reserved for the largest model to serve every request
    Show answer and explanation

    Answer: A) A model router deployment that uses the Balanced or Cost routing mode and selects an underlying model for each prompt

    Foundry model router is deployed as a single deployment and routes each prompt to a suitable underlying model based on its complexity and the routing mode. Load balancers, Global Standard, and provisioned throughput don't choose a model for each prompt.

    • ACorrect. Model router is a trained language model, deployed as a single deployment, that analyzes each prompt in real time (complexity, reasoning, task type) and routes it to a suitable underlying model. It uses smaller, cheaper models when they're good enough and larger or reasoning models when needed. The Balanced and Cost routing modes favor the most cost-effective model within a quality band.
    • BIncorrect. API Management backend pools distribute requests by round-robin, weighted, or priority-based load balancing. They don't analyze prompt complexity, so simple and complex prompts would be split by weight rather than by what each prompt needs.
    • CIncorrect. Global Standard routes traffic to available datacenters for capacity and quota. Every request still goes to the same model, so simple prompts wouldn't be served by a cheaper model.
    • DIncorrect. Provisioned throughput reserves processing capacity for predictable throughput and lower latency variance. It doesn't choose between models per request, and sending simple prompts to the largest model doesn't optimize cost.
  7. Question 7

    A team is building a chatbot on an Azure OpenAI chat model. When a user asks about stock availability, the model must recognize that live data is needed, choose to invoke the team's internal inventory-lookup API, and produce the SKU and warehouse values to send to it. The application will make the actual API call and return the result to the model. Which approach should the team use?

    • ADescribe the inventory lookup in the request's tools parameter and leave tool_choice set to auto
    • BSet response_format to JSON mode so the model returns the SKU and warehouse as a JSON object
    • CConnect Azure OpenAI On Your Data to an Azure AI Search index built from the inventory records
    • DGenerate embeddings for the inventory catalog and compare them to the user's question by cosine similarity
    Show answer and explanation

    Answer: A) Describe the inventory lookup in the request's tools parameter and leave tool_choice set to auto

    Function calling (the tools parameter with tool_choice auto) lets the model decide when to call a defined function and return JSON arguments for it. The application then runs the function and sends the result back to the model.

    • ACorrect. This is function calling. With tool_choice set to auto (the default), the model decides from context whether to call a defined tool and returns a JSON object with the arguments. The application runs the lookup, appends the result as a tool message, and calls the model again to get the final answer.
    • BIncorrect. JSON mode only controls the format of the model's output. It doesn't let the model decide when to invoke a specific function, and it doesn't produce a tool call tied to a defined schema that the application can run and return results for.
    • CIncorrect. On Your Data grounds answers in documents retrieved from an index. It doesn't let the model call the team's live inventory API with arguments it generates, and an index would hold indexed copies of the inventory records rather than live stock levels.
    • DIncorrect. Embeddings support semantic similarity search over content. They don't let the model decide to invoke an external API or generate structured arguments for one.
  8. Question 8

    A team wants to use a recently released Azure OpenAI model. Because of data residency requirements, they plan to use the Standard deployment type, which processes prompts and responses within a customer-specified Azure geography, in one specific Azure region. What should they verify before committing to that region?

    • AThat the Foundry Models availability tables list the model version for that deployment type and region
    • BThat the region hosts the team's Azure Container Registry, since deployments load model weights from a registry there
    • CThat the resource already has a deployment of an older model version, since new versions are added only by upgrading it
    • DThat the subscription holds a provisioned throughput reservation there, since new models are first offered only as Provisioned
    Show answer and explanation

    Answer: A) That the Foundry Models availability tables list the model version for that deployment type and region

    Model availability depends on both region and deployment type, and geography-based types such as Standard get new models last. Check the Foundry Models availability tables for that type and region before choosing a region.

    • ACorrect. Not all models support all deployment types, and availability differs by region. Microsoft says to check model availability by deployment type and region. New models launch first in Global types, and geography-based types such as Standard arrive last with no guaranteed availability date.
    • BIncorrect. Azure OpenAI models are deployed on a Foundry or Azure OpenAI resource as a serverless deployment type. The service doesn't pull model weights from a customer's container registry.
    • CIncorrect. You can create a new deployment of any model version that's supported in that region and deployment type. An earlier deployment isn't a prerequisite.
    • DIncorrect. New models launch first on Global Standard, a pay-per-token type. A PTU reservation doesn't determine whether a model is offered in a region for the Standard type.
  9. Question 9

    A company runs an Azure OpenAI deployment in a primary region and an identical deployment in a secondary region. Client applications should call one endpoint. Requests should normally go to the primary deployment and automatically shift to the secondary deployment when the primary stops responding. Which solution should the company implement?

    • AAzure API Management with a backend pool that uses priority-based load balancing and a circuit breaker rule
    • BAzure Application Gateway in the primary region with both deployments added to its backend pool
    • CA higher tokens-per-minute quota on the primary deployment so that it can absorb peak traffic
    • DAn Azure Monitor alert rule on the primary deployment that notifies operators when errors increase
    Show answer and explanation

    Answer: A) Azure API Management with a backend pool that uses priority-based load balancing and a circuit breaker rule

    API Management's AI gateway can place multiple Azure OpenAI deployments behind one endpoint. Priority-based backend load balancing and circuit breaker rules send traffic to the primary deployment and automatically shift it to the secondary when the primary isn't responding.

    • ACorrect. API Management's AI gateway lets you group AI endpoints as backends. Its load balancer supports priority-based distribution, so traffic prefers the primary deployment, and circuit breaker rules stop sending requests to a backend that isn't responding. Together these give clients a single endpoint with automatic failover.
    • BIncorrect. Application Gateway is a regional service. If it runs only in the primary region, an outage there also takes down the single entry point, so it can't reliably fail traffic over to the other region.
    • CIncorrect. Raising quota adds capacity in one region only. It provides no failover when that region or deployment becomes unavailable.
    • DIncorrect. An alert notifies people but doesn't reroute anything. Failover would depend on someone making a manual change, which doesn't meet the requirement for automatic failover.
  10. Question 10

    Before creating any deployment, a developer needs to find chat-completion models in Microsoft Foundry that support tool calling, are available as a serverless deployment in their Azure region, and come from several providers. They also want to read each model's license terms. Which Foundry feature should they use?

    • AThe model catalog, filtering by inference task, supported features, deployment option, and region, then reviewing each model card
    • BThe chat playground, switching between models and comparing their responses to the same test prompt
    • CEvaluations, running a test dataset through candidate models to score groundedness and coherence
    • DFoundry Agent Service, creating an agent and choosing a model from its list of connected tools
    Show answer and explanation

    Answer: A) The model catalog, filtering by inference task, supported features, deployment option, and region, then reviewing each model card

    The Microsoft Foundry model catalog is where you find and compare models before deploying them. You can filter by provider collection, region, deployment option, features, and task, and read license details on each model card.

    • ACorrect. The model catalog lists models from Microsoft, Azure OpenAI, and partners. It can filter by collection, region, deployment option, supported features, and inference task, and each model card has a License tab.
    • BIncorrect. The playground is for testing models you've already deployed. It isn't where you find undeployed models by region, deployment option, or license.
    • CIncorrect. Evaluations score the outputs of models or apps you can already call. They don't let you browse every available model or filter by license and deployment option.
    • DIncorrect. Agent Service hosts and runs agents that use a model you've deployed. It isn't the place to find and compare the full range of available models before deployment.

Connect to and Consume Azure Services: FAQs

How much of the AI-200 exam is Connect to and Consume Azure Services?

Connect to and Consume Azure Services is 25% of the AI-200 exam by the official exam guide's weighting, which on a 50-question form works out to roughly 13 questions. The real exam's exact split varies by form.

What does the Connect to and Consume Azure Services domain cover?

Calling Azure services from application code: AI services, messaging, events and APIs.

How should I study Connect to and Consume Azure Services for AI-200?

Learn the difference between messages and events (Service Bus vs Event Grid vs Event Hubs); the exam leans on it.

Where can I practise more Connect to and Consume Azure Services questions?

This page has 10 free Connect to and Consume Azure Services questions with answers. CertRidge's AI-200 question bank has 128 questions in this domain. Every practice exam result breaks your score down by domain, and Review Mode re-drills the questions you missed.

Get Connect to and Consume Azure Services exam-ready

The full AI-200 bank has 128 Connect to and Consume Azure Services questions. Timed practice exams match the real exam's length and domain weights, every result shows your score per domain, and Review Mode re-drills the questions you missed.

Not affiliated with Microsoft; questions are original and never copied from the real exam.