When an internal knowledge-base assistant answers inaccurately, should your first move be to change retrieval, to add reranking, or to send fewer fragments to the model? A fixed order works well: recall layer → reranking layer → context layer. The checks below are method suggestions for your own corpus, not measured results or industry standards. The symptoms of failure in all three layers look alike — a wrong answer, an inaccurate citation — but the fixes are completely different. A recall miss is a retrieval problem; a document that was found but ranked too low is a ranking problem; only when both are healthy and the model still answers wrongly does the context layer come into play. Separating the layers prevents you from spending the week swapping out the generation model. A model swap is a comparison item to run after all three layers have been checked, not a starting point.
1. Recall layer: first confirm whether the right document made it into the candidate set
Start with one question: did the document that should have matched end up in the candidate set returned by retrieval?
Prepare a set of real business questions, manually label for each one which document should be hit, run retrieval once, and measure the share of labeled documents that were recalled. Keep the list of misses. The input is a question set plus labeled document IDs; the output is a recall rate and a miss list.
When recall is weak, look at chunk granularity and index field coverage before considering a keyword path. Pinecone’s official relevance guide gives a concrete trigger: when relevance depends on exact matches such as product names, technical IDs, proper nouns, or internal jargon, use full-text search instead — it ranks string fields declared with full_text_search using BM25 and supports Lucene query syntax (Increase search relevance). Full-text retrieval and vector retrieval draw on different signals for such terms, one on literal matching and one on vector similarity, and where each actually hits still has to be confirmed on your own corpus.
Conversely, if the corpus simply contains no document covering the question at hand, perfect recall cannot help. Before measuring recall, confirm the corpus coverage.
2. Reranking layer: is the right document in the top few?
A successful recall does not mean the model eventually sees the right content. The candidate set and the fragments finally sent to the model are not the same set; what actually matters is the order.
Measure the share of labeled documents that make it into the top N fragments sent to the model after reranking. The two-stage vector retrieval described in Pinecone’s documentation has exactly this shape: retrieve a batch of candidates, then hand the query and the candidates to a reranking model that scores them by semantic relevance and returns a new ranking (same source as above).
Reranking only helps when the correct document is already in the candidate set and was merely ranked too low; a document that was never found during recall cannot be recovered by reranking, which is why this layer comes after the recall layer. Also, a reranking model’s behavior on another corpus has to be verified by you — do not assume the reranking model of one hosted vector database performs the same on your documents.
3. Context layer: did the model actually see the top-ranked fragments?
Here is a counter-intuitive fact: a larger context window does not mean the more you pack in, the better. Anthropic’s engineering article positions context engineering as a natural extension of prompt engineering — organizing the set of tokens that enter the context at inference time — and cites research showing that as the number of context tokens grows, the model’s ability to recall information within them declines, at rates that differ by model. Context should therefore be treated as a finite resource with diminishing returns (Effective context engineering for AI agents).
Chroma’s Context Rot study covers 18 models (closed and open-weight), holds task difficulty fixed, and varies only input length; it observes a consistent decline in performance whose shape is non-uniform. The study also notes that the commonly used Needle in a Haystack benchmark is mainly lexical matching and does not represent semantic tasks, so it additionally evaluates with LongMemEval conversational QA and AbsenceBench (which asks whether the model can recognize that a given passage does not exist), and reports that even a single distractor pushes performance below the needle-only baseline, with four distractors stacking further decline (Context Rot).
Position matters as well. Liu et al. in “Lost in the Middle” (TACL 2023) analyze model behavior with long contexts across multi-document QA and key-value retrieval, and find that performance usually degrades when the relevant information appears in the middle of a long input rather than at the beginning or end — even for models that explicitly advertise long-context support (arXiv:2307.03172). This is a 2023 research result and should not be treated as a per-model guarantee for today’s systems.
Combining these three sources, these actions are worth trying:
- Gradually reduce the number of fragments sent to the model and compare on the same set of questions, watching whether answers turn correct;
- Move the most critical fragments to the beginning or the end;
- Remove clearly irrelevant distractor fragments.
These actions target the case where “retrieval and ranking are basically correct, but the model grabs the wrong thing from material it already has.” If the correct document never made it into the final fragments, a context experiment will change nothing.
4. When hybrid search is worth adding
The signal for adding it: questions are full of exact terms, yet semantic retrieval never hits.
Microsoft’s Azure AI Search hybrid search carries two parameters in the same query request — search (full-text) and vectorQueries (vector) — executes both paths in parallel, and merges the results with Reciprocal Rank Fusion (RRF) (Hybrid Search Overview). This describes that mode in that product; it does not mean every RAG stack ships hybrid search by default.
Its RRF documentation states that each document is scored as 1/(rank + k), where k is a constant, that experiments showed smaller values (such as 60) performing better, and that this k is entirely unrelated to the k that controls the number of nearest neighbors (Hybrid Search Ranking). There is no universally optimal value — do not copy 60 over as a recommended configuration.
Two points are easy to conflate:
- The fusion method and “take the top k” are two different things, and they should be confirmed separately at configuration time. The RRF documentation also notes that only fields marked
searchablein the index (or those listed in the query’ssearchFields) participate in scoring, while only fields markedretrievableor listed in the query’sselectare returned — so “which text actually participated in the ranking” needs a separate check. - The amount of engineering depends on your stack. In a retrieval stack where a single request is sorted by only one scoring method (for example Pinecone), enabling hybrid search usually means reworking the pipeline and merging the two result sets client-side, rather than flipping a switch: Pinecone’s documentation notes that the same index schema can hold both
dense_vectorandsparse_vectorfields, but a single search request is sorted by one scoring method only; to use BM25 and dense vectors together, either restrict the vector search with a text-match filter or run two searches and merge them client-side. Azure AI Search, by contrast, accepts both parameter sets within a single request. The same “hybrid search” means very different amounts of work in different products, so confirm against your own stack before rollout.
5. An executable acceptance checklist (example)
| Layer | Next action if it fails | Suggested owner | Output artifact |
|---|---|---|---|
| Recall | Adjust chunk granularity and index field coverage first; if still short, evaluate a keyword path | Knowledge base / retrieval engineering | Recall rate + list of missed questions |
| Reranking | Correct document is already in the candidates but ranked low — then bring in a reranking model | Retrieval engineering | Top-N (after reranking) hit rate + list of samples needing reranking |
| Context | Fragments are in place but the model did not use them correctly — run comparisons with fewer fragments, different positions, and distractors removed | Application and prompt engineering | Comparison records + the question set that still fails |
Record two kinds of failure separately: retrieval that found nothing, and the model answering wrongly despite having the material (hallucination). The fixes differ, and mixing them sends troubleshooting in the wrong direction. Note also that a correct document that the current requester is not authorized to access is a different determination altogether — permission filtering must be completed before recall, and an unauthorized fragment that enters the model context merely because retrieval hit it is equally a boundary violation, not something that resolves as the recall rate improves. Retention of troubleshooting records should follow the business agreement on effective time limits and sensitivity level, with log redaction applied.
6. When this order does not apply
- Instruction-following or output-format problems of the generation model (for example, it was asked to mark citation sources and did not);
- The corpus itself is outdated or has conflicting versions;
- The requirement boundary is unclear — the user is asking about something outside the knowledge base’s scope;
- A refusal or an empty answer that is by design — that is a policy configuration question, not a retrieval failure.
How this maps to Boao AI’s public services
Boao AI (铂傲智能), the brand used by 西安铂傲智能科技有限公司 (a company based in Xi’an), publicly describes enterprise digitalization solutions covering scenario diagnosis, PoC validation, system integration, knowledge base construction, private deployment, and subsequent operation — directly related to the knowledge base construction step discussed here. These three layers fit naturally into the PoC stage as an acceptance method: the deliverable is not a verbal conclusion that “it works reasonably well,” but layered metrics, a miss list, and a record of how each failed layer was handled. For implementation details, see the enterprise solutions page and the company overview page. What is described here is public service scope, not delivered customer results.
FAQ
Q: If the team can only work on one layer this sprint, which one, and what does the sprint have to deliver? Start with the recall layer, because reranking and context experiments change nothing while the correct document is missing from the candidate set. A minimum deliverable is the labeled question set plus the recall rate and the list of misses for that set. The question set should cover both natural-language business questions and questions heavy on exact terms such as product names, technical IDs, and internal abbreviations; the latter is both a signal of recall gaps and the basis for introducing a keyword or hybrid path later.
The product documentation and research results quoted above reflect the versions accessible on 2026-12-02; each is linked where it is used.