FrontierAI.Engineer
RAG & Grounded Generation

Top-K Retrieval

Also known as: top-k

Top-K retrieval returns the K highest-scoring passages from the document store for a given query. The value of K trades off recall against context window usage: a higher K reduces the risk of missing the relevant passage but fills more of the prompt with potentially noisy content. Typical production values range from 3 to 20, calibrated by measuring how often the correct passage appears within the top K and how well the generator performs with that many passages.