Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Not every feature needs heavy context engineering. A one-shot classifier with a fixed prompt barely benefits. But three patterns live or die by it: RAG (you're literally engineering which knowledge enters the window), agents (state and tool results accumulate fast), and long multi-turn assistants (history outgrows the budget). Knowing where the discipline pays off tells you where to invest — and stops you from over-engineering a simple feature.
A simple decision rule: if the context is fixed and small, prompt engineering is enough. If the context is dynamic (varies per request), large (approaches the budget), or growing (accumulates over a session), you need context engineering. The table-as-code below encodes that judgment.
def needs_context_engineering(feature):
dynamic = feature["context_varies_per_request"]
large = feature["context_tokens"] > 0.5 * feature["window"]
growing = feature["accumulates_over_session"]
score = sum([dynamic, large, growing])
return ("heavy" if score >= 2 else "light" if score == 1 else "minimal"), score
print(needs_context_engineering(
{"context_varies_per_request": True, "context_tokens": 120_000,
"window": 200_000, "accumulates_over_session": True})) # ('heavy', 3) — RAG agent
print(needs_context_engineering(
{"context_varies_per_request": False, "context_tokens": 500,
"window": 200_000, "accumulates_over_session": False})) # ('minimal', 0) — classifierpython3 main.py