← All questions
RAGVery Hard· Retrieval Latency· System Design· Generation Parameters

Retrieval wants to fan out across all three stores for...

The framing of these requirements as a single request is flawed. Fan-out for retrieval is a separate decision that incurs only a few milliseconds of latency. In contrast, setting k=20 for generation is a heavy operation that consumes 769 milliseconds of prefill time, which would cause the system to exceed the 800ms SLO. The correct approach is to prioritize the fan-out for better recall, deny the high k value for generation, and decouple the retrieval k’ from the generation k to manage latency effectively.

Code playground (Python)