

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 2
click for more info
Not enough gems
Cost: 6 gems
1: What Is Context?
incomplete
2: Context As RAM
incomplete
3: New Sessions
incomplete
4: Token Economics
incomplete
5: Ignoring Files
incomplete
6: File Watcher
incomplete
7: Lost in the Middle
incomplete
8: Compaction
incomplete
9: Configure Compaction
incomplete
10: Undo and Redo
incomplete
11: Forking
incomplete
12: Secrets in Context
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Having a large context window doesn't mean a model uses every part of it equally well. A famous study called "Lost in the Middle" found that models tend to retrieve information better from the beginning and end of long contexts, rather than from the middle.
Funny enough, AI is kinda like a human in this regard. It's like it was trained on human data or something... Send your coworker a 3-page email, and they'll probably read the first 3 sentences and the last 3 sentences most thoroughly, skimming everything between.
The effect varies by model and task, and retrieving facts isn't the same as following instructions. Still, it's a useful reminder: don't bury the important stuff.
This does not mean that you can't have big prompts. You totally can! For longer prompts (and especially reusable prompt templates), just make sure the goal and the key constraints are as easy to find as possible. State them up front, and consider a short reminder at the end when there's a lot of supporting material in the middle.
Tell OpenCode to shorten Sloperator's README.md to fewer than 50 lines. Have it move the uv run command and other validation commands into the first 20 lines, and have it simply reference docs/spec.md instead of duplicating the entire language specification.
Then tell OpenCode to run and submit the CLI tests from the project root.