Before you can understand zero-shot and few-shot prompting, the parent note throws a lot of symbols at you: xt, x<t, Pθ, ∏, argmax, k, D={(xi,yi)}. A smart 12-year-old has seen none of these. This page builds each one from nothing, in the order they depend on each other, and anchors every one to a picture.
Look at the arrow chain in the figure. Each box is a word. The pink arrow into the empty box is the model asking "given everything to my left, what word is most likely here?" That single question is the whole engine. Every symbol in the parent note is just precise notation for this arrow.
Why the topic needs it. The parent note says the model is a "next-token predictor". You cannot understand that phrase until "token" means "one box in the chain." Words like shot, demo, query are all just runs of tokens the model reads.
Why the topic needs it. The whole model is defined in terms of "the token at position t" and "everything before position t". Without a name for position, we could not write that.
Putting symbols 1–5 together, the parent note's central formula
Pθ(xt∣x1,x2,…,xt−1)
now reads in plain words: "the probability the model assigns to the next token, given every token so far." You can read every piece.
So the parent note's
answer=argmaxyPθ(y∣demos,query)
reads: "the answer is whichever output y the model rates most likely, given your examples and your question." Few-shot works by making the righty the tallest bar.
Read top to bottom: tokens give positions, positions give the sequence, the sequence gives "context so far", context plus the conditional bar plus the locked brain θ give the next-token probability, the product turns that into whole-sentence probability, and argmax over the demo-conditioned distribution is the final answer — which is exactly what few-shot steers.
Test yourself — cover the right side of each line.
A token is
one small chunk of text (a word or word-piece) the model reads/writes one at a time.
The subscript t in xt means
the position of the token, counting from the left starting at 1.
x<t means
all tokens before position t — the entire left context.
x1:T means
the whole sequence, positions 1 through T.
A probability is
a number from 0 to 1 measuring how likely something is; all next-token options sum to 1.
The bar in P(A∣B) means
"given" — B is known context, A is what we're guessing.
Pθ means
probabilities according to this specific trained model, whose fixed weights are θ.
θ during prompting
never changes — it stays locked; only the context changes.
∏t=1T means
multiply the term together for every t from 1 to T.
The chain rule P(x1:T)=∏tP(xt∣x<t) says
a sentence's probability is the product of each next-token step's probability.
argmaxyf(y) gives
the y that makes f largest — the winning choice, not the winning value.
k in prompting means
the number of demonstrations shown (0 = zero-shot, 1 = one-shot, >1 = few-shot).
D={(xi,yi)}i=1k is
the set of k input→output example pairs placed in the prompt's context.
If every line above felt easy, you are ready for Zero-shot and Few-shot prompting. If any felt shaky, reread its section — the parent note assumes all of them. See also Large Language Models for the machine itself and Context window for the limit on how many demos fit.