‹ All AI-103 questions

AI-103 Practice Question 66: Custom Vector Store Function Tool

Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 7 · question 6 of 10

Implement generative AI and agentic solutionshard

A retailer already embeds and stores product-catalog vectors in its own Azure Cosmos DB account, where several other services query them with the database's native vector index. A new Foundry agent must ground its answers in the same embeddings. Company policy forbids creating a second copy of the embeddings in any Microsoft-managed store, and the retailer does not use Azure AI Search anywhere in its architecture.

How should the agent retrieve this data?

Select one answer
Show answer and explanation

Answer:

  • B. Define a custom function tool that queries the existing Cosmos DB vector index and returns the matches; the agent calls it and your app executes it

Function calling is designed for exactly this: "Define a function with its name, parameters, and description, and the agent's Foundry model can request your app to call it. Your app executes the function and returns the output." The retailer's own service, not Foundry, owns the retrieval logic; it queries the Cosmos DB vector index it already has and hands the results back as tool output. No embeddings ever leave the retailer's database, satisfying both constraints in the scenario.

- A is wrong because file search parses, chunks, and embeds files into its own managed vector store, a second, Microsoft-managed copy of the catalog, which the policy explicitly forbids. - C is wrong for the same reason from a different angle: it stands up a brand-new Azure AI Search index that duplicates data already embedded and served from Cosmos DB, and the retailer has no existing AI Search footprint to justify adding one. - D is wrong because code interpreter is a sandboxed execution environment for code the model writes against files you upload to it; it is not a connector to a live production database, and loading a "snapshot" is itself an unwanted copy of the data.

Reference: Use function calling with Microsoft Foundry agents

Practice Test 7 ›

Study guides for AI-103

AI engineer roadmap 2026: skills, certs and the orderAI engineer roadmap for 2026: skills to learn in order, AI engineer vs ML engineer, which certifications fit each stage, and what to skip.
AI-200 exam guide: Azure AI Cloud Developer AssociateAI-200 replaced AZ-204: what the Azure AI Cloud Developer exam tests, how it differs from AI-103, price in USD and INR, format and how to prepare.
How AI Is Changing Software Jobs: Where to PrepareHow AI is changing software jobs: what history shows, the evidence on junior developers, what Klarna learned, new AI roles and five domains to prepare for.
AI-901 exam guide: Azure AI Fundamentals after AI-900AI-901 replaced AI-900: learn what changed, how much Python and Microsoft Foundry you need, exam costs in India, and how to prepare.
Best AI certifications 2026: AWS, Google, Microsoft, ClaudeThe best AI certifications in 2026 from AWS, Google, Microsoft, Claude and Databricks, by level, with price, status and which one to take first.
Microsoft AI certification path 2026: which exam firstMicrosoft AI certification path for 2026 - AI-901, AB-730, AI-103, AI-200, AI-300, AB-100, AI-500 and GH-300 by role, and which exam to take first.
AI-103 Certification Guide: What Changed From AI-102The AI-103 certification replaced AI-102 in 2026. Exam format, cost, the five skill domains, what changed and how to prepare, with free practice questions.
What Is RAG? How Retrieval-Augmented Generation WorksWhat RAG is and how it works: chunking, embeddings, vector search, hybrid search, reranking, GraphRAG and agentic RAG on AWS, Google and Azure.
Prompt engineering vs RAG vs fine-tuningWhen to use prompt engineering, retrieval-augmented generation, fine-tuning or continued pre-training, compared on cost, freshness, hallucination and privacy.