← Back to Glossary
Top-K Retrieval
Configuring the exact number (K) of top-matching document chunks pulled from the index to pass to the generator or reranker.
Why it exists
Controls the balance between context depth and prompt token consumption / API cost.
How it works
Specifying K=10 fetches the top 10 vector/keyword matches. Rerankers often slice Top-10 down to Top-3 for final prompt injection.
Related terms
Where you'll use this
roadmap