Course menuAI-901

Exams / AI-901 / Single-agent solutions and agent client apps / Question 4

AI-901 practice question: Single-agent solutions and agent client apps (4 of 5)

Implement AI solutions by using Microsoft Foundry A free question from our original AI-901 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current Microsoft Learn ·How we write our questions

A garden-supply retailer's agent must say whether an item is in stock at a particular store. Stock levels live in the retailer's own inventory service, which has a REST API described by an OpenAPI file.

The agent should call that live API during the conversation, not guess from older text.

Which tool should the developer add?

Choose one answer.

  1. A. An OpenAPI tool that points to the inventory service's API description
  2. B. A web search tool, so the agent checks the retailer's public product pages for stock
  3. C. A file search tool, with last month's stock spreadsheet uploaded to the project
  4. D. A code interpreter, so the agent writes Python that queries the store's database directly
Show the answer and explanation

Answer: A

  • A. Right: Correct. An OpenAPI tool gives the agent a described REST API it can call during a conversation, so it can read live stock levels from the inventory service. Learn more: What is Foundry Agent Service? (opens in a new tab)
  • B. Wrong: Web search reads public pages, not the retailer's own inventory API, so it cannot give live store-level stock.
  • C. Wrong: File search answers from uploaded documents, which here would hold last month's data. Stale files would give out-of-date answers, so the requirement fails.
  • D. Wrong: Code interpreter runs code in a sandbox for calculation and file analysis. It is not the way to call a documented REST API.

Explanation

Custom tools such as OpenAPI tools let an agent call a documented API during a conversation. The built-in tools cover public web pages, uploaded files and sandboxed calculation, which do not give live inventory.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Single-agent solutions and agent client apps? The 5 full-length practice sets have 25 more Single-agent solutions and agent client apps questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets

Every exam starts with free questions. No account needed.