Enterprise RAG: connecting AI to your documents
Retrieval augmented generation connects a language model to your internal documents. It answers using your data, without sending it to a third party and without retraining the model.

What RAG is, and why it matters for the enterprise
A language model does not know your contracts, your procedures or your knowledge base. Retraining it on these documents is costly and goes stale with every update. Retrieval augmented generation solves the problem differently: it retrieves useful passages at query time and places them in the model's context, and the model answers based on them. The data stays where it is, and a source can change without retraining. The general framework is set out in our definition of the sovereign AI platform.
The 2026 RAG pipeline, step by step
The architecture of a simple vector index with similarity search, common in 2023, fails on real corpora. The current pipeline consists of two flows: an offline indexing stage that prepares the documents, and an online chain that processes each question.
| Step | Role |
|---|---|
| Semantic chunking | Segment where meaning changes rather than at a fixed size, for passages that are self-contained |
| Hybrid search | Combine keywords (BM25) and vectors, merged by reciprocal rank fusion, sometimes with a graph layer |
| Reranking | A cross-encoder re-scores the 20 candidates and keeps the best 5 |
| Cited generation | The model answers from 3 to 5 passages, with sources |
Chunking: the first decision that matters
Fixed-size chunking gets going quickly and plateaus just as fast. Semantic chunking segments where meaning changes, by comparing neighbouring sentences. The goal remains coherence: each passage should answer a question on its own. Along with the choice of embedding model, chunking is the lever that weighs most on quality, and it fails silently without an evaluation harness from the first week.

Hybrid search and reranking
Purely vector search misses exact matches, keyword search misses closeness of meaning. In 2026, the default architecture combines both, merged by reciprocal rank fusion. Reranking then makes the difference: a cross-encoder jointly evaluates the question and each passage, which distinguishes the passage that is genuinely relevant from the one that is merely close. The rule of thumb fits in one line: retrieve twenty candidates, keep five, send three to five to the model.
This mechanism matches QDNA's three-layer memory: hybrid recall merges the vector layer via Qdrant and the graph via FalkorDB, then a reranker re-ranks the results. The embedder and the reranker run on-premises on GPU.
RAG or fine-tuning
The two approaches complement each other rather than compete. RAG controls what the model knows, fine-tuning shapes how it answers. RAG suits knowledge that changes, sources that must remain citable, and access control. Fine-tuning suits tone, format and repeated tasks. A serious platform often combines both.
Governance: access control at search time
As soon as a system touches internal knowledge or regulated data, it needs controls that scale. RAG must respect permissions at search time, not after generation. A user should only see, in the context, the passages they are entitled to. The semantic router adds a layer: it distinguishes confidential content from public content and keeps sensitive content on a local model.
Two blind spots lurk beyond hallucination. Stale context produces an answer that is accurate but outdated, which teams struggle to spot. Without observability, a search failure remains invisible: if you cannot see what the search returned, you cannot fix it. A RAGAS-style evaluation framework measures quality continuously.
Serving RAG on-premises
The whole stack runs on your infrastructure. vLLM serves the model with the KV cache, LiteLLM unifies access and enforces quotas, and the vector store as well as the graph remain local. The practical follow-up is in our guide to installing a local LLM, and the conversational use case in the article enterprise chatbot.
Frequently asked questions
What is RAG?
Retrieval augmented generation connects a language model to a document base. It retrieves the relevant passages at query time and feeds them to the model, which answers based on them, with sources.
RAG or fine-tuning, which to choose?
The two complement each other. RAG controls what the model knows and suits knowledge that changes; fine-tuning shapes tone and format. A platform often combines both.
Can RAG run on-premises and in the enterprise?
Yes. The model, the vector store, the graph, the embedder and the reranker run on your infrastructure. Documents never leave the enterprise, which eases compliance.
Why isn't a simple vector index enough?
Similarity search alone often fails on a real corpus. The 2026 pipeline adds hybrid keyword-plus-vector search, cross-encoder reranking and access control at search time.
Why do RAG projects fail in production?
Failure rarely comes from the model. It comes from a poorly chunked corpus, a search that surfaces off-topic passages, and a lack of measurement. A reliable pipeline continuously evaluates answer relevance, corrects chunking and reranking, and traces every cited source.
Let's connect AI to your documents
A call to scope the RAG pipeline, the document base and access control on your data.
Book a call