Skip to content
Future SliceFUTURE SLICE / Deep Reads
Back to articles

Inaccurate RAG Answers? Check How Your Articles Are Chunked

AI can still give incorrect answers after you add articles to a knowledge base. Sometimes the problem starts during retrieval: it finds a passage that looks relevant but loses track of the model, experiment, or article it belongs to. Preserving context when splitting content is a useful place to start checking.

Editorial note · AI-assisted

AI-assisted original explainer; sources are listed at the end. Worked examples and exercises were not run unless marked as tested. Diagrams are AI-generated. The cover is an editorial photo.

AI-assisted editorial · Translated from Chinese

Laptop and phone on a wooden workspace
Photograph · Bayu Syaits / Unsplash

The basic idea of RAG is to retrieve information first, then have a model answer using it. When retrieved content loses its context, generation can continue reasoning from a mistaken premise. Anthropic's Contextual Retrieval article describes adding local context to chunks and combining lexical and semantic retrieval. Read the reference

Suppose you save a hardware review that includes the sentence, “Under this configuration, it uses about 8GB.” If that sentence becomes a standalone chunk, the model may retrieve it when a reader asks how much VRAM they need, without knowing which precision, input length, and concurrency level “this configuration” refers to.

You can attach the article title, section heading, publication date, and necessary conditions to each chunk. For example, explain that a passage comes from a particular single-user inference experiment using a specified quantization method, and that its figures apply only to that setup. This context must come from the original text; the model should not guess missing details.

Consider the different forms questions can take, too. Model numbers, error codes, and function names often need exact matching. “Why does memory use grow the longer it runs?” is closer to a semantic question. Hybrid retrieval is worth testing, but you still need to verify its effectiveness using your own questions.

VISUAL NOTE
Selected document slices and their neighboring context enter a transparent reading window.
AI-generated concept illustrationA useful excerpt keeps its context

Try it

Prepare ten questions that readers would actually ask. Compare two knowledge bases: one stores only the chunk text, while the other adds titles and experimental conditions. First check whether retrieval finds the right information, then check whether the answer is correct. Recording those steps separately helps you avoid mistaking a retrieval problem for a model problem.

Do not present a vendor's percentage improvement on its own dataset as a result your knowledge base can also achieve.

EXPLAINED IN SLICES

A useful excerpt keeps its context

  1. Source

    Document · date · subject

  2. Selected passage

    Relevant text with its context

  3. Answer

    Checkable references

Editorial diagramKeep identifiers and surrounding meaning with retrieved passages. A fluent answer still needs evidence from the source.
Share this articleXSubscribe with RSSThe Weekly Slice
Was this useful?
Loading likes…

Original references

参考原文www.anthropic.comReference 1