B5Beginner 90 minutes reading and codeLocked

Context Engineering: Windows, Budgets, Memory, and Retrieval

Prompt engineering is a subset. Context engineering is the whole game. A prompt is a string you type. Context is everything that goes into the model's window: system instructions, retrieved documents, tool definitions, conversation history, few-shot examples, and the prompt itself. The best AI engineers in 2026 are context engineers. They decide what goes in, what stays out, and in what order.

In this lesson

  1. 01Learning Objectives
  2. 02The Problem
  3. 03The Concept
  4. 04Build it
  5. 05Use it
  6. 06Exercises
  7. 07Key Terms
  8. 08Further Reading

About 3800 words of reading, with code, 5 quiz questions and the tutor.

The full lesson opens with an access code

You can see what this lesson covers and the milestone it sets. The full text, code, quizzes, the tutor and the AI reviews come with the K850 practice, along with weekly build sessions and code review.

Codes come with the K850 practice. Book a place

Milestone forThe ZRA Tax Desk

Build the context the model actually sees

Write the context builder: contract first, then the retrieved chunks with their citations, then tool descriptions, then the question. Give it a token budget and a rule for what gets dropped first when the budget is exceeded.

Done when

  • A context builder with fixed order and a hard token budget
  • Full logged context for 3 questions in the repo
  • An over-budget question where the drop policy keeps the answer correct

Stretch: Measure answer quality with 3, 5 and 8 chunks and justify your k

Reviews open with an access code.

Interview practice

Questions on this topic that AI engineering interviews ask, with the companies reported to ask them. Answer the way you would out loud; Jev scores it and DeepSeek tells you what to add.

Scoring opens with an access code. You can still read the questions and prepare.

Adapted from open-source work: AI Engineering from Scratch by Rohit Ghumare (MIT, lesson text, code and quizzes); Awesome LLM Apps by Shubham Saboo (Apache-2.0, starter code); AI Engineering Interview Questions by Outcome School (Apache-2.0, interview questions). Capstones, milestones, data packs and Zambian context by Zambrite.

Chat on WhatsApp