movie Season 1 · 6 episodes · 26 minutes · free

The Context Window

A six-episode animated CS series. Five people at a tiny AI studio have thirty days until Demo Day — and every episode, the way they work with AI breaks in a new, very human way. The Operator, the voice in everybody's head, takes us inside the machine (and the brain) to show why, then teaches the fix with real prompts, real code, and real SQL.

video_library The Season

Watch in order. Each episode is one skill.

Every episode goes inside the machine — and the brain — to show why the skill works, then teaches it with the real artifact. Each one links to the written lesson that goes deeper.

Why AI Gives You Bad Answers (Prompt Engineering Basics) | The Context Window Ep 14:54
Episode 1

Garbage In

A vague prompt gets the most average answer. A trusted answer gets you a confident mistake.

  • What a language model actually does: predict the next token, over and over
  • The two opposite failures: asking too little, trusting too much
  • How to name what went wrong instead of blaming the tool
edit_note Activity · The four-word autopsy
  1. Find a prompt you sent an AI tool this week that disappointed you.
  2. Rewrite it with: the exact file or input, the exact problem, one thing it must not touch, and what the finished output looks like.
  3. Run both. Write two sentences on what changed — and what the first answer was 'averaging' toward.

Journal this

In <file>, <function> breaks when <specific case>.
Fix only that. Don't touch <area>.
Show me <the changed function / a diff / a one-line note>.

Talk about it

  • Did I say which part?
  • Did I say what not to touch?
  • Do I know exactly what it changed?
  • Did I check the answer against the source?
Context Engineering: Why More Context Makes AI Worse | The Context Window Ep 24:21
Episode 2

The Room, Not Just the Ask

A model can only work with what's in its context window. Too little and it guesses; too much and it drowns.

  • What the context window is — and what fills it without you noticing
  • Why flooding it backfires ('lost in the middle')
  • Four context-engineering moves and a project context file
edit_note Activity · Build the room
  1. Pick a real bug or task. List every file/document you'd normally paste in.
  2. Cross out everything the task doesn't touch. Summarize anything longer than a page into its decisions.
  3. Start the session with: 'Before you change anything: what files can you see, and what are you assuming?'
  4. Write a 6-line project context file (AGENTS.md / CLAUDE.md) with the rules you keep repeating.

Journal this

# Project context
- Runtime + versions, and "no new dependencies without asking"
- Where the important logic lives (and what not to duplicate)
- House rules (never delete TODOs, tests before refactors)
- Files to ask before touching

Talk about it

  • Did I give it only what the task touches?
  • Did I summarize instead of paste?
  • Did I ask what it can see before it acted?
  • Is the context written down once, not re-explained daily?
How to Write a Prompt: Role, Task, Constraints, Format | The Context Window Ep 33:31
Episode 3

Role, Task, Constraints, Format

A prompt is a scope of work. Four lines turn a wish into a spec — and you decide what done looks like before you start.

  • The four-row prompt: Role, Task, Constraints, Format (+ Done)
  • Why a role works like priming
  • Treat the first answer as a draft, not a verdict
edit_note Activity · Scope it like a contract
  1. Take a real message you need to write (a follow-up, a bug report, a cover letter).
  2. Write the four rows. Then add DONE: three checkable criteria.
  3. Generate, then do one revision pass that cuts something and adds one specific detail.
  4. Check the result against DONE. If it fails, fix the prompt, not just the output.

Journal this

ROLE: <who is speaking, to whom>
TASK: <one job, named>
CONSTRAINTS: <length · tone · must include · must avoid>
FORMAT: <the shape of the answer>
DONE: <3 checkable criteria>

Talk about it

  • Is the role a lens or a compliment?
  • Is there exactly one task?
  • Could someone else check DONE without asking me?
AI Hallucinations & Fake npm Packages (Slopsquatting) | The Context Window Ep 44:18
Episode 4

That's Not a Source

Fluent isn't factual. A sentence isn't a source — check what would hurt if it were wrong.

  • Why models produce plausible fabrications (and why people do too)
  • The ten-second verification kit
  • Package hallucinations and slopsquatting — the security risk
  • Closing ambiguity before the model closes it for you
edit_note Activity · Catch one in the wild
  1. Ask an AI tool for code that uses a library you've never used.
  2. Before running anything: `npm view <package>` (or pip index / docs) for every import, and check every method it calls exists.
  3. Rewrite the prompt to close two ambiguities (e.g., dedupe key, keep first vs last) and compare.

Journal this

npm view <package> name        # does it exist?
node -p "typeof [].someMethod" # does the method exist?
# read the official docs · run it on a tiny real input

Talk about it

  • Does every package and method actually exist?
  • Did I close the ambiguities that matter?
  • Am I verifying what would hurt — not arithmetic?
SQL & Databases Explained: The JOIN That Lies | The Context Window Ep 54:31
Episode 5

The Missing Ledger

Memory is a storyteller; a database is a witness. Model the truth once, then ask it precise questions.

  • File vs. in-memory object vs. database — three different deals
  • Tables, primary keys, foreign keys: one row per truth
  • SELECT, WHERE, JOIN — and the JOIN that silently inflates COUNT
  • Querying from code so the answer is the same every time
edit_note Activity · Build the ledger
  1. Create people, ideas and feedback tables in SQLite (feedback points at both with foreign keys).
  2. Insert 5 people (one duplicate under two spellings), 3 ideas, 8 feedback rows (one person comments 3 times).
  3. Count 'people who gave feedback on idea 3' with COUNT() after a JOIN, then with COUNT(DISTINCT person_id). Explain the difference in one sentence.

Journal this

SELECT COUNT(DISTINCT person_id) AS people
FROM feedback
WHERE idea_id = 3;

Talk about it

  • Does each real-world thing exist exactly once?
  • Am I counting rows or the things I actually mean?
  • Is the question answered by code, not by memory?
Graph Databases & Recursive SQL for AI Context | The Context Window Ep 64:32
Episode 6

The Web Under the Table

When relationships repeat, loop, and carry their own facts, they're a graph. The connections are the knowledge — for brains, neural nets, and your AI's context.

  • The tell that a table should be a graph
  • Nodes, directed edges, hops, cycles — and traversal with WITH RECURSIVE
  • Feeding a graph path to an AI as context, with sources
edit_note Activity · Shortest way in
  1. Add an introductions table (from_name, to_name, venue, date) with at least one person introduced twice and one cycle.
  2. Write the WITH RECURSIVE query that finds the shortest path from you to a target, without walking in circles.
  3. Give an AI only that path plus the source rows and ask it to draft an intro request. Compare with giving it the whole table.

Journal this

WITH RECURSIVE path(person, hops, route) AS (
  SELECT 'Nia', 0, 'Nia'
  UNION ALL
  SELECT i.to_name, p.hops + 1, p.route || ' → ' || i.to_name
  FROM introductions i JOIN path p ON i.from_name = p.person
  WHERE p.hops < 4 AND instr(p.route, i.to_name) = 0
)
SELECT route FROM path WHERE person = 'Fairview Parks'
ORDER BY hops LIMIT 1;

Talk about it

  • Does this relationship have facts of its own? → its own table
  • Can my traversal loop forever? → stop on revisits
  • Am I giving the AI the path, or the haystack?
menu_book

Course workbook

One page per episode: the big idea, the science underneath, key terms, an exercise on a real problem, a template to keep, and the checks before anything ships.

Download the workbook (PDF) download
account_balance

For educators & teams

Deans, CS and data-science faculty, career-services and experiential-learning directors, and L&D leaders at employers who hire them. The program brief covers outcomes, format, where it fits, delivery options, and assessment ideas.

Download the program brief (PDF) download
forum

Stuck? Ask.

The Discord is open all day: setup help, concept help, and a place to talk through the system you're building.

Join the Discord open_in_new
target What you'll be able to do

Outcomes

  • Write specific, structured prompts (role, task, constraints, format, definition of done) for real engineering tasks
  • Engineer context: choose what a model sees, summarize instead of paste, and maintain a project context file
  • Verify AI output against ground truth and recognize package hallucinations and slopsquatting risk
  • Design a relational schema, query it with SQL, and spot JOIN fan-out errors
  • Recognize when data is a graph, traverse it with a recursive query, and use graph retrieval as AI context