Top-k is the number of closest chunks the system passes forward. A small k keeps the context tight but risks leaving out the one passage that holds the answer; a large k raises the chance of including it but also floods the model with unrelated text that can pull the answer off course. Choosing k is therefore a balance between missing evidence and diluting it.
How AI Answers Questions About Documents It Never Learned
Retrieval: Finding the Right Passages for a Question
How Many Chunks to Take
3 / 4
That ranked list is longer than anything the model can be handed, so a cut has to be made. Top-k is simply how many of the closest chunks you keep.
0:00 / 0:00