Key takeaways
Diagnose why an AI answer failed before investing in a more advanced architecture.
Combine keyword and semantic retrieval when exact references and conceptual meaning are both important.
Use hierarchical, graph-based or multi-step retrieval for questions that genuinely need broader context or relationships.
Keep permission enforcement, source freshness and evidence validation outside the language model's discretion.
Measure retrieval quality separately from answer quality and compare each new pattern with a simpler baseline.
Optimise cost per dependable answer, not the number of documents retrieved or the sophistication of the technology.
Your chatbot found the policy. Why did it still get the answer wrong?
Imagine an insurance service team using an AI assistant to answer a customer's question about whether emergency treatment overseas is covered under a particular travel policy. The assistant finds a document containing the words 'emergency medical treatment' and produces a convincing answer. But it misses the policy endorsement that changes coverage for the customer's product and the exclusion that applies to the treatment.
The problem is not necessarily the intelligence of the language model. The assistant may have received incomplete evidence, selected the wrong policy version or overlooked a condition elsewhere in the document. A better prompt cannot reliably compensate for information that never reached the model.
Retrieval-augmented generation (RAG) connects a large language model (LLM) to external knowledge at the time of a request. A typical application searches approved information sources, presents relevant evidence to the model and generates an answer. Advanced RAG architecture patterns improve how that evidence is selected, connected, checked and used.
The real opportunity is to make AI useful for the questions that matter to a business, not merely the ones that make a demonstration look impressive. That starts with understanding how information is organised and why ordinary retrieval can fail.
Where basic RAG breaks down
A conventional RAG pipeline divides documents into smaller passages, or chunks, converts them into numerical representations called embeddings, and stores these representations in a searchable index. At question time, it retrieves similar passages and sends them to the model. This can be effective for straightforward questions with answers contained in a small number of passages.
Enterprise questions are rarely all alike. A request for policy reference TR-204 requires exact identification. A question about overseas treatment requires understanding meaning. Comparing exclusions across product variants requires several pieces of evidence. A question about recurring complaint themes may require analysis across an entire collection rather than the nearest few passages.
Another difficulty is that relevance is not the same as authority. A superseded policy can be a perfect semantic match but an inappropriate source for the customer's contract. A restricted document can contain the right answer but be unsuitable for the current user.
Treat retrieval, evidence assembly and answer generation as different engineering responsibilities. Microsoft's architecture guidance similarly separates knowledge preparation from query-time orchestration and recommends evaluating the design choices at each stage.[1]
Pattern 1 — Hybrid retrieval: find the words and the meaning
Keyword search is useful for product identifiers, clause numbers, technical terms and names. Vector search is useful when the user's wording differs from the document's wording. Neither is consistently sufficient for every enterprise question.
Hybrid retrieval runs complementary searches over authorised content and combines their ranked results. One established technique is reciprocal rank fusion (RRF), which combines result positions instead of assuming that keyword and vector similarity scores have the same scale.[2]
A second-stage reranker can then assess the relationship between the original question and the shortlisted passages more closely. The retrieval stage aims to find the necessary evidence; reranking aims to put the most useful candidates near the top. A reranker cannot recover a document that was never retrieved.
For an insurance assistant, this can help locate both a specific policy identifier and passages discussing similar coverage concepts. Metadata filters must still enforce the applicable product, contract version and user entitlements. Evaluate whether the improvement in evidence quality justifies the additional search and reranking overhead.
Pattern 2 — Hierarchical retrieval: read beyond the fragment
Small passages are often good search targets but poor standalone evidence. A paragraph stating that a benefit is available may sit immediately below a heading limiting eligibility, or immediately above a table containing exceptions.
Parent-child retrieval addresses this by indexing smaller passages for precise search while retaining links to larger sections or parent documents. Once a relevant passage is found, the application can recover its heading, surrounding conditions and associated tables before assembling the context.
For questions about a lengthy document or collection, another approach is to retrieve information at several levels of abstraction. The RAPTOR research architecture constructs a hierarchy of summaries and underlying text segments, allowing retrieval at different levels of detail. Its published experiments demonstrate the potential of this approach for complex question answering.[3] Generated summaries, however, can omit important conditions; retain links to original passages and verify consequential claims against them.
Avoid treating a larger context window as a substitute for good retrieval. Research published in Transactions of the Association for Computational Linguistics found that the position of relevant information in long inputs affected model performance in the evaluated tasks.[4] Test your own model and context ordering rather than simply sending more documents.
Pattern 3 — GraphRAG: connect information across documents
Some questions are about relationships rather than individual passages. A procurement leader might ask which critical suppliers depend on the same subcontractor, or a risk team might want to explore recurring relationships between control weaknesses, processes and business units.
Graph-based retrieval represents entities and their relationships in a graph. Depending on the design, it can retrieve connected entities, supporting passages or summaries of groups of related information. Microsoft's GraphRAG research combines an extracted knowledge graph with summaries of related communities to address broad questions over document collections.[5]
The attraction is not that a graph makes a language model automatically more accurate. It is that connected information can be accessed in ways that an isolated similarity search may miss. The trade-off is the effort needed to resolve entity identities, validate relationships, maintain the graph and preserve provenance and access permissions.
Use a graph where relationships are central to the business problem. Where the answer is a precise count, exposure amount or contractual obligation, an authoritative database query or validated relationship record may be a better source than a graph inferred from narrative documents.
Pattern 4 — Multi-step and agentic RAG: answer the whole question
Suppose a service adviser asks whether a customer's treatment is covered, whether authorisation was required and which documentation must be submitted. One search may return medical coverage while missing pre-authorisation and claims procedures.
A fixed multi-step pipeline can split the question into known subquestions, search each relevant source and combine the resulting evidence. This is suitable when the required workflow is predictable.
Agentic RAG goes further by allowing an orchestrating AI model to decide which approved retrieval tool to call, inspect intermediate results and perform additional searches if necessary. Microsoft's technical guidance distinguishes this dynamic approach from a predetermined search-and-generate sequence.[6]
That flexibility creates operational risks. Limit the available sources, number of retrieval steps, token budget and overall deadline. Preserve the user's identity and permissions throughout. If evidence remains incomplete, the system should request clarification or return a qualified answer rather than continuing indefinitely.
Use deterministic orchestration for known processes whenever it can meet the requirements. Agentic retrieval is most valuable when the information path genuinely cannot be established in advance.
Pattern 5 — Corrective retrieval: know when evidence is not enough
A production RAG system should be able to recognise when the retrieved material is insufficient. A corrective approach introduces an evidence assessment before generation or checks the draft answer against its sources afterwards. Weak evidence can trigger an alternative search, a more focused query or human review.
For example, if a retrieval result contains a general insurance policy but not the customer's applicable endorsement, the system can search for that endorsement rather than treating the general wording as definitive. If an authoritative source is unavailable, the application should explicitly say what could not be established.
Self-RAG is a research framework in which a trained model adaptively retrieves and critiques its generations using specialised reflection tokens.[7] An enterprise application can adopt the broader principle of evidence checking without implementing that particular trained architecture.
Do not confuse a model's statement that it is confident with reliable verification. Check that each material claim is supported by an authorised source, that the source applies to the question and that conflicting evidence has been addressed. For consequential decisions, use independent business rules or qualified human review.
The architecture behind a trustworthy enterprise assistant
The knowledge pipeline needs more than an embedding model. It must preserve document identity, headings, tables, effective dates, product or jurisdiction, ownership, source location and permissions. Index updates should reflect source changes, deletions and access revocations. Scanned pages and complex tables require extraction quality checks before indexing.
At query time, authenticate the user and establish the relevant business context using trusted application data. Apply source and document permissions before content is exposed to any reranker, generative model or unauthorised processing service. Preserve equivalent restrictions on parent passages, graph entities, generated summaries, caches and logs.
Select the simplest permitted retrieval pattern that can meet the question's evidence needs. Deduplicate overlapping results, assemble a bounded context with source identifiers, and instruct the model to distinguish supported facts from uncertainty. Validate references against the retrieved passages rather than accepting invented citations.
Treat retrieved documents as data, not as instructions that can override application controls. A malicious instruction embedded in a document must not grant access, initiate an external action or change the system's operating rules. Avoid storing raw sensitive prompts or retrieved text unnecessarily.
The NIST Generative AI Profile provides voluntary guidance for managing generative AI risks across the lifecycle.[8] Use risk-based controls and testing that reflect the actual business application; a reference framework does not by itself establish compliance or safe performance.
Which RAG architecture should your organisation choose?
Do not implement every pattern simply because it is available. Use the type of information failure to decide where an architectural change is justified.
Basic RAG | Best fit: Direct questions answered by one authoritative passage | Cost profile: Relatively few processing stages | Watch for: Missing conditions, poor chunking or stale content.
Hybrid retrieval and reranking | Best fit: Exact identifiers and natural-language questions | Cost profile: Parallel search plus additional ranking | Watch for: Retrieval misses and unnecessary ranking latency.
Hierarchical retrieval | Best fit: Long contracts, manuals and policy documents | Cost profile: Extra document structure, context expansion or summaries | Watch for: Context overflow and omitted exceptions.
GraphRAG | Best fit: Relationships, dependencies and broad themes | Cost profile: Graph construction, validation and maintenance | Watch for: Incorrect entity links, access leakage and outdated relationships.
Multi-step or agentic RAG | Best fit: Questions requiring evidence from several sources | Cost profile: Multiple searches and possible model calls | Watch for: Excessive iterations, incomplete subquestions and inconsistent permissions.
Corrective retrieval | Best fit: Workflows where evidence insufficiency must be detected | Cost profile: Verification and potential retries or review | Watch for: False acceptance and unnecessarily rejected answers.
These patterns can coexist. A practical insurance assistant might use hybrid retrieval for most requests, parent-section expansion for contractual conditions and controlled multi-step retrieval for compound questions. Graph-based retrieval would be a separate investment only if relationship-based questions justify it.
Measure the evidence, not just the fluency of the answer
Create an evaluation set from representative, authorised questions, including ambiguous wording, multilingual requests, difficult tables, contradictory versions, missing answers and attempted access to restricted information. For each question, record the expected evidence and acceptable answer or escalation behaviour.
Retrieval recall at K measures the proportion of known relevant items appearing among the first K retrieved results, using a defined evidence unit and relevance judgements. For questions with several mandatory conditions, also measure whether all required evidence was retrieved. Ranking metrics help diagnose whether useful evidence appears early enough to reach the final context.
Assess answer correctness against the business reference, claim-level support by cited passages, citation validity, and the ability to abstain when evidence is insufficient. A grounded answer can still be wrong if its source is outdated or inapplicable. Automated evaluators can assist with testing, but should be calibrated against human judgements.
Measure security and operations separately: unauthorised content exposure, index freshness, end-to-end response time including additional retrieval, escalation rates and cost per accepted answer. Divide total attributable delivery cost by the number of answers meeting the defined acceptance standard, including failed attempts and review in the cost numerator.
Compare proposed improvements against the same baseline and held-out test questions. A more sophisticated pattern is worth retaining only if its benefits justify its extra latency, cost, operational effort and risk.
Build for the questions your business actually needs answered
Start with one valuable knowledge workflow. Establish a reliable source of truth, permissions, document lifecycle and a basic retrieval baseline. Review failed answers with subject-matter experts and classify the underlying causes before choosing enhancements.
A search engine with authoritative filters may be enough when users only need to locate a document. A database query may be more dependable for precise account balances or operational counts. Fine-tuning may help a model learn a consistent output format or task behaviour, but does not replace access to current business evidence.
If your organisation already has a generative AI assistant that struggles with policy accuracy, complex documents or cross-system questions, a focused review of its retrieval pipeline, evidence quality and evaluation approach can reveal where investment is most useful.
In my view, the best RAG architecture is not the one with the most components. It is the one that knows which information to use, which information it must not disclose and when it does not have enough evidence to answer.
References and further reading
[1] Microsoft Azure Architecture Center. Design and develop a RAG solution. Source: https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/rag/rag-solution-design-and-evaluation-guide
[2] Microsoft Learn. Relevance scoring in hybrid search using Reciprocal Rank Fusion (RRF). Source: https://learn.microsoft.com/en-us/azure/search/hybrid-search-ranking
[3] Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. International Conference on Learning Representations. Source: https://proceedings.iclr.cc/paper_files/paper/2024/hash/8a2acd174940dbca361a6398a4f9df91-Abstract-Conference.html
[4] Liu, N. F., et al. (2024). Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 12, 157–173. Source: https://aclanthology.org/2024.tacl-1.9/
[5] Edge, D., et al. (2024). From Local to Global: A Graph RAG Approach to Query-Focused Summarization. Microsoft Research, preprint. Source: https://www.microsoft.com/en-us/research/publication/from-local-to-global-a-graph-rag-approach-to-query-focused-summarization/
[6] Microsoft Azure Architecture Center. Develop an agentic RAG solution. Source: https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/rag/rag-agentic
[7] Asai, A., et al. (2024). Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection. International Conference on Learning Representations. Source: https://proceedings.iclr.cc/paper_files/paper/2024/hash/25f7be9694d7b32d5cc670927b8091e1-Abstract-Conference.html
[8] National Institute of Standards and Technology (2024). Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile. NIST AI 600-1. Source: https://doi.org/10.6028/NIST.AI.600-1
Apply the approach
Consider an insurance knowledge assistant asked whether a particular overseas medical treatment is covered. A dependable response requires the applicable policy wording, the relevant endorsement and any treatment-specific exclusion or authorisation condition. The assistant must establish applicability from approved records before answering and refer unresolved coverage questions to a qualified claims specialist.
Retrieve the correct product and version for the customer's contract; do not substitute the newest generic policy for the applicable wording.
Retrieve relevant amendments, conditions and exceptions; expand the parent section or run additional authorised searches when necessary.
Cite the applicable evidence, acknowledge unresolved conditions and escalate uncertain coverage decisions rather than making a binding determination.
Put the approach into practice
- 01Choose a business knowledge workflow and define which answers are acceptable, uncertain or subject to human review.
- 02Audit source quality, document structure, applicable versions, access permissions and index freshness before tuning retrieval.
- 03Establish a simple RAG baseline and use representative failures to identify the patterns worth testing.
- 04Compare retrieval recall, mandatory evidence coverage, answer correctness, citation support, latency and cost per accepted answer on held-out cases.
- 05Deploy improvements through a controlled rollout, monitor security and performance, and maintain clear ownership of source changes and escalation rules.
Frequently asked questions
What is the difference between basic and advanced RAG?
Basic RAG generally retrieves passages using a fixed search process and provides them to a model. Advanced RAG adapts retrieval and context preparation to the question through techniques such as hybrid search, reranking, hierarchical retrieval, graph-based retrieval or multi-step search. These techniques should address observed failure modes rather than be added automatically.
Do advanced RAG systems need a vector database?
Not necessarily. RAG needs a way to access suitable evidence. This may involve keyword search, a search engine with vector capabilities, a relational database, a knowledge graph or an authorised API. A dedicated vector database is an implementation choice rather than a mandatory architectural component.
How is GraphRAG different from agentic RAG?
GraphRAG focuses on representing and retrieving connected knowledge, often through entities, relationships and summaries. Agentic RAG focuses on dynamically planning and executing retrieval steps. An agent can query a graph, but either architecture can exist without the other.
Can advanced RAG eliminate hallucinations?
No. Retrieval can reduce unsupported responses when it provides reliable, relevant evidence, but errors can still arise from missing information, incorrect source selection, inaccurate summaries and the model's interpretation. Evidence validation, controlled abstention and appropriate human oversight remain necessary.
How large should document chunks be for RAG?
There is no universal chunk size. Choose boundaries that preserve the meaning and structure of the source, including clauses, headings and tables. Evaluate different sizes and overlaps on representative questions, and expand to a parent section when a small passage lacks necessary context.
When should a business invest in advanced RAG?
Invest when measured failures in a simpler baseline demonstrate a business need that a particular pattern can address. Compare the improvement in accepted answers and risk controls with the full cost of additional indexing, search, inference, review and maintenance. If ordinary search or a fixed workflow meets the requirements, keep that simpler approach.