This page assumes you have seen nothing. We define every letter, arrow, and squiggle the parent note (In-context learning mechanisms) throws at you, in an order where each one only uses things already built.
Figure s01 — a length-1 bar cut into coloured slices (Negative 0.55, Positive 0.30, Neutral 0.15); the width of each slice is its probability and the slices exactly fill the bar. Refer to this bar every time the word "probability" appears below.
Why the topic needs it. An LLM never says "the answer IS Negative." It says "Negative fills 0.8 of the bar, Positive fills 0.2." Every formula in the parent note is really about widths of that bar.
The vertical stroke ∣ is read "given". It is the single most important symbol on the parent page.
Figure s02 — left: the full bar over four outcomes A,B,C,D; right: after we are "given x", only the lit outcomes B and C survive and their widths are re-measured so they again fill length 1 (each becomes 0.5). This is the picture behind the division in the formula below.
Why the topic needs it. The whole model is a conditional-probability machine: Pθ(y∣context) = "how likely is the next chunk y, given everything typed so far." The demonstrations just make the "given" part longer. (The capital P here is explained in the very next section.)
Why the topic needs it. These pairs are the raw material. In §7 we will count how many of them we have, and in §8 use the "widest bar" idea to pick an answer — but first we need those two ideas as their own symbols. For now just remember: a prompt is some demonstrations, then one query with a missing back.
Why the topic needs it. The parent's key claim — "accuracy climbs then saturates" — is literally "the posterior bar collapses onto one rulebook and can't get any narrower." See Retrieval-Augmented Generation (RAG) for a different way of feeding evidence — by fetching text instead of squeezing a prior.
The "attention ≈ one gradient step" section needs three tiny linear-algebra pieces. To avoid a clash with the discrete labely^ from §6, this section writes the vector output of a linear map as o ("output vector").
Figure s03 — an amber "query" arrow and three "key" arrows: one aligned (dot product > 0), one perpendicular (dot ≈ 0), one opposite (dot < 0). The dot product number beside each key is the "similarity meter" reading attention uses to weight that key.
I can say in words what the vertical bar in p(y∣x) means.
"The probability of ygiven that x is already known"; we restrict to outcomes agreeing with x and re-measure widths to sum to 1.
I can write the formal relation for conditional probability.
p(y∣x)=p(x,y)/p(x) — joint over marginal; dividing by p(x) re-normalises the lit region to length 1.
I can explain the difference between lowercase p and capital Pθ.
p is the true/idealised probability in the world; Pθ is the model's own estimate computed from its weights θ — same kind of object, but an approximation.
I know what θ is and whether ICL changes it.
θ is the full list of the model's weights (the sliders); ICL leaves it frozen — only the input text changes.
I can read argmaxyf(y) out loud.
"The choice of y that makes f biggest" — it returns the argument (widest bar), not the value.
I can expand ∑i=1kai and ∏i=1kai.
a1+⋯+ak (add) and a1×⋯×ak (multiply).
I can write the likelihood of the whole demo bag under a task c.
p(Dk∣c)=∏i=1kp(xi,yi∣c) under the assumption demos are independent given c.
I can state Bayes' rule for the task posterior.
p(c∣Dk)=p(Dk∣c)p(c)/p(Dk) with p(Dk)=∑c′p(Dk∣c′)p(c′).
I can write the marginalization used to answer the query.
p(y∣xk+1,Dk)=∑cp(y∣xk+1,c)p(c∣Dk) — average each task's answer by its posterior weight.
I can write the KL formula and say why it is ≥0.
KL(p∥q)=∑zp(z)logq(z)p(z); requires q(z)>0 wherever p(z)>0; non-negative by concavity of log (Jensen), zero iff p=q.
I can explain what a dot product x⊤x′ measures.
How aligned two vectors are: large positive = same direction, 0 = perpendicular.
I know what a gradient ∇WL and step size η do.
Gradient points uphill on the loss landscape; step −η∇WL walks downhill by amount η.