Dayward AI

Context Engineering in 5 Days

Taught in Chinese

Week 1 · From Seeing the Context to Controlling It

D1

Context Is the Scarcest Resource: the Window, Attention Decay, and Cost — From Prompt Engineering to Context Engineering

Break a session's context into four pieces — system prompt, tool definitions, history, and tool results — and work out each one's share, then see why a longer window actually makes mistakes more likely, and reckon the three-part bill of cost, latency, and accuracy.

D2

System Prompts and the Instruction Hierarchy: the Right Altitude, Persistent Instruction Files, Progressive Disclosure, Less Is More

A system prompt written too fine goes brittle; written too coarse, it drifts. Today find the altitude in between: organize the prompt into blocks, move long-lived rules into persistent instruction files, and let detail unfold on demand through progressive disclosure.

D3

Managing Context for Tool Results and Retrieval: Loading on Demand, Summarizing and Pruning, Structured Returns

Tool definitions and tool results are the two easiest pieces of context to blow up. Today gives criteria for pruning the tool list, patterns for loading on demand and returning structured results, and a pruner that can quantify the before-and-after difference.

D4

Long-Running Sessions: Compression, Notes and Memory Files, Subagent Isolation and Handoff Summaries

A window will always fill up once a task runs for tens of minutes. Today implement a measurable compression strategy, and draw a clear line between when notes-and-memory-files and when subagent isolation each fit.

D5

Measuring and Tuning: the Token Bill, Context Utilization, Failure-Mode Triage, and a Comprehensive Interview Deep Dive

Fold the previous four days' techniques into one measurable loop: work out the token bill and cache hits, watch two utilization metrics, locate the problem against four failure modes, then work through a comprehensive context-engineering interview deep dive.