AI-103: Choose Foundry Models, Retrieval Methods and Agent Tools
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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
- 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.
- 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.
- 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.
- 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.
- 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.
- RAG for private, changing knowledge with citations; fine-tuning for style and format; structured outputs for a fixed JSON schema.
- 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.
- 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.
- 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.
- 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.
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.
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.