The number of rows your retriever returns and the number of tokens those rows occupy in the prompt are two different settings, and teams routinely tune the first while ignoring the second. A retriever that returns twenty rows may place two thousand tokens into the prompt on one question and twelve thousand on the next, because chunks vary in length. What the model experiences is the token total, not the row count.
The context window is shared between request and response. A worked split from one practitioner write-up uses a model limit of 8,000 tokens, a system prompt of 500 tokens, a user question of 300 tokens, 6,000 tokens of retrieved context, and 1,200 tokens left for the answer, with the note that a longer answer is truncated at the model limit. That is the arithmetic to copy. Everything in the request competes with the retrieved rows and with the answer itself.
One caution about the advertised number. The nominal limit is what the model card states; the effective limit is where accuracy holds, and the same guide reports practitioner guidance that it is often 70 to 80 percent of nominal in that token budgeting overview. Treat that as a planning heuristic, not a law, and confirm it against your own evaluation set.
A second caution is the silent cut. When the assembled prompt exceeds what the server is configured to serve, the prompt can be trimmed without any error field in the response, so the answer is produced from whatever survived as documented in a context budgeting walkthrough. You will not see a warning. You will see a fluent answer missing the one passage that mattered.



