Retrieval: giving the model current knowledge

One of the most common uses of tools is retrieval — fetching information that isn't in the model's weights.

The model was trained on data up to a cutoff. After that, it knows nothing about new events, new research, updated documents. Retrieval is the practical solution: instead of trusting the model's frozen knowledge, look the answer up first.

This pattern is sometimes called RAG: Retrieval-Augmented Generation. A query comes in, a retrieval system finds relevant documents (from the web, from a database, from uploaded files), those documents go into the context window, and the model generates a response grounded in what it just read.

RAG doesn't eliminate hallucination — the model can still misread or misrepresent the retrieved documents — but it gives the model a fighting chance at accuracy for time-sensitive or domain-specific questions.

It also illustrates the broader principle: the context window is not just for conversation history. It's a workspace. You can put documents in it, search results, tool outputs, code, structured data — anything the model should reason over. The richer the workspace, the more capable the agent.