Most enterprise RAG deployments share a common architectural assumption: that documents are flat sequences of text, best divided by token count into retrievable fragments. That assumption is wrong, and the consequences show up not as dramatic failures but as a slow erosion of trust. Business users stop asking questions they once expected the system to answer. Accuracy complaints accumulate. The prototype that impressed in a demo becomes the system nobody quite relies on.
Companion piece to our broader work on retrieval and document reasoning. See Why LLMs Miss Answers in Documents for an analysis of context utilisation gaps and recursive evidence replay.
The Structural Signal You Are Discarding at Indexing Time
Every well-authored enterprise document carries implicit retrieval metadata. Tables of contents, section hierarchies, numbered clauses, and heading structures encode the author's own understanding of where information lives and how topics relate to one another. When a chunking pipeline splits a document by token length, it discards precisely this signal.
The result is that retrieval operates on decontextualised fragments. A chunk containing the answer to a query may have lost the heading that identifies which product version, regulatory scope, or procedural phase it belongs to. The retrieval model then has to reconstruct context from the text alone, which it frequently cannot do with sufficient precision.
This is not a model quality problem. It is an indexing architecture problem, and no amount of prompt engineering or model fine-tuning will compensate for information that was removed before the model ever saw it.
Lost in the Middle: Why Long Context Does Not Solve the Problem
As context windows have grown, a common response to retrieval failures has been to pass more text to the model and rely on its attention mechanism to find the relevant passage. This approach is less reliable than it appears. LLMs consistently underweight evidence that appears in the middle of long contexts, a pattern documented as the "lost in the middle" problem (Kumar et al., arXiv 2026).
The implication is that precise retrieval is not made redundant by larger context windows. It becomes more important. If the retrieval step surfaces the wrong chunks, placing them in a long context does not correct the error. The model attends to the wrong material and generates an answer that is confident and wrong.
For enterprise knowledge systems, where users are making decisions based on policy documents, technical specifications, or regulatory filings, this failure mode carries real commercial risk.
What Structure-Aware Retrieval Actually Looks Like
The STAIR Architecture
Researchers at IBM have proposed STAIR (Structure Aware Information Retriever), a retrieval system that preserves global document structure during indexing rather than discarding it. The core mechanism is a fine-tuned Differentiable Search Index (DSI) that encodes table-of-contents information directly into model parameters, so that retrieval queries are answered against a structured representation of the corpus rather than a flat bag of chunks (Kumar et al., arXiv 2026).
The performance difference is measurable and statistically significant. STAIR achieves a Recall@1 score of 82.6% on the SearchTome benchmark, compared to 76.9% for standard DSI, 68.7% for DPR, and 59.5% for BM25. Hallucination rates fall below 0.05%, a threshold that is meaningful in production rather than merely impressive in a paper.
Why DSI Matters for Enterprise Corpora
A Differentiable Search Index encodes the mapping from queries to document identifiers inside the model's weights rather than in an external vector store. This means the retrieval step is itself a learned function, one that can be trained to treat structural signals like section headings and ToC entries as first-class features rather than noise to be stripped away.
For enterprise corpora with consistent document schemas, such as legal contracts, technical manuals, or compliance frameworks, this architectural choice is particularly well-suited. The structural regularity of the corpus becomes an asset rather than a formatting inconvenience.
What Near-Zero Hallucination Actually Requires in Production
The sub-0.05% hallucination figure from STAIR is worth examining carefully, because it is not achieved by a better generative model. It is achieved by not asking the generative model to fill gaps that retrieval left open. When the retrieved context is precise and structurally grounded, the model has less reason to confabulate.
This points to a principle that matters for production system design. Hallucination is largely a retrieval failure dressed up as a generation failure. Investing in generation-side mitigations, such as self-consistency checks or output classifiers, addresses a symptom rather than the cause.
The architectural implication is that teams evaluating RAG systems should measure retrieval quality independently of generation quality. Recall@1 and Mean Reciprocal Rank at the retrieval stage are leading indicators of hallucination risk downstream. If retrieval is imprecise, no generation strategy will reliably compensate.
Evaluating Whether Your Current System Has This Problem
The clearest diagnostic is to test your retrieval layer in isolation. Given a set of known query-answer pairs drawn from your document corpus, measure how often the correct source passage appears in the top-1 or top-3 retrieved results, without passing those results to a language model. If Recall@1 is below 75% on a representative sample, the generation layer is being asked to do work that the retrieval layer should be doing.
A secondary signal is query type sensitivity. Structure-blind chunking tends to perform adequately on queries that match surface-level terminology in the document, but degrades on queries that require navigating the document's organisational logic. Questions like "what does section 4.2 say about exception handling" or "which clause governs termination in the event of regulatory change" require structural awareness to answer reliably.
If your system handles keyword queries reasonably but struggles with structurally-anchored queries, the indexing architecture is the likely cause, and rebuilding it around document structure rather than token length is the appropriate intervention.
Where Vector Labs Fits
We design and build production retrieval systems where indexing architecture is treated as a first-order engineering decision, not an afterthought. In our document reasoning analysis, we examined why context utilisation gaps persist even with large context windows and what retrieval design choices close them. If your RAG system is showing accuracy or hallucination problems in production, contact us at vector-labs.ai/contacts.
FAQs
It depends on where structure is currently being discarded. If your chunking pipeline strips headings and ToC data before embedding, you can often modify the preprocessing stage to retain and encode that metadata without replacing the retrieval model entirely. However, if the index itself was built on structure-blind chunks, reindexing is usually necessary to realise the full benefit.
A formal ToC is the clearest structural signal, but it is not the only one. Heading hierarchies, numbered sections, and consistent formatting conventions all carry structural information that can be extracted and used during indexing. The key requirement is that the document corpus has some degree of structural regularity, which is true of most enterprise document types including contracts, technical specifications, and policy documents.
Build a held-out evaluation set of query-answer pairs where you know which source passage contains the correct answer. Run your retrieval layer against these queries and measure Recall@1 and Recall@3 without passing results to the language model. This isolates retrieval performance and gives you a leading indicator of hallucination risk that is independent of model behaviour.
This is a genuine operational constraint. DSI systems encode document mappings into model weights, which means adding new documents requires fine-tuning rather than simply inserting a new vector into a store. For corpora that change frequently, a hybrid approach that uses structural metadata to augment a conventional dense retrieval index may offer a better trade-off between retrieval quality and update latency.
The appropriate threshold depends on the use case and the consequences of an incorrect answer. For informational queries where users can verify responses, rates below 1% are generally acceptable. For systems supporting compliance, legal, or clinical workflows, the bar is considerably higher, and the STAIR result of below 0.05% represents a meaningful reference point for what is achievable when retrieval architecture is treated as the primary control.

