- The course
- Session 03
Context Engineering — What Goes in the Window
The model reads only what it is given; choosing what fills a small window is where the quality comes from.
- 90 min
- 60 taught + 30 lab
- Engineer the context
- Build-along
- Free vs. paid comparison
- Your laptop · free tier
The lab · 30 min · Supply, structure, pinpoint
The Judgment in the Window. A judgment briefed on screen: text supplied, brief staged with pinpoints, summary read back against the judgment.
The full lab planOn this page
The hook
“A model keeps no memory of Indian law in a drawer. It has a window, and on a free account that window holds perhaps fifty pages. Your judgment is two hundred. Deciding what goes into the window, in what order, with what question at the end, is the work itself.”
What you'll be able to do
- Explain what the context window is (everything the model can read right now, with no memory of your matter behind it) and why a free tier's small window makes excerpt selection a legal skill.
- Supply the document instead of asking from recall, structure long text for the model (document first, question last, tagged sections), and demand paragraph pinpoints so every claim in the output is checkable against the source.
- Manage what does not fit: choose between excerpting, chunking with a running structure, and re-supplying the operative passage, and say what each choice loses.
- Practise context hygiene: one task per chat, fresh context after a wrong turn, memory off for clean experiments, and a long conversation treated as a degrading asset rather than an accumulating one.
On the syllabus
- The window: what the model can read, small on free tiers
- Recall versus grounded: same app, opposite reliability
- Long text: document first, question last, tagged, pinpointed
- What gets lost: the middle, long chats, the dissent
- Excerpt, chunk or re-supply; hygiene: one task per chat, fresh windows
The session
What to put in front of the model. A model answers reliably about a document it has been given and unreliably from memory, and the amount it can read at once is limited, especially on free accounts. The session covers how to supply a judgment, structure a long document, ask for paragraph citations, and keep a chat clean.
Why it matters
Speed without the flattening. You get the model's pace on long documents (the brief, the issue table, the comparison) while the pinpoint discipline and the read-back keep you the one person in the room who knows what the summary dropped. And you stop losing hours to degraded chats; the fresh-window habit alone repays the session.
What you can do on Monday
Next time you need a judgment, paste its operative text, build the brief with staged prompts and pinpoints, and open two pinpoints before relying on any of it. Never ask what a case held when you are holding the case.
What you leave with
The skill
Supply, structure, pinpoint: document first, question last, parts labelled, paragraph numbers demanded, a sample of them verified, and a fresh window the moment a thread degrades.
The insight
The model's answer is only as good as the window it read, and the window is yours to engineer. Most of what people call a model problem is a context problem wearing the model's clothes.
The moment you'll remember
The planted-fact demonstration. A long extract goes in with the case-deciding line buried mid-document; asked cold, the model summarises fluently and misses it. The room, who watched the line go in, protests. The presenter re-supplies that passage above the question and the model nails it. The machine did not get smarter; the window got better. The room stops believing that pasting a document means the model has read it.
In this session
- 01
The window, mechanically: at every turn the model reads one finite sequence (your conversation so far, plus whatever you pasted) and predicts from that; it has no other access to your matter. Session 2's recall-is-composition point follows, and so does its corollary: the highest-leverage act in AI-assisted legal work is deciding what fills the window. As of August 2026 the free tiers hold roughly 27,000–32,000 tokens, about fifty pages minus room for the answer, while paid frontier tiers advertise up to a million. Re-checked each cohort, because the numbers move.
- 02
Recall mode versus grounded mode, replacing the 'generative versus grounded tools' line: the same free app now does both. Ask what Anvar held and the model composes from training-data residue; paste Anvar's operative paragraphs and it reshapes the text in front of it. Grounding is a practice rather than a product, and it is measured: the best models, given the document and told to rely on it, still produce ungrounded material (one answer in six on Google's FACTS benchmark). Grounding changes the failure mode from invention to misreading; the duty to read stays.
- 03
Structure for the machine: long material first and question last, which is every vendor's guidance, one claiming up to 30% better answers on multi-document tasks from ordering alone; label the parts (JUDGMENT / STATUTE / MY QUESTION) so instructions never blur into evidence; ask for word-for-word quotations before analysis; demand paragraph pinpoints for every proposition. A pinpoint the model gives you is a claim; a pinpoint you open is evidence. That is the Ladder, in your workflow. Indian reality check: a scanned PDF has no text layer and nothing can be pinpointed from it. Get the text version, or you are grounding on fog.
- 04
What the window loses even when text fits: mid-context material is found less reliably than material at the edges ('lost in the middle', reduced but not abolished on current models), and unrelated material distracts. Long chats lose more: across 15 models, performance dropped 39% on average when a task arrived through a meandering multi-turn conversation rather than one clean brief, and models that took a wrong turn did not recover. Hence the habits: one task per chat; re-supply the operative passage right before the question that turns on it; after two failed corrections, a fresh window with a better first prompt.
- 05
When the judgment does not fit, three honest options. Excerpt: choose the operative paragraphs yourself, which is issue-spotting, best when you know where the matter lives. Chunk: feed the judgment in parts against a fixed structure (issues → holding per issue → obiter → only then a summary), carrying a running note forward; boundary-spanning reasoning can fall through the cracks. Re-supply: keep the full text elsewhere and paste back only the passage each question turns on. Rolling summaries are for continuity and never for evidence: compression loses detail by design, starting with the qualification, the dissent and the distinguishing fact, which are what your matter turns on.
- 06
The flattening problem, taught as legal-research craft: a summary requested cold compresses toward 'the court held', collapsing concurrences and dissents, dropping per incuriam findings and the narrow fact that made the ruling small. A summary built on a structure you supplied (issues, holdings, obiter, with pinpoints) can be checked against that structure, paragraph by paragraph. The AI summary is a hypothesis and the judgment is the evidence: read the operative paragraphs against it and log every divergence, which is also how you become a faster reader of judgments.
- 07
Side-by-side work (two clauses, two statutory regimes, a section before and after amendment) is reshaping and therefore strong ground, with one standing blind spot: the model compares only what is in the window. The defined term three pages away, the proviso in another instrument, the amendment after its cutoff: supply them or the comparison proceeds without them. The reviewing habit: after any comparison, ask what is not on the page.
- 08
Hygiene, as a checklist the lab enforces: memory and personalisation off, or a temporary chat, for any clean run, because free tiers now carry memory across conversations by default and your last matter can leak into this one; one matter per chat, always; label your chats like files; and treat the window as a courtroom record, where everything in it is before the judge and nothing outside it exists.
The build-along
The room builds it and keeps it.
The class builds the thing with the presenter, the mechanism is explained as it is built, and a named skill closes the hour.
Recall versus reading — the opening bet
Experiment on the classOn the class
The room commits on their phones: which will be more accurate, asking the model what Arjun Panditrao held, or pasting its operative paragraphs and asking the same question? And by how much?
In the model
Asked cold, the model composes from training residue: usually the gist, with the primary/secondary distinction blurred or the certificate rule overstated. Given the text, it is reshaping, with paragraph support on demand.
Live on the model
Both run side by side. The room grades the cold answer against the pasted-text answer's pinpoints, and the cold version's errors are the subtle kind (a condition dropped, a distinction blurred) that survive a careless read.
The skill
When you have the source, supply it. Turn every recall question you can into a reading question, and grade recall answers as drafts rather than law.
The judgment brief, built in stages
Build-alongThe task
The room drives the staged sequence on a mid-length judgment from the excerpt set: the issues framed → the holding on each, with paragraph numbers → obiter → only now, a summary. Each stage's prompt is dictated from the floor before it runs.
Why it works
A summary built on a structure you supplied can be checked against that structure; a summary requested cold can be checked against nothing. Pinpoints convert the output from prose into a map of the judgment.
Built live
The staged brief assembles on screen; then the presenter opens two cited paragraphs live: one checks out, and one, usually, is subtly off, which is the moment the read-back habit is born.
The skill
Structure first, pinpoints always, and read the summary against the judgment, never instead of it.
The planted fact — lost in the middle, live
DemonstrationThe room predicts
The room watches the case-deciding line go into the middle of a long paste, and predicts: will the model's summary surface it?
What is going on
Attention over a long window is not uniform: mid-context material is found less reliably, and the effect is probabilistic, which is itself worth seeing, so the demonstration is run twice.
Shown live
Asked cold, the summary misses or mangles the planted line (if it doesn't, the pre-run capture shows the miss, and the room learns the effect is a probability rather than a law). Re-supplying the passage above the question fixes it instantly.
The skill
Never assume pasted means read. Re-supply the operative passage right before the question that turns on it.
Free versus paid · you watch this one
The two-hundred-page judgment — where the window is real
The task, on both: Build an issues-and-holdings table, with paragraph pinpoints, for a very long multi-opinion constitution-bench judgment — the kind with concurrences that decide everything.
The presenter runs the same prompt on a free tier and on a stronger model or higher reasoning-effort tier, side by side. You watch; nobody needs a paid plan.
Free tier
The free tier cannot take the full text: the window is ~27–32K tokens and the upload path is capped. Chunked, staged prompting (the Session 3 technique) recovers a serviceable table in four passes, at the cost of effort and some cross-opinion synthesis at the seams.
Stronger model / higher effort
The presenter's paid large-window model ingests the entire judgment in one pass and produces the table with pinpoints, including the cross-opinion tally the chunked run had to assemble by hand.
The window is a real ceiling you can pay to lift, and a technique ceiling you can mostly engineer past for free. Diagnose before you spend: if the task fits and the output is poor, it was never the model. Session 4 has a free tool built for this.
The legal thread
Everything you put in the window is a disclosure to a third party, and free tiers train on conversations by default. So the rule that makes this session professionally safe: judgments, statutes and published material go in; clients never do. The opt-out switches, workspace exceptions and statutory frame arrive in Session 4; privilege doctrine in Session 7. For now: if you would not read it aloud in a crowded café, it does not go in the window.
The lab · 30 minutes · demonstrated in class, repeated on your own
The Judgment in the Window
A judgment briefed on screen: text supplied, brief staged with pinpoints, summary read back against the judgment. Afterwards, students stage their own judgment and submit the brief with its divergence log.
1 · The demonstration
In class, on one realistic task.
On
Gemini or ChatGPT (free tier, temporary chat); the judgment as a text-layer excerpt from the session set
The exact prompt
The text between the markers is an extract from a judgment of the Supreme Court of India. Using only this text: (1) list the issues the court framed; (2) for each issue, the holding, with the paragraph number(s); (3) anything said obiter, with paragraph numbers; (4) only after all that, a ten-line summary. Quote the single operative sentence of the judgment word for word, with its paragraph number. If something is not addressed in this extract, say 'not in the supplied text' rather than answering from memory. === JUDGMENT BEGINS === [pasted extract] === JUDGMENT ENDS ===
Point at
Point at the pinpoints as they appear, then open two of them in the actual PDF, in front of the room. One will check out; read it aloud. Wherever one is off (a paragraph number pointing at the wrong passage, a holding stated wider than the paragraph supports), that divergence is the lesson.
What comes back
A clean staged brief with mostly-accurate pinpoints and, typically, one soft spot: a blurred distinction between holding and obiter, or a summary line that outruns its paragraph. On a judgment with a concurrence, expect the summary to flatten it into 'the court held'.
If it misbehaves
The pre-captured staged run on the same extract (fallback folder, S3). If the free tier truncates the paste, use the shorter alternate extract marked 'S3-short'; the set includes one sized for the smallest window.
2 · Afterwards, on your own
The same technique on a task of your own; the deliverable goes to the platform.
Afterwards, on your own: take one of the five judgments in the session set (or your own moot or seminar judgment with a text layer), run the staged sequence, check two pinpoints against the PDF, and classify every divergence. The brief plus the log is the platform submission.
Step by step
- 01Choose a judgment from the session set (five practice areas, each sized for a free window), or your own moot or seminar judgment if you have its text layer.
- 02In a temporary chat, paste the operative extract between clear markers, document first, and run the staged sequence: issues → holding per issue with paragraph numbers → obiter → only then a ten-line summary.
- 03Require 'not in the supplied text' for anything the extract does not address, and a word-for-word quotation of the operative sentence with its paragraph number.
- 04Open the operative paragraphs in the actual PDF and check two pinpoints; read the summary against the judgment.
- 05Log every divergence and classify it: flattened dissent or concurrence / lost qualification / dropped distinguishing fact / overstated holding / wrong pinpoint.
Tools · free tier
- Gemini or ChatGPT (free tier, temporary chat)
- The session's judgment set with direct Indian Kanoon URLs
- The divergence-class list (posted before the session)
Free tier
Four to six prompts on one pasted extract, inside every free window because the set's extracts are sized for it (the constraint is the lesson). If rate-limited, complete the read-back on paper against the transcript; the checking is the assessed skill and needs no tokens.
If the free tier locks you out
Complete the read-back on paper against the transcript so far; checking pinpoints against the PDF needs no tokens, and it is the assessed part.
3 · The reveal
The room predicts before the read-back: will the summary keep the concurrence? The reveal is the divergence log filling in on screen, paragraph beside summary.
Deliverable
A staged judgment brief with pinpoints, plus a divergence log with each divergence classified: a lab deliverable for the platform, and the artefact rebuilt inside a workspace in Session 4.
Feeds the Lab deliverablesRun of show · 30 minutes
- 0–18 min — The demonstration: the staged brief built from the extract, pinpoints opened against the PDF as the room predicts each one.
- 18–26 min — The read-back: the summary against the operative paragraphs, each divergence found and classified.
- 26–30 min — The assignment: the same staged brief on a judgment of your own, due before Session 4; questions.
Verification checklist
- The summary was built on a structure you supplied (issues, holdings, obiter); it was not requested cold.
- Paragraph numbers were demanded throughout and at least two were opened and read against the text.
- Every divergence is logged specifically and classified against the divergence-class list.
- The extract fitted the window and the 'not in the supplied text' rule was enforced.
For the instructor · before the session
Why this shape
A build-along with one opening mirror. The recall-versus-reading poll needs the room to bet wrong before the point lands, so that beat stays an experiment; everything after it is craft: the class assembles a checkable judgment brief with the presenter, stage by stage, and leaves knowing how to do it to any judgment. The skill is construction, so the session is construction.
- Prepare the five-judgment extract set: text-layer PDFs, operative extracts pre-cut to fit the smallest free window, one 'S3-short' alternate, direct Indian Kanoon URLs for each.
- Pre-run the planted-fact demonstration at least twice that morning and capture a run where the model misses; the effect is probabilistic and the capture is the fallback.
- Stage Compare B: the full constitution-bench PDF loaded in the paid large-window account; the four chunked prompts for the free tier written out and tested.
- Confirm temporary-chat mode and memory-off on the demo accounts.
- Launch the Session 3 poll deck; the recall-versus-reading bet opens the hour.
- Print or post the divergence-class list (flattened dissent / lost qualification / dropped fact / overstated holding / wrong pinpoint); the lab logs against it.
Key sources & cases
Liu et al., 'Lost in the Middle: How Language Models Use Long Contexts' (TACL 2024), with 2025 follow-ups (NoLiMa, ICML 2025; Chroma, 'Context Rot', 2025)
The evidence that position and length matter: performance highest at the edges of the context, degrading in the middle; degradation with length on all 18 models Chroma tested; distractors compound. Vendors claim the 2026 frontier generation holds up across the window; treat that as a vendor claim. The ordering advice presupposes the effect. Verified 2026-08-27 (abstracts; Chroma report).
Laban et al., 'LLMs Get Lost in Multi-Turn Conversation' (2025)
The 39% average multi-turn drop and 'models that take a wrong turn do not recover': the empirical backbone of the fresh-window habit. Verified to the abstract 2026-08-27.
Google DeepMind, FACTS Grounding benchmark (2024–)
With the document supplied and grounding instructed, the best model at launch still produced ungrounded material in roughly one answer in six. The number behind 'grounding changes the failure mode; it does not abolish the read-back'. Re-pull the current leaderboard figure each cohort and cite its date.
Vendor long-context guidance: Anthropic, OpenAI and Google documentation (read 2026-08-27)
Concordant current guidance: long material first, question last (Anthropic claiming 'up to 30%' improvement, a vendor-internal figure, quoted as such); delimit sections; quote before analysing; Google warns accuracy drops with multiple 'needles'. Links in the codebook; the pages moved hosts in 2026, so re-link each cohort.
Free-tier context windows, as checked 2026-08-27
ChatGPT Free ≈27K tokens; Gemini free tier 32K (vendor pages, one read via text proxy); Claude Free unstated by the vendor; paid tiers up to 1M. These numbers are the most volatile facts in the course: RE-CHECK EACH COHORT and re-state the checked date on the slide.
Anvar P.V. v. P.K. Basheer (2014) 10 SCC 473; Arjun Panditrao Khotkar v. Kailash Kushanrao Gorantyal (2020) 7 SCC 1
The session's worked judgments for the recall-versus-reading opener and the staged brief, chosen because Session 4 builds its workspace on the same electronic-evidence line, so the doctrine compounds across sessions. Both verified 2026-08-26 as recorded in the codebook.
Readings
- Liu et al., 'Lost in the Middle' (TACL 2024) — abstract and Figure 1
- Chroma, 'Context Rot' (2025) — the summary page; skim the charts
- Laban et al., 'LLMs Get Lost in Multi-Turn Conversation' (2025) — abstract
- Arjun Panditrao Khotkar v. Kailash Kushanrao Gorantyal (2020) 7 SCC 1 — the operative paragraphs, before the session; you will watch a model read them
- Your worst prompt from Session 1's homework — rewritten as a document-first, question-last brief
Sixteen hours, one professional discipline.
Craft, competence and verification, practised until they are habits you could defend in court.