GENAI 102
M05 · L02
Context Windows

Everything the Model Can See

The context window is everything the model can look at in one pass — and it is finite. So what you place inside it is a design decision, not an afterthought. New to how models read tokens? Revisit GenAI‑101 for the basics.

01 / 08
GENAI 102
M05 · L02
What Fills the Window

It All Shares One Budget

Everything the model reads and writes competes for the same finite space:

  • System instructions — the standing rules for the model
  • Your prompt — the request for this turn
  • Retrieved documents — whatever you fetched to help
  • Conversation history — the turns so far
  • The output being generated — the answer takes room too
02 / 08
GENAI 102
M05 · L02
The Core Tradeoff

More Context Can Help or Hurt

Context is not free upside. Relevant context improves answers; irrelevant context wastes budget and can distract the model from what matters.

The goal
Aim for the relevant slice — not the maximum you can fit
03 / 08
GENAI 102
M05 · L02
Include or Retrieve

What to Keep, What to Fetch

Not everything belongs in the prompt all the time. Split by how stable and how often needed the information is:

  • Include in the prompt — stable, always-needed info the model must have every turn
  • Fetch on demand — the rest, pulled in only when the task needs it
  • Coming in Module 6 — retrieval-augmented generation is how you fetch that rest well
04 / 08
GENAI 102
M05 · L02
The Cost of Length

Longer Isn’t Free

A bigger context has real costs: it generally costs more and can be slower to process. And on very long inputs, models can lose track of the middle — the ends get more attention than the center.

05 / 08
GENAI 102
Build It
From Concept to Capstone

Build It

How to implement: pick one feature. List what must be in the prompt versus what can be fetched on demand or dropped entirely. Then cut the window down to the essentials.

  • Weekly AI Tasks tracker — the parse prompt needs the task schema plus the message, not your whole history; keep the window tight.
  • Personal brand site — feed each section only the relevant source material, not the entire résumé at once.
06 / 08
GENAI 102
Knowledge Check

Check what stuck

Three questions from this lesson. Answer to see why — the explanation appears whether you were right or wrong. Nothing is scored or saved.

Question 1 of 0
Score 0/0

07 / 08
GENAI 102
Summary
Recap

What you learned

The context window is finite and shared by instructions, prompt, retrieved docs, history, and output. Relevant context helps; irrelevant context costs money, time, and focus. Include the stable essentials, fetch the rest, and keep the window tight.

08 / 08