← All questions
RAGHard· Retrieval· System Design· Trade-offs

Retrieval wants top-k raised from 5 to 20 for recall. E...

The conflict between the retrieval team and the evaluation team is a classic trade-off. Increasing k improves recall, which helps with missing information, but it also increases the number of potential conflict pairs, which degrades generation accuracy and increases latency.

To resolve this, decouple the retrieval stage from the generation stage. Retrieve a larger candidate set (e.g., 50), use a reranker to select the most relevant passages, and then feed a smaller, high-quality subset (e.g., 5) to the generator. This maximizes recall while minimizing the generation of contradictory or irrelevant content.

Code playground (Python)