Manuals / Prompt Engineering / Chapter 3

A · Structure · beginner · ~30 min · Chapter 3 of 12

Context windows & token economy

Every model has a context limit. Long prompts cost money and attention. Put the most important info first and last — models sometimes lose the middle.

Path progress
21%

Step 1 of 2

Budget your context

Estimate: system instructions + examples + user task + expected output. Trim fluff.

Budget your contextDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Budget your contexdrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Do this now

Take a long doc you paste into chat. Summarize it first, then ask questions on the summary.

Pro tip: For code: paste the relevant function, not the whole repo.

Was this step clear?
Chapter learning outcomes
  • Context limits
  • Token budgeting
  • Lost-in-the-middle

Clear these before you leave

Side quest

Context audit

Review your last 5 prompts. Cut unnecessary context from one.