Outcome
Budget, compress, prune, cache, and arrange context so the model receives the right information at the right time.
What to learn
- Context window budgeting across system, history, tools, and retrieval
- Conversation summarization and rolling memory
- Prompt caching strategies for Anthropic and OpenAI-style APIs
- Hierarchical memory: short-term, long-term, episodic
- Context compression and pruning
- Tool result truncation strategies
- Lost in the middle problem and mitigation
Daily study plan
- Day 14: Draw a context budget for a real chat feature.
- Day 15: Implement rolling conversation summaries.
- Day 16: Separate short-term, long-term, and episodic memory responsibilities.
- Day 17: Add truncation rules for large tool outputs.
- Day 18: Compare prompt caching opportunities and stable prompt sections.
- Day 19: Test lost-in-the-middle behavior with long context examples.
- Day 20: Build a context assembly function with explicit priorities.