CTX 101
ctx-101 · v1.0.0
ivyx✓
What Goes in the Context. Score the same twenty four questions with nothing, the right passage, a search's budgets and everything, find the passages that cost answers and the ones that merely cost tokens, price every context per right answer, and write the rule for what goes in.
What this course is for
By the end of this course you can score a context against an answer key between the model's prior and the ceiling of the right passage alone, tell presence from use, tell a competing passage from filler and remove the one that costs answers, detect a cut context from the processed count, price every context per right answer, and write a rule for what goes in that a search can apply, with its misses owned.
What you will be able to do
- Build a run and a score over twenty four questions with a term key, and read the model's prior for what it is
- Put the right passage alone in front of the model, call its score the ceiling, and read the three it still misses
- Let a search choose one, three, ten and all passages, and watch presence rise while the score peaks in the middle
- Separate competitors from filler and find a wrong relevant passage worse than no passage
- Move the right passage around a fitting context and find little, then cut the context with a window and find everything
- Remove passages instead of adding them, find the way up, and find that what to remove first is what competes
- Price every context in tokens per right answer and find everything thirteen times the best search budget
- Write the rule as a chooser a search can run, hold it against every question, and own each miss
Who it is for
Learners who have put documents in front of a model and want to know how many to put, which ones hurt, what a window does, and what a right answer costs, measured on a local model rather than argued.
Before you start
- LLM 101, for the window and the processed count lesson 6 reads
- PANDAS 101, for the tables every lesson prints
Lesson path
The run and the score, the model with nothing, and the right passage alone as the ceiling
- 1What goes in front of the model40 min
Watch the same question answered with nothing, with the right passage, with everything, and with the wrong passage, then predict which context scores best over twenty four
- 2A question with an answer key55 min
Build the run and the score, read the model's answers with nothing in front of it, and find that its five right answers are what any dealer says
- 3The passage that answers55 min
Put the right document alone in front of the model, score it at 21 of 24, read the three it still misses, and call that the ceiling every other context is measured against
Budgets that grow, the passages that compete against the ones that merely fill, and position against the window
- 4More passages, fewer answers55 min
Let a search choose one, three, ten and all passages, watch the answer become present on more questions while the score goes the other way, and find the middle budget best
- 5The passage that looks right55 min
Separate the passages that compete from the ones that are merely irrelevant, find a wrong relevant passage worse than no passage, and find filler nearly free until there is a lot of it
- 6Position, and the cut55 min
Move the right passage to the head, the middle and the tail of a context that fits and find the score moves little, then shrink the window until the context is cut and find it falls to the prior
Removing instead of adding, what to remove first, and the price of every context per right answer
- 7Removing beats adding55 min
Start from everything and remove passages instead of adding them, find the way up to the ceiling, and find that what to remove first is what competes
- 8What a context costs55 min
Price every context in tokens per right answer, and find that everything costs thirteen times what the best budget costs for fewer answers
The rule as a chooser a search can run, with its misses owned
- 9The rule for what goes in60 min
Write the rule as a chooser a search can apply without knowing the answer, hold it against every question beside the search budgets, and say what it costs and where it fails
About this course
CTX 101 · What Goes in the Context
Ask a small model how long Northgate's warranty is with nothing in front of it and it says twelve months, confidently, about a dealer it has never heard of. Put the warranty policy in front of it and it says 24 months or 40,000 km. Put all fifty two of Northgate's documents in front of it, so the answer is always there, and it gets 13 of 24 where the right passage alone got 21. Put the search's two best documents that are not the answer in front of it and it gets 4, below the 5 it gets with nothing, because it answers the question the wrong passage answers. Cut the context with a window too small for it and the score falls to the model's guesses, with the answer in every request.
This course measures all of that on llama3.2:1b through a local
Ollama, on twenty four questions with an answer key of terms, so no
judge reads the answers. Nothing needs an account, a key or the
network once the model is pulled.
Three modules and a judgment. The question and the answer: the run, the score, the prior at 5, and the ceiling at 21 with its three reading errors. More: budgets of one, three, ten and all passages, where presence rises to 24 and the score peaks at three; competitors against filler, where a wrong relevant passage costs answers from the first one and filler costs nothing until there is a lot of it; position inside a fitting window, worth three answers, against the window's cut, worth all of them. Less: removing instead of adding, the way up to the ceiling, removal by kind against removal by rank, and the price of every context per right answer, where everything costs thirteen times the best search budget for fewer answers. Judgment: the rule as a chooser a search can run, held against every question with its misses owned by the model, the search or the rule.
How this course teaches
Lesson 1 is a tour: one question answered from nothing, from the right passage, from everything and from the wrong passage, and one prediction. The eight lessons after it are graded work, each built the same way, and nine of their cells are yours.
- A prediction you commit to before the cell runs. It is graded on the reasoning, not the guess, and being wrong here is the point.
- Warmups: a one line blank or a two to four line exercise under the theory it practices, each with a four rung hint ladder behind it, where the last rung explains and still does not hand over the code.
- An exercise that is broken when you open it.
- A diagnose cell: code that runs, prints a confident and plausible answer, and is wrong. Something below it refuses the answer by computing the same thing a second way, so nothing is taken on trust.
- A challenge that ends in a table and a sentence you write. The tutor grades the sentence, which means a green tick you earned for the wrong reason can be taken back.
No cell in this course passes in the state it ships. That is deliberate, and it is checked mechanically before the course is published.
The particular danger of this subject is a count that looks like the goal. Presence read as use. A right answer from nothing read as knowledge. A miss with the passage present read as a need for more. Everything's perfect presence read as worth its price. Rank read as relevance, so the cheap passages are trimmed and the expensive ones kept. A cut context blamed on the model's reading. A miss that is the search's fixed by a longer context. Every diagnose cell is one of those, and every cross check is the second count that refuses it.
What you need
- A running Ollama with
llama3.2:1bpulled (about 1.3 GB). The setup cell of every lesson checks and says what to do if it is missing; in IVYX Studio the LLMS panel installs Ollama and pulls the model. pip install ollama pandasin the kernel's environment.- A lesson makes twenty four calls per context it measures; most run in a minute or two, and the lessons that send all fifty two documents take about three.
Your machine may answer a question or two differently from the one the course was built on. The prose says which numbers are the built machine's, and every check holds a band or a relation that another Ollama build satisfies too.