Agentic Development ยท Memory & State
A pattern where relevant documents or data are fetched from an external store at query time and injected into the context window, so the model can answer using up-to-date or domain-specific knowledge it wasn't trained on.
Example: A support agent searches a vector database of help articles for the three most relevant docs, then includes them in the prompt before answering.
In practice: RAG is effectively a long-term memory strategy. Instead of retraining the model, you retrieve knowledge on demand. It's cheap and keeps information fresh, but retrieval quality directly caps answer quality.