SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Plan and manage an Azure AI solution

AI-103: Choose Foundry Models, Retrieval Methods and Agent Tools

19 min readAI-103 · Plan and manage an Azure AI solutionUpdated

Choosing Foundry services for generative AI and agents means matching each requirement to the right Microsoft Foundry building block: a model type (large, small, reasoning, multimodal, image or embedding model), a prebuilt Foundry Tool, a grounding approach, an Azure AI Search retrieval and indexing method, and the knowledge, memory and tool services an agent uses. This lesson covers AI-103 skill area 1.1 and explains, for each near-twin choice — SLM vs LLM, RAG vs fine-tuning, hybrid search vs semantic ranking, Foundry IQ vs file search vs memory, OpenAPI tool vs function calling, prompt agent vs hosted agent — which requirement decides it.

What you’ll learn

  • Choose between a large, small, reasoning, multimodal, image generation and embedding model for a task, and decide when model router, a fine-tuned small model or Foundry Local fits better.
  • Decide when a prebuilt Foundry Tool such as Azure Content Understanding, Speech, Translator or Language beats prompting a general model.
  • Pick RAG, fine-tuning or structured outputs from the gap a solution actually has: missing knowledge, wrong style or a fixed output format.
  • Choose keyword, vector or hybrid search and the semantic ranker in Azure AI Search, and configure integrated vectorization and chunking.
  • Choose between classic RAG and agentic retrieval through a Foundry IQ knowledge base.
  • Select the right knowledge, memory and tool services for an agent — file search, Azure AI Search tool, Foundry IQ, Memory, code interpreter, web search, OpenAPI, function calling and MCP.
  • Choose between a prompt agent, voice-based prompt agent, hosted agent and the Responses API.

The 10 parts · about 15 min of reading

  1. Which model type fits which task?Start hereMatch the model family to input and output: chat, small, reasoning, multimodal, image generation or embedding, then to reasoning depth.2 min
  2. How do cost, volume and location change the choice?Pick the cheapest accurate model: small or fine-tuned small models at volume, Foundry Local offline, and model router per request.2 min
  3. When should you use a Foundry Tool instead of prompting a model?Prebuilt Foundry Tools beat prompting for extraction, speech, document translation, PII redaction and harm detection with no prompt work.2 min
  4. How do you ground a modelRAG supplies changing, citable facts; fine-tuning fixes format and tone; structured outputs enforce a JSON schema without training.1 min
  5. Which retrieval method should a search query use?Hybrid search fuses keyword and vector results with RRF; the semantic ranker then reorders top results by meaning but finds nothing new.1 min
  6. How should documents be chunked, embedded and indexed?Integrated vectorization needs a skillset for documents and a vectorizer for queries; chunking choices and embedding swaps affect results.2 min
  7. Classic RAG or agentic retrieval with Foundry IQ?Classic RAG runs one query per question for speed and control; agentic retrieval plans subqueries across sources via Foundry IQ.1 min
  8. Which knowledge and memory services should an agent use?Curated content uses Foundry IQ, another team's index the AI Search tool, chat uploads file search, and learned user context Memory.1 min
  9. Which tools should an agent use to act?Choose agent tools by who runs the call: the service for code interpreter, web, OpenAPI and MCP; your app for function calling.2 min
  10. Which Foundry Agent Service option runs the agent?Prompt agents are configuration, hosted agents run your container code, and the Responses API serves agents defined in your own app.1 min

Mind map

Image in, text out: multimodal chatmodelText in, image out: gpt-image-1Embedding models make index vectorsReasoning model fixes chained logic,not facts1✓Model type by input andoutputSLM wins if the pilot meets the barFine-tuned small model cheaper atvolumeFoundry Local for offline, on-deviceRouter context = smallest model; use asubset2✓Cost, volume and locationContent Understanding: fields withconfidenceSpeech custom model for live jargonTranslator keeps document layoutLanguage PII redaction; Content Safety= harm3✓Foundry Tools vspromptingRAG: changing facts with citationsFine-tuning: format, tone and styleStructured outputs: JSON schema, notrainingWeb search grounding for recent publicinfo4✓RAG, fine-tuning,structured outputsHybrid = search_text + vector_queries,RRFKeyword half matches exact codesSemantic ranker only reorders topresultsSemantic config: no rebuild, nore-embed5✓Retrieval methodsSkillset embeds docs; vectorizerembeds queriesOverlap fixes ideas split acrosschunksDocument Layout skill chunks bysectionNew embedding model means re-embedding6✓Chunk, embed, indexClassic: one query, lowest latencyAgentic: LLM-planned parallelsubqueriesFoundry IQ enforces permissions atquery timeOne knowledge base shared by manyagents7✓Classic RAG vs agenticretrievalAnother team's index: Azure AI SearchtoolChat uploads: file search toolMemory: profile, chat summary,proceduralScope {{$userId}} separates users8✓Knowledge and memoryCode interpreter for exact dataanalysisOpenAPI tool: service calls your APIFunction calling: your app runs thecodeMCP allowed_tools + require_approval9✓Tools that actPrompt agent: configuration onlyHosted agent: your code in a containerResponses API: ephemeral, defined inapp codeSDK prompt agents still persist aresource10✓Where the agent runsFoundry models,retrieval and agenttools
Mind map

AI-103: Choose Foundry Models, Retrieval Methods and Agent Tools

Image in, text out: multimodal chatmodelText in, image out: gpt-image-1Embedding models make index vectorsReasoning model fixes chained logic,not facts1✓Model type by input andoutputSLM wins if the pilot meets the barFine-tuned small model cheaper atvolumeFoundry Local for offline, on-deviceRouter context = smallest model; use asubset2✓Cost, volume and locationContent Understanding: fields withconfidenceSpeech custom model for live jargonTranslator keeps document layoutLanguage PII redaction; Content Safety= harm3✓Foundry Tools vspromptingRAG: changing facts with citationsFine-tuning: format, tone and styleStructured outputs: JSON schema, notrainingWeb search grounding for recent publicinfo4✓RAG, fine-tuning,structured outputsHybrid = search_text + vector_queries,RRFKeyword half matches exact codesSemantic ranker only reorders topresultsSemantic config: no rebuild, nore-embed5✓Retrieval methodsSkillset embeds docs; vectorizerembeds queriesOverlap fixes ideas split acrosschunksDocument Layout skill chunks bysectionNew embedding model means re-embedding6✓Chunk, embed, indexClassic: one query, lowest latencyAgentic: LLM-planned parallelsubqueriesFoundry IQ enforces permissions atquery timeOne knowledge base shared by manyagents7✓Classic RAG vs agenticretrievalAnother team's index: Azure AI SearchtoolChat uploads: file search toolMemory: profile, chat summary,proceduralScope {{$userId}} separates users8✓Knowledge and memoryCode interpreter for exact dataanalysisOpenAPI tool: service calls your APIFunction calling: your app runs thecodeMCP allowed_tools + require_approval9✓Tools that actPrompt agent: configuration onlyHosted agent: your code in a containerResponses API: ephemeral, defined inapp codeSDK prompt agents still persist aresource10✓Where the agent runsFoundry models,retrieval and agenttools

How the exam tests this

Expect short scenarios — a company, its data and a requirement such as minimizing development effort, lowest cost, offline use, citations or least privilege — followed by "what should you use?". The deciding detail is usually one constraint: whether the gap is knowledge, style or reasoning; whether the input is text, an image or a document; whether a prebuilt Foundry Tool already does the job; whether a query must match exact identifiers; who executes a tool call; and where agent code runs. Some items show a short Azure AI Search Python call and ask which parameter completes it and several ask you to select two components that work together.

Key takeaways

  1. Image in, text out needs a multimodal chat model; text in, image out needs an image generation model; vectors for search come only from an embedding model.
  2. A reasoning model fixes wrong multistep conclusions when the right facts are already in context; it does not fix missing knowledge and is slower per request.
  3. For narrow, high-volume tasks pick the cheapest model that meets the measured accuracy bar — a small or fine-tuned small model; Foundry Local runs SLMs on-device and offline.
  4. Model router chooses a model per request behind one deployment; its context limit is the smallest model's, so long inputs need a model subset of long-context models.
  5. Prefer a prebuilt Foundry Tool when it does the whole job: Content Understanding for schema fields with confidence, Speech custom models, Translator document translation, Language PII redaction.
  6. RAG for private, changing knowledge with citations; fine-tuning for style and format; structured outputs for a fixed JSON schema.
  7. Hybrid search (search_text plus vector_queries, merged with RRF) handles exact codes and meaning; the semantic ranker reorders top results using a semantic configuration and query_type semantic, with no re-embedding.
  8. Integrated vectorization needs an indexer skillset with Text Split and embedding skills plus a vectorizer on the vector profile; changing embedding models means re-embedding every document.
  9. Foundry IQ knowledge bases give agents shared, multi-source, permission-aware, cited agentic retrieval; file search covers uploaded files; the Azure AI Search tool uses an existing index as-is; Memory keeps per-user context.
  10. Function calling runs in your app, the OpenAPI tool lets the service call your API; MCP allowed_tools limits tools and require_approval always gates each call; prompt agent = configuration, hosted agent = your code, Responses API = agent defined in your app.
0/10
Ready to start

Part 1: Which model type fits which task?

Match the model family to input and output: chat, small, reasoning, multimodal, image generation or embedding, then to reasoning depth.

2 min read · 10 parts, about 15 min in allStart lesson

Frequently asked questions

When should I use a small language model instead of a large one in Microsoft Foundry?

Use a small language model, such as a Phi model, when the task is narrow and well defined — classification, routing or simple extraction — and a pilot shows it meets the accuracy you need. It costs less per request and responds faster, which matters at high volume. Small models are also the usual choice for on-device or offline inference with Foundry Local. Use a large model for open-ended generation, broad knowledge or complex instructions.

What is the difference between RAG and fine-tuning for an Azure AI app?

Retrieval-augmented generation retrieves relevant passages from your own content at query time, usually from an Azure AI Search index, and passes them to the model, so answers reflect current documents and can cite them. Fine-tuning retrains a model on examples to change its behaviour, style or output format; it does not reliably add facts, cannot cite sources and goes stale when content changes. Many solutions use RAG for knowledge and fine-tuning or structured outputs for format.

What is hybrid search in Azure AI Search?

Hybrid search runs a full-text keyword query and a vector query in the same request and merges the two ranked result lists with Reciprocal Rank Fusion. It combines exact matching of identifiers such as part or policy numbers with meaning-based matching of paraphrased questions. In the Python SDK a query is hybrid when it sets both search_text and vector_queries. The semantic ranker can then rerank the merged top results.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?