This is one foundational lesson in the twelve-lesson course.
The question to explore
Pack the next scene’s notebook
What information is available right now?
Remove the secret note and watch the answer become unavailable. A fact helps a task only if it reaches that task, even when it is saved somewhere else. A saved note helps an AI task only when the relevant information reaches it. Remove the secret note and watch the answer become unavailable. When an assistant misses something you supplied earlier, check what context the current task actually receives.
Local teaching illustration / No AI model call / About 9 minutes / No account needed
Try the experiment
First step: All three notes start selected: Mira’s age, Noor’s secret and the storm day. Read the context and its answer to Who has the lighthouse secret?
Context: Mira is 17. Noor keeps the lighthouse secret. The storm arrives on day 3. Question: Who has the lighthouse secret? Noor, according to the included secret note. Scene check: - Canon age: 17 (from character note) - Secret keeper: Noor (from secret note) - Scene timing: day 3 (from weather note)
Mira is 17. Included → 17 (from character note)
Noor keeps the lighthouse secret. Included → Noor (from secret note)
The storm arrives on day 3. Included → day 3 (from weather note)
Canon age: 17 (from character note)
Secret keeper: Noor (from secret note)
Scene timing: day 3 (from weather note)
3/3 scene facts packedChange a control to explore the example when JavaScript is enabled.
- All three notes start selected: Mira’s age, Noor’s secret and the storm day. Read the context and its answer to Who has the lighthouse secret?
- Deselect Noor keeps the lighthouse secret. The answer updates to not enough information, even while the other notes remain.
- Select the secret note again. Explain why that specific note supplies the answer.
The idea
Context is the information available for the current task. Memory tools can save information and bring some of it back later. Being saved and being available now are different things. You have read that Mira is 17 and a storm arrives on day three. A program does not necessarily receive those facts just because you saw them earlier. Context is the information available for the current task. For a language model, that is the text in the current request, which has a fixed maximum size called the context window, counted in tokens. Memory mechanisms can retain information and make selected parts available later, usually by retrieving them and inserting them into the next request.
Something has to choose which notes go in. If space is short, an important note can be left out, and a note buried in a long pile can be missed. Some step has to choose what goes in. A packing step with a size budget can drop a note that matters. Even an included note can be overlooked: Liu and colleagues (2023) found that language models used information at the start or end of a long context more reliably than information in the middle.
The switches build a packet from existing story notes. Removing a note removes it from this packet, not from the original story. This local activity does not train a model or remember your entries across visits. Use the switches to build a small context packet from the story facts. Removing a fact makes it unavailable to this illustrated task; it does not erase the original story. Adding it again restores the visible information. The experiment assembles text locally. It does not train a model, change model weights or demonstrate a system remembering across visits.
Worked example: run it yourself
Three notes sit in memory. A packing step copies notes into the task until a size budget is full. With a big budget the answer is Noor. With a small one the secret note is left behind, and the honest answer is that the context does not say. pack() walks the notes in order and stops at the first one that would exceed the budget, counted in characters as a stand-in for tokens. With a budget of 40, the age note (11 characters) fits, but adding the secret note (33) would make 44, so packing stops there. whoHasTheSecret() sees only the packet, never the memory array, and returns an explicit insufficient-context answer instead of a guess.
Save it as context.js and run node context.js in a terminal (Node.js 18 or later), or paste it into your browser’s developer console. Download context.js
const memory = [
'Mira is 17.',
'Noor keeps the lighthouse secret.',
'The storm arrives on day 3.',
];
function pack(notes, budget) {
const packet = [];
let used = 0;
for (const note of notes) {
if (used + note.length > budget) break;
packet.push(note);
used += note.length;
}
return packet;
}
function whoHasTheSecret(packet) {
const note = packet.find((n) => n.includes('secret'));
return note ? note.split(' ')[0] : 'Not enough information in this context.';
}
for (const budget of [100, 40]) {
const packet = pack(memory, budget);
console.log(`budget ${budget}: ${packet.length} of ${memory.length} notes ->`, whoHasTheSecret(packet));
}
Output, as printed by Node.js 25.3.0 on 3 December 2026:
budget 100: 3 of 3 notes -> Noor
budget 40: 1 of 3 notes -> Not enough information in this context.Try it
Find the smallest budget that still answers Noor. Then move the secret note to the top of memory and try a budget of 40 again.
Check your answer
44, because the age note and the secret note together are 11 + 33 characters (43 still says not enough information). With the secret note first, a budget of 40 fits it and the answer is Noor again. Order and budget decide what reaches the task, even when memory holds everything.
Take this with you
What changed?
Something being stored somewhere is different from it being available to this task.
Try explaining it.
If the packet omits the secret note, should the answer guess that Noor has the secret?
Open a possible explanation
It should retrieve the relevant note or say the available context is insufficient. A convincing guess would create a claim without support from this packet.
Choose a next step
Continue the course in order, or open the course map.