Skip to content

AI · RAG · Enterprise AI · LLMs · Machine Learning · Agentic AI · Context Engineering

Beyond Basic RAG: How Modern Knowledge Systems Are Becoming Enterprise AI Architecture

12 min readMichael Luo

Enterprise RAG deep dive: chunking, hybrid search, reranking, GraphRAG, agentic retrieval, evaluation, and the governance layer most teams overlook.

Retrieval-Augmented Generation, or RAG, started as a practical workaround for a simple problem: large language models do not know everything, and they are often out of date. The early solution was straightforward. Take a user's question, search a vector database, retrieve a few relevant chunks, place them into the prompt, and ask the model to answer.

That basic pattern still works for prototypes. But it is no longer enough for serious enterprise AI.

Modern RAG has evolved from a lightweight wrapper around a vector store into a full knowledge architecture. It now involves document parsing, chunking strategy, embedding design, hybrid search, reranking, graph-based reasoning, agentic orchestration, evaluation pipelines, and governance. In other words, RAG is no longer just "search plus LLM." It is becoming the operating layer for enterprise knowledge systems.

Why RAG Matters More Than Ever

The promise of enterprise AI is not simply that a model can write fluent text. The real value comes when AI can reason over the organisation's actual knowledge: policies, contracts, architecture documents, support tickets, product manuals, meeting notes, customer records, codebases, and operational data.

That is where pure language models fall short.

A model's training data is static. It may not know your company's latest product decision, your internal risk policy, your system dependency map, or the exact customer case being discussed this morning. RAG solves this by giving the model access to relevant external knowledge at inference time.

But the quality of the answer depends heavily on the quality of the retrieval layer. If the wrong context is retrieved, the model will produce a polished but unreliable answer. If the retrieved context is noisy, incomplete, stale, or poorly structured, the model's reasoning will degrade.

This is why modern RAG should be treated as an engineering discipline, not just a prompt engineering technique.

The First Bottleneck: Chunking

Every RAG system begins with a deceptively simple question: how should documents be broken down?

This matters because chunking sets the ceiling for what the model can know. If a document is split badly, the relevant meaning may be scattered across multiple chunks, or the model may receive only half of the idea it needs.

The simplest and most common method is recursive character splitting. It breaks documents into chunks while trying to respect natural boundaries such as paragraphs, sentences, and words. For many use cases, this is good enough. A typical production starting point is somewhere around 400 to 512 tokens per chunk with a small overlap between chunks.

But more advanced systems are moving beyond fixed-size splitting.

Semantic chunking looks at meaning rather than length. It groups sentences together until the semantic similarity shifts significantly, then creates a break. This can improve retrieval because each chunk is more conceptually coherent. The downside is cost: every sentence needs to be embedded or analysed.

Page-level chunking is especially useful for PDFs, financial reports, and table-heavy documents. Instead of breaking content purely by text length, each page becomes a retrieval unit. This preserves visual and document structure, which can matter a lot when interpreting reports, forms, invoices, or regulatory material.

Then there is late chunking, a newer technique where the model first processes the entire document before chunks are created. This means each chunk can carry broader document-level context. For example, a pronoun or abbreviation inside one chunk can still retain meaning from an earlier part of the document.

The lesson is simple: chunking is not a preprocessing detail. It is a core design decision.

Vector Search Is Powerful, but Not Enough

Once documents are chunked, they are usually converted into embeddings. These embeddings place text into a high-dimensional vector space where related meanings sit closer together. When a user asks a question, the query is embedded and compared against stored document embeddings.

This is the foundation of semantic search.

Vector databases make this possible at scale. Instead of comparing a query against every single document, they use Approximate Nearest Neighbour algorithms to search quickly across millions or billions of vectors.

Different indexing approaches offer different trade-offs.

FLAT search compares the query against every vector. It is accurate but slow at scale.

IVF clusters vectors into groups and searches only the most relevant clusters. It is faster but may miss some results.

HNSW builds a graph-like structure that allows very fast search with high recall. It has become one of the most common production choices, although it can require significant memory.

The vector database market has also matured. Pinecone focuses on managed production scale. Qdrant is known for performance and strong metadata filtering. Weaviate is strong in hybrid search. Milvus and Zilliz are built for very large-scale vector workloads. LanceDB is emerging as an AI-native lakehouse approach where vectors live closer to the underlying data.

But vector search has a weakness: it is not always good at exact matching.

If the user asks about an invoice ID, a policy number, a code name, a customer reference, or a very specific phrase, semantic similarity may not be enough. The system needs lexical precision.

That is where hybrid search comes in.

Hybrid Search: Combining Meaning and Precision

A mature RAG system usually combines semantic search with keyword search.

Semantic search is good at understanding meaning. Keyword search is good at exact matches. Hybrid search brings both together.

For example, if a user asks, "What does policy ABC-472 say about access reviews?", a pure vector search may retrieve documents about access reviews generally but miss the exact policy. A keyword search may find the exact policy but miss related explanations. A hybrid system can do both.

Techniques such as BM25, SPLADE, and Reciprocal Rank Fusion allow the system to merge results from different retrieval methods into a stronger candidate set.

This is one of the biggest differences between demo RAG and production RAG. In a demo, semantic search alone may look impressive. In enterprise environments, exactness matters. Names, IDs, dates, clauses, and system identifiers cannot be treated loosely.

Reranking: The Precision Layer

After the first retrieval step, the system may have 20, 50, or even 100 candidate chunks. But not all of them are equally useful.

This is where reranking comes in.

Initial retrieval is usually optimised for speed. It finds a broad set of likely relevant documents. Reranking is optimised for precision. It re-evaluates the query and each candidate document together, then ranks the best results at the top.

This matters because the final LLM answer is only as good as the context it receives. A reranker acts like a quality gate between retrieval and generation.

Modern rerankers can also follow instructions. For example, they can be told to prioritise titles, ignore abstracts, prefer recent documents, or favour policy documents over informal notes. This makes retrieval more controllable and business-aware.

In practical terms, reranking is one of the highest-impact upgrades for a RAG system. Before jumping to exotic architectures, many teams should first improve retrieval quality with hybrid search and reranking.

GraphRAG: When Knowledge Is Relational

Traditional RAG is strong when the answer lives in a small number of relevant chunks. But some questions require understanding relationships.

For example:

"How are these suppliers connected to this operational risk?"

"Which systems depend on this deprecated service?"

"What legal precedents are related across multiple cases?"

"What themes are emerging across hundreds of customer complaints?"

These are not simple lookup questions. They require multi-hop reasoning.

GraphRAG addresses this by converting documents into entities and relationships. Instead of treating knowledge as isolated chunks, it builds a knowledge graph.

A graph might represent facts as relationships such as:

Customer A uses Product B. Product B depends on Service C. Service C is owned by Team D. Team D has an unresolved operational risk.

With this structure, the system can traverse connections and reason across them.

Local GraphRAG starts from entities in the user's query and explores nearby relationships. This is useful for targeted, multi-hop questions.

Global GraphRAG looks across the whole graph, detects communities or clusters, and generates summaries of broader domains. This is useful for large-scale synthesis, such as summarising patterns across many documents.

However, GraphRAG is not free. It requires entity extraction, relationship extraction, graph maintenance, deduplication, metadata governance, and ongoing freshness management. If the graph is poorly maintained, it can create more confusion than value.

The sensible approach is not "use GraphRAG everywhere." It is to start with strong traditional RAG, then introduce GraphRAG only where the use case genuinely requires relational reasoning.

Agentic RAG: From Static Pipeline to Dynamic Reasoning

The next major evolution is agentic RAG.

Classic RAG follows a fixed path: retrieve, augment, generate. Agentic RAG is more dynamic. The system can decide what to do based on the user's intent, the complexity of the question, and the quality of retrieved evidence.

Several patterns are emerging.

An agentic router can decide whether a query should go to vector search, SQL, web search, an internal API, or a knowledge graph.

Adaptive RAG can classify the complexity of the question. A simple factual query may need only one retrieval step. A complex question may require multiple rounds of search and reasoning.

Corrective RAG evaluates whether the retrieved documents are good enough. If they are weak, ambiguous, or irrelevant, the system can search again or use another tool.

Self-reflective RAG allows the model to critique its own retrieval and answer quality. It can decide whether more evidence is needed before responding.

Speculative RAG uses a smaller model to generate candidate answers quickly, while a larger model verifies and selects the best response. This can reduce latency while preserving quality.

This is where RAG starts to feel less like a search pipeline and more like an intelligent research assistant.

Does Long Context Replace RAG?

A common question is whether million-token context windows make RAG obsolete.

The answer is no.

Long-context models are powerful, but they do not remove the need for retrieval. They change how retrieval should be designed.

There are three main reasons.

First, cost and latency. Sending huge amounts of text into a model is expensive and slow. In many enterprise use cases, it is far more efficient to retrieve the most relevant 2,000 to 10,000 tokens than to pass an entire document library into the prompt.

Second, context degradation. Even if a model can technically accept a huge context window, it may not reliably use every part of that context. Important details buried in the middle can be missed.

Third, scale and freshness. RAG can search across live systems, databases, APIs, and hundreds of millions of documents. A context window is still bounded. Retrieval lets the system select what matters now.

The best architecture is not "RAG versus long context." It is retrieval-first, long-context containment.

In other words, use RAG to filter a massive knowledge space into a concentrated, high-signal context package. Then use a long-context model to reason deeply over that curated material.

Evaluation: The Missing Discipline in Many RAG Projects

Many RAG systems fail not because the idea is wrong, but because teams do not evaluate them properly.

A RAG system has multiple possible failure points. It may retrieve the wrong documents. It may retrieve the right documents but include too much noise. It may generate an answer that is not supported by the retrieved context. Or it may answer fluently but miss the user's actual intent.

Modern evaluation frameworks such as RAGAS, TruLens, and DeepEval focus on three key dimensions:

Context relevance: did the system retrieve useful information?

Faithfulness: is the answer grounded in the retrieved context?

Answer relevance: did the answer actually address the question?

This evaluation needs to be part of CI/CD. When teams change chunking strategies, embedding models, prompts, rerankers, or document ingestion logic, they need regression tests. Otherwise, a system can silently get worse.

But there is another layer that matters even more in enterprises: context governance.

The system should know which documents are current, which are deprecated, who owns them, when they were last reviewed, whether they are authoritative, and whether the user is allowed to access them.

A RAG system without governance is just a faster way to spread stale or unauthorised information.

What a Modern RAG Architecture Looks Like

A strong enterprise RAG architecture usually includes several layers:

The ingestion layer parses documents, extracts metadata, handles permissions, and tracks freshness.

The chunking layer chooses the right strategy for each document type.

The embedding layer converts content into semantic representations.

The retrieval layer combines vector search, keyword search, metadata filtering, and sometimes graph traversal.

The reranking layer improves precision before generation.

The orchestration layer decides which tools or retrieval paths to use.

The generation layer produces the final answer with citations and guardrails.

The evaluation layer continuously measures retrieval and answer quality.

The governance layer manages access control, lineage, freshness, ownership, and compliance.

This is why RAG is becoming a serious architecture concern. It touches data engineering, AI engineering, security, platform engineering, product design, and enterprise governance.

The Real Future of RAG

The future of RAG is not just better vector search. It is the emergence of intelligent knowledge systems.

These systems will not simply retrieve documents. They will understand intent, inspect evidence, compare sources, reason across relationships, detect uncertainty, cite their work, and know when not to answer.

For engineering leaders, this creates a major opportunity. RAG is not just a technical capability; it is a way to make organisational knowledge usable. It can reduce support load, accelerate onboarding, improve decision-making, preserve institutional memory, and help teams operate with more clarity.

But the winning systems will not be the ones with the flashiest demos. They will be the ones with the strongest foundations: clean data, thoughtful chunking, hybrid retrieval, precise reranking, robust evaluation, secure access control, and continuous governance.

The next generation of enterprise AI will not be powered by language models alone.

It will be powered by well-engineered context.