The agent might need facts from a 200-page manual to answer some questions.
- APaste the whole manual into the system prompt so it is always available.
- BRetrieve only the relevant sections on demand and put those in context.
- CFine-tune the model on the manual instead of using context.
- DRaise the temperature so the model recalls the manual better.
Answer: B
Retrieve only the relevant sections on demand and put those in context.
Why
Retrieve on demand (RAG): pull only the sections a question needs. Stuffing 200 pages into every call is slow, costly and dilutes attention; fine-tuning bakes in facts that go stale; temperature has nothing to do with recall.
- ContextYou enabled prompt caching, the system prompt is huge and identical every time - and the savings are zero.
- ContextInstructions placed in the middle of a very long prompt are followed far less often than the same words at the start or end.
- ContextYour agent resends a long system prompt on every step, yet DeepSeek’s usage shows almost no cache hits.
- ContextAfter many tool calls returning huge blobs, the agent slows down and loses the thread.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path