← Back to Concept Contrast

Concept Contrast Fable

Retrieval precision and context precision

Conclusion first:Retrieval precision measures how many of the recalled documents are relevant. Context precision measures how much of the final text fed to the large model is useful. Between them lies a process of reorganization and truncation, and the two numbers often do not match.

Retrieval precision measures how many of the recalled documents are relevant. Context precision measures how much of the final text fed to the large model is useful. Between them lies a process of reorganization and truncation, and the two numbers often do not match.

Fable

Warehouse picking and kitchen prep

In the north of the city there was an upscale restaurant whose fame rested on one signature dish. The kitchen workflow went like this: the server sent the guest's order into the kitchen, the prep cook fetched ingredients from the storeroom and handed them to the chef. Once the chef had the ingredients, he trimmed, washed, cut, and cooked.

For a while, the complaint rate suddenly rose. Customers said there was sand in the food, or the side dishes were not fresh. The owner checked the surveillance and found no problem with warehouse picking — of the ingredients the prep staff brought back from the warehouse, eight out of ten matched the menu. The warehouse's accuracy was sufficient.

The problem was at the kitchen prep counter. After the chef received the ingredients, he didn't inspect them one by one—he dumped everything into the basket at once. The rotten leaves weren't picked out, the muddy roots weren't trimmed, the expired seasonings weren't smelled. At the step from warehouse to pot, the ingredients were contaminated.

The boss thought for a long time and added a new position to the process: prep inspector. This person's workbench sat right between the warehouse exit and the stove entrance, taking the ingredients the prep cook brought back, picking off rotten leaves, cutting off muddy roots, merging duplicate materials, picking out and discarding expired seasonings, and finally handing the chef a sorted, clean prep basket.

After adding this step, the boss began watching two metrics. One was warehouse picking accuracy: of the ingredients brought back from the warehouse, how many were actually needed on the menu. The other was prep basket usability: of the ingredients finally handed to the chef, how many could go straight into the pan.

After half a year, the boss noticed a pattern: warehouse picking accuracy stayed around 85%, but the prep basket availability rate could reach 95%. This was because the prep inspectors knew how to throw out obviously wrong items, merge duplicate materials, add missing seasonings, and trim off stale parts. Warehouse data was one thing; prep basket data was another.

Later, the boss shared his experience with peers: do not just look at whether the warehouse numbers are pretty. What customers eat is the prep basket, not the warehouse receiving slip.

Later the librarian added a checkpoint: first check whether the books retrieved are accurate, then check whether the pages delivered to the desk are clean. The two filters were finally separated. Later, at every retrospective, the librarian marked two red stamps: one on shelf retrieval, one on desk materials. From then on, problems had a place to land.

Retrieval Precision

The proportion of documents returned in the retrieval stage that are actually relevant to the query. It measures whether what you pulled back from the warehouse is right.

Context Precision

The proportion of text finally assembled into the prompt context that is truly useful for generating the answer. It measures whether what the large model sees is useful, after post-processing such as deduplication, truncation and reranking.

Story Mapping

  • Warehouse picking: the retrieval stage, recalling relevant documents from a document store.
  • Ingredients brought back by the prep cook: retrieval results (the original list of recalled documents).
  • Prep inspector (sorting vegetables, washing, cutting): context post-processing—deduplication, truncation, reranking, filtering.
  • Prep basket: the final context fragments fed into the large model.
  • A guest complains there is sand in the dish: low context precision, and even if retrieval precision is not bad, final generation quality still suffers.

In the project

Before a RAG system goes live, both metrics must be measured. Low retrieval precision means the retrieval strategy has a problem, and you need to tune the embedding or retrieval parameters. High retrieval precision but low context precision means the post-processing pipeline is losing information or introducing noise—possibly due to an unreasonable truncation strategy, disrupted document ranking, or duplicate content filling the context window. Many teams look only at retrieval precision and declare "RAG accuracy 90%," then get criticized by users after launch. That is exactly why.

京ICP备2026014272号