Context

Day 1 - Block 3

Context is king

Engineer context, not just prompts.

From prompt to context engineering

Anthropic Applied AI Team (2025)

Context for coding agents

  • Name things well (main.py, estimate_arima(), …)
  • Comments and documentation matter!
  1. Write unit-test
  2. Prompt agent to write code and to test it
  3. Iterate until ✅

Plan mode

Sometimes, the agent can write its own context

Housekeeping for better retrieval

Messy Clean
vague file names descriptive file names
no folder map INDEX.md per folder

Agents infer intent from names, hierarchy, and metadata

Boundaries and Workarounds

Boundary Workaround Required disclosure
personal data redact + summarize state data omitted
copyrighted text use abstract/metadata state evidence gaps

Context-window fatigue

Anthropic Applied AI Team (2025)

Token-economics

  • Summary of context
  • Split into multiple sessions with “handoff”
Reduce “Intelligence” Computations
lower reasoning effort caching
weaker LLM batching

Structured outputs

{
  "text": "string",
  "rating": "integer"
}

Validate datatypes and required keys

References

Anthropic Applied AI Team. 2025. “Effective Context Engineering for AI Agents.” https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents.