Skip to main content

AI-200 practice question · Connect to and Consume Azure Services

You're building a support assistant with the Chat Completions API on a Microsoft Foundry Models deployment.

You're building a support assistant with the Chat Completions API on a Microsoft Foundry Models deployment. Your app has three functions: lookup_order, check_inventory, and search_kb. For each user message, the model should decide whether any function is needed and, if so, which one to call. How should you set up the request?

  • ADefine all three functions in the tools array and set tool_choice to "auto" or leave it unset
  • BDefine all three functions in the tools array and set tool_choice to "none"
  • CDefine all three functions in the tools array and set tool_choice to a named function object
  • DSend three separate requests, each with one function in the tools array, and keep the best response
Show the answer and explanation

Correct answer: A) Define all three functions in the tools array and set tool_choice to "auto" or leave it unset

One Chat Completions request can define several functions in the tools array. With tool_choice set to "auto", the default, the model decides whether to call a function and which one. "none" or a named function object would override that choice.

Why each option is right or wrong

  • A) Correct. The tools array can hold several function definitions in one request. With tool_choice set to "auto", which is the default, the model decides whether to call a function and, if so, which one.
  • B) Incorrect. Setting tool_choice to "none" forces the model to reply with a user-facing message, so it never calls any of the functions you defined.
  • C) Incorrect. A named tool object, such as {"type": "function", "function": {"name": "lookup_order"}}, forces the model to call that one function. The model can no longer choose among the functions or skip them.
  • D) Incorrect. You don't need one request per function, because one request can list several functions. Splitting them means the model can't compare the options, and your app has to choose instead of the model, with extra calls to the API.
Exam domain
Connect to and Consume Azure Services · 25% of AI-200
Question type
Multiple choice (one answer)

Practise the full AI-200 exam

This question is one of a small free sample from the CertRidge AI-200 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Microsoft; never copied from the real exam.