A retriever hands you a ranked list of passages. The model never sees a list. It sees a single string of tokens, in the order you emitted them, with whatever separators you chose between them. Every downstream behavior, whether the model cites a source, follows a format, honors a refusal rule, or confuses two similar passages, is decided by that string.
This is why context assembly deserves its own module rather than living as string concatenation inside the request handler. One useful way to frame it is as a function: context equals Assemble(instructions, knowledge, tools, memory, state, query), run on every request whether or not you designed it deliberately (Redis on context assembly). Most teams discover this function exists only after an incident.
The inputs compete for one finite window. The system prompt sets behavior, retrieved knowledge supplies evidence, history carries the thread of the conversation, tool schemas steer function calls, and the question sets the task. Microsoft's RAG guidance describes the same four-part structure, a system message, a context block, the user query and optional examples, and stresses that the system message should tell the model to prioritize the provided context over what it memorized during training (Azure RAG prompt engineering).
Two facts about the flat sequence drive everything else. First, attention is not uniform across position: information in the middle of a long input is processed less reliably than information at the start and end, which is the "lost in the middle" effect described in the chunking literature (Weaviate on chunking). Second, the model's performance degrades as the window fills, well before the hard limit, a phenomenon sometimes called context rot (Redis on overflow). Both facts mean that where a chunk lands is as consequential as whether it was retrieved.



