Log inStart free
LESSON 14.03 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

pass@k

Watch sampled programs pass or fail tests, then score k tries.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 14.03 · EVAL BAYT 0.6 · 60 PROGRAMS
01
Stage 1 of 6 · Sample programs
The model samples 10 programs per problem. Each letter names one of 4 candidates.
Explain it simply

Each row is one small coding problem, like sum 1 to x. The model does not write one answer: it samples 10 of them. Each letter is the candidate it picked. The bars below show each candidate's chance at temperature 0.6.

A grid of 6 rows and 10 columns. Each cell holds the letter of the sampled candidate program.

sampling chancepassfail, plug-intrue value
10 samples per problemproblemdouble xabsolute valueis evensum 1 to xclamp to 0..9count digitsAAAAACAAAAAAAABAABAAAAABBDDBADABDACDBBDBBAAADACCBDAADAABBAAAcandidates for sum 1 to x · tests x = 1, 4, 10, want 1, 10, 55Asum(range(x + 1))0.47Bsum(range(x))0.34Cx * (x + 1) // 20.10Dx * x // 20.09sampled programs10 samples per problemproblemdouble xabsolute valueis evensum 1 to xclamp to 0..9count digitsAAAAACAAAAAAAABAABAAAAABBDDBADABDACDBBDBBAAADACCBDAADAABBAAAcandidates for sum 1 to x · tests x = 1, 4, 10, want 1, 10, 55Asum(range(x + 1))0.47Bsum(range(x))0.34Cx * (x + 1) // 20.10Dx * x // 20.09sampled programs
Toy: 6 problems, 4 candidate programs each, 3 tests
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
P(a)=eℓa/T∑beℓb/TP(\sy{a}{out}{a}) = \dfrac{e^{\ell_a/\sy{T}{param}{T}}}{\sum_b e^{\ell_b/\sy{T}{param}{T}}}
T=0.6: P(A)=0.47, P(B)=0.34, P(C)=0.10, P(D)=0.09T = 0.6:\ P(A) = 0.47,\ P(B) = 0.34,\ P(C) = 0.10,\ P(D) = 0.09

Temperature divides each candidate's logit before the softmax.

Common mix-ups

MYTHA higher temperature makes every pass@k score better.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01At temperature 0.2 instead of 0.6, does the measured pass@1 go up or down?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.