Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Foundry IQ (Azure AI Search) provides direct indexing and query APIs alongside higher-level knowledge source and knowledge base APIs for managed retrieval. Use the Azure portal, REST APIs, or Azure SDKs to configure these capabilities, or connect agents to knowledge bases in the Microsoft Foundry portal.
In Foundry IQ (Azure AI Search), agentic retrieval is a multi-query pipeline designed for complex questions posed by users or agents in chat and copilot apps. It's intended for retrieval-augmented generation (RAG) patterns and agent-to-agent workflows.
Here's what agentic retrieval does:
Can use LLM-based query planning to break down a complex query into smaller, focused subqueries for better coverage across proprietary and external content. Query planning can use chat history for additional context.
Runs subqueries in parallel. Each subquery is semantically reranked to promote the most relevant matches.
Combines the best results into a unified response that an LLM can use to generate grounded answers.
Can return source references and an activity log alongside the merged content, so you can use just the grounding data or pass it to an LLM for a full answer.
This high-performance pipeline helps you generate high-quality grounding data or answers for your chat application, with the ability to answer complex questions quickly.
Why use agentic retrieval?
Foundry IQ supports both managed and custom agentic retrieval experiences for agents and apps. Use knowledge bases in the Microsoft Foundry portal. Access the same retrieval capabilities through the Azure portal, Search Service REST API, or a supported Azure SDK.
Use agentic retrieval when you want to provide agents and apps with the most relevant content for answering harder questions, drawing on chat context, your proprietary content, and external sources.
Agentic retrieval adds latency compared to a single-query pipeline, but it handles query complexity that a single query can't. For example, it can handle:
Questions with multiple asks, such as "find me a hotel near the beach, with airport transportation, and that's within walking distance of vegetarian restaurants."
Questions that depend on earlier context in the conversation.
Queries that benefit from rewriting, using synonym maps and LLM-generated paraphrasing to expand coverage across your content.
Spelling mistakes.
Architecture and workflow
The agentic retrieval process works as follows:
Workflow initiation: Your application calls a knowledge base with a retrieve action that provides a query and conversation history.
Query planning: At
lowandmediumeffort, a configured LLM plans queries and selects sources. Ordinaryminimalbypasses model-based planning and searches all candidate sources. Set effort explicitly on the knowledge base or request rather than assuming a universal default. The November preview Microsoft Retriever 1 path has separate behavior.Query execution: The knowledge base sends the subqueries to your knowledge sources. All subqueries run simultaneously and can be keyword, vector, or hybrid search. Each subquery undergoes semantic reranking to find the most relevant matches. References are extracted and retained for citation purposes.
Result synthesis: The system combines retained results into extractive content or a model-synthesized answer. Answer synthesis requires a model independently of planning effort. Source references and an execution activity log are optional.
Components
For all agentic retrieval scenarios, a knowledge base and at least one knowledge source are required. Other components are optional and depend on your configuration.
| Component | Service | Role |
|---|---|---|
| Knowledge base | Foundry IQ | Orchestrates the pipeline, managing knowledge sources and query parameters. |
| Knowledge source | Foundry IQ | Defines the content used in the pipeline. Can be indexed (backed by a search index on your service) or remote (content retrieved at query time from an external platform). |
| Search index | Foundry IQ | Stores searchable content (text and vectors) with a semantic configuration. Determines which query types run and which optimizations apply. Required for indexed knowledge sources only. |
| Semantic ranker | Foundry IQ | Used internally by the agentic retrieval pipeline to rerank results for relevance (L2 reranking). |
| LLM | Azure OpenAI | Can plan queries, select knowledge sources, summarize web results, and generate citation-backed answers. Ordinary minimal extraction from an existing search index or file source doesn't require a chat model. |
Integration requirements
Your application drives the pipeline by calling the knowledge base and handling the response. The pipeline returns grounding data that you can pass to an LLM for answer generation or use directly in your conversation interface. For implementation details, see Tutorial: Build an end-to-end agentic retrieval solution.
Feature availability
Agentic retrieval supports both generally available and preview capabilities. Choose the Search Service REST API version that matches your agentic retrieval experience:
Use
2026-10-01for the GA REST contract: minimal, low, and medium effort; model-backed planning and answer synthesis; citations; SSE; per-request source controls and limits; activity warnings; and KB CORS.Use a supporting preview API for preview-only capabilities.
2026-11-01-previewadds Microsoft Retriever 1, named KB tools, additional GPT-6 model identifiers, and asynchronous file ingestion.auto, retrieve defaults, query hints, and result-processing controls aren't part of2026-10-01.Existing
2026-04-01examples retain their narrower minimal, extractive contract. Existing SDK and portal workflows have their own version boundaries; the GA REST contract doesn't establish parity for every client or ingestion feature.
Start with GA knowledge base creation and retrieval. Review version-specific migration changes before moving existing definitions to a different contract.
Region availability, limits, and billing
Before you use agentic retrieval, review its regional availability, service limits, and billing model.
Region availability
Agentic retrieval is available in select regions.
Limits
Knowledge sources and knowledge bases have maximum limits that vary by pricing tier and retrieval reasoning effort.
Billing
Agentic retrieval can include the following billing components:
Foundry IQ bills for retrieval tokens consumed during subquery execution and semantic ranking. The free plan (default) provides a monthly token allowance. The standard plan enables pay-as-you-go pricing after the free allowance is consumed. For more information, see Enable or disable agentic retrieval billing.
Azure OpenAI bills for input and output tokens used in LLM-based query planning and answer synthesis. Pricing is pay-as-you-go and based on the model you assign to the knowledge base. Charges appear on your Azure OpenAI bill. For rates, see Azure OpenAI pricing.
Microsoft Retriever 1 (preview) usage is measured in input tokens processed during query planning. Input includes the user's question and, during follow-up planning, previous queries and document evidence sent back to the model. Retries and follow-up planning rounds add input tokens. Output tokens are free. This usage is separate from Foundry IQ retrieval tokens and Azure OpenAI charges. For more information, see Use Microsoft Retriever 1.
The following table compares billing between the classic single-query pipeline and the agentic retrieval multi-query pipeline. In the classic pipeline, the billable component is semantic ranker. The table excludes Microsoft Retriever 1, Azure OpenAI, and other service charges.
| Aspect | Classic pipeline | Agentic retrieval |
|---|---|---|
| Unit | Query based | Token based |
| Cost per unit | Uniform cost per query | Variable cost per token (depends on reasoning effort) |
| Cost estimation | Estimate query count | Estimate token usage |
| Free allowance | Monthly free query allowance | Monthly free token allowance |
Example: Estimate costs
This example helps illustrate the cost estimation process for query planning and query execution, but not answer synthesis. Your costs could be lower. For current rates, see Foundry IQ pricing and Azure OpenAI pricing.
Use symbolic rates per million tokens:
R_search: The Foundry IQ retrieval and reranking token rate.R_inputandR_output: The input and output token rates for the selected Azure OpenAI model.R_retriever: The Microsoft Retriever 1 input token rate when a published rate is available.
Supply current published rates from the pricing links. For Microsoft Retriever 1 pricing updates, see Use Microsoft Retriever 1.
To estimate the query plan costs as pay-as-you-go in Azure OpenAI, assume gpt-4o-mini:
- 2,000 input tokens for average chat conversation size.
- 350 tokens for average output plan size.
Estimated billing costs for query execution
To estimate agentic retrieval token counts, start with an idea of what an average document in your index looks like. For example, you might approximate:
- 10,000 chunks, where each chunk is one to two paragraphs of a PDF.
- 500 tokens per chunk.
- Each subquery reranks up to 50 chunks.
- On average, there are three subqueries per query plan.
Calculating price of execution
Assume you make 2,000 agentic retrievals with three subqueries per plan. This gives you about 6,000 total queries.
Rerank 50 chunks per subquery, which is 300,000 total chunks.
The average chunk is 500 tokens, so the total tokens for reranking is 150 million.
Multiply 150 million reranking tokens by the per-million-token rate to get
150 × R_search.For query planning, multiply 2,000 input tokens by 2,000 agentic retrievals. The 4 million input tokens cost
4 × R_input.For output, multiply 350 tokens by 2,000 agentic retrievals. The 700,000 output tokens cost
0.7 × R_output.
In this example, Azure OpenAI query planning costs 4 × R_input + 0.7 × R_output. Including Foundry IQ retrieval and reranking, the combined cost is 150 × R_search + 4 × R_input + 0.7 × R_output. Answer synthesis charges are separate.
Estimated costs for Microsoft Retriever 1 query planning
Now assume that Microsoft Retriever 1 plans the queries instead of gpt-4o-mini. Use the same 2,000 agentic retrievals and these assumptions:
- No charge for output tokens.
- 10,000 input tokens per agentic retrieval. This hypothetical average includes the conversation and any previous queries and document evidence replayed during follow-up planning.
Multiply 10,000 input tokens by 2,000 agentic retrievals to get 20 million input tokens. When a published rate is available, the planning cost is
20 × R_retriever.Output tokens are free, so there's no output token charge.
The Foundry IQ reranking cost stays at
150 × R_searchbecause retrieval tokens are billed separately.
The combined cost in this scenario is 150 × R_search + 20 × R_retriever. Don't add the Azure OpenAI query-planning cost because Microsoft Retriever 1 handles planning in this scenario. If you also call Azure OpenAI for answer synthesis or external escalation, add those charges separately.
Tips for controlling costs
Review the activity log in the response to find out what queries were issued to which sources and the parameters used. You can reissue those queries against your indexes and use a public tokenizer to estimate tokens and compare to API-reported usage. However, you might not be able to reconstruct a query or response exactly. For example, the knowledge source type can affect whether you can reproduce a query. Public web data and remote SharePoint knowledge sources that depend on a user's identity are two examples.
Reduce the number of knowledge sources (indexes). If you consolidate content, fewer sources get queried and fewer tokens get used.
Lower the reasoning effort to reduce LLM usage during query planning and query expansion (iterative search).
Organize content so the most relevant information can be found with fewer sources and documents (for example, curated summaries or tables).
If you use Microsoft Retriever 1, reduce the document evidence you process during planning. Retries and follow-up planning rounds add input tokens, so include them when you estimate usage.
How to get started
To create an agentic retrieval solution, you can use the Azure portal, Microsoft Foundry (new) portal, REST APIs, or an equivalent Azure SDK package.
- Quickstart: Agentic retrieval in the Azure portal
- Quickstart: Agentic retrieval (C#, Java, JavaScript, Python, TypeScript, REST)