X-03Retrieval & RAG

/context/retrieval

Cast a wide net with similarity search, then rerank hard, so only genuinely relevant content spends context budget.

Step-by-step walkthrough4 steps
  1. The query becomes a vector; similarity search casts a wide net.
  2. Candidates are recalled — similar is not the same as relevant.
  3. A reranker reads each candidate against the actual question.
  4. Only the survivors spend context budget.
Key insight

Recall is cheap; precision is what protects the window. The reranker — which actually reads the candidates — is where quality comes from.

Failure mode

Stuffing top-20 raw chunks into context: similar-but-wrong documents don’t just waste tokens, they actively mislead the model.

Elsewhere in the atlas