Context engineering deliberately selects, structures, and optimizes the information placed in an LLM’s input. Its goal is to increase relevant signals while reducing noise, rather than treating a larger context window as a complete solution. section 1.3.4
Retrieval-augmented generation (RAG) is a practical form of context engineering. It programmatically retrieves relevant chunks, ranks or filters them, and injects them into the prompt, allowing in-context learning without changing model weights. section 1.3.4
A context-engineering design balances several concerns:
- Precision: retrieve the small portion of a large knowledge base that matters to the task. section 1.3.4
- Efficiency: avoid forcing entire document collections into extended prompts, which can obscure important facts through “lost in the middle” effects. section 1.3.4
- Control: encode human judgment through search filters, ranking logic, and task decomposition. section 1.3.4
- Checkability: return supporting passages with answers so reviewers can verify claims instead of reconstructing the reasoning. section 1.3.5
Large knowledge base
When relevant information represents only a small fraction of a large document collection, semantic search can filter irrelevant data and place high-value passages in the prompt. The resulting answer is both more focused and easier to verify when those passages are returned as evidence. section 1.3.4 section 1.3.5
Context engineering complements rather than replaces model adaptation. Fine-tuning changes parameters, while retrieval supplies changing or rare knowledge at query time; retrieval can also expose provenance that absorbed model knowledge cannot cite directly. section 1.3.5






