Improving Retrieval Precision in Multi-Agent RAG
This lesson covers the retrieval techniques and architectural patterns that keep grounding precise for each agent in a multi-agent system, where agents need different knowledge with different permissions and irrelevant passages waste tokens and mislead the model.
Learning outcomes
After completing this lesson, you will be able to:
- Apply hybrid search, semantic ranking and filters to improve precision.
- Choose between per-agent knowledge, a retrieval agent and a shared knowledge base.
- Enforce document-level security in retrieval.
Techniques that improve precision
Hybrid search in Azure AI Search runs a keyword (BM25) query and a vector query together and merges the results with Reciprocal Rank Fusion (RRF), so exact terms such as product codes and semantic matches both count. The semantic ranker re-scores the top results with a cross-encoder model and can return captions. Filters on metadata (product, region, date, document type, access groups) remove irrelevant or unauthorized chunks before ranking.
Agentic retrieval uses a model to plan subqueries from a complex or conversational question, runs them in parallel and merges the results, which improves recall for multi-part questions. Query rewriting turns follow-up questions such as "what about the second one?" into standalone queries using the conversation.
The following diagram shows the stages of hybrid retrieval.

Retrieval techniques
Multi-agent RAG patterns
Three patterns are common. In per-agent knowledge, each specialist agent queries its own index or knowledge source (the HR agent queries HR policies, the IT agent queries IT documentation), which keeps retrieval focused and permissions simple. In a retrieval agent pattern, one agent owns search and serves the others, which centralizes query logic and evaluation. In a shared knowledge base, all agents use one Foundry IQ knowledge base or index with filters per agent or per user.
The following table compares the patterns.
| Pattern | Strengths | Watch for |
|---|---|---|
| Per-agent knowledge | Focused results, simple permissions per agent | Duplicated ingestion, inconsistent quality |
| Retrieval agent | Central expertise and evaluation | An extra hop of latency and tokens |
| Shared knowledge base with filters | One ingestion pipeline, consistent behaviour | Filters must be enforced for every query |
Which multi-agent RAG pattern?
Security in retrieval
Whatever the pattern, retrieval must return only content the end user may see. Document-level security stores allowed groups or users in a filterable field and applies a filter built from the user's token on every query; Azure AI Search also supports permission filtering that honours Microsoft Entra ID access lists for supported sources. Agents never decide permissions themselves, and instructions such as "only show documents the user may see" are not access control.
Security trimming
Part numbers not found
A procurement agent uses vector-only search over supplier catalogues. Queries containing part numbers such as "HX-4471-B" return similar but wrong parts, while descriptive queries work well.
Embeddings capture meaning, not exact strings, so similar part numbers end up close together. Hybrid search adds BM25 keyword matching for the exact code, and the semantic ranker orders the merged results; a filter on supplier can narrow further. Switching to a larger embedding model would not reliably distinguish near-identical codes.
Where must the security filters on a retrieval query come from?
Show answer
From the user's token, applied on every query in every pattern, so agents cannot retrieve content the user may not see.
Exam Tips
Remember for the exam
- Default for RAG: hybrid search with semantic ranking and metadata filters.
- Multi-part or conversational questions: agentic retrieval or query rewriting.
- Security filters come from the user's token on every query, in every pattern.