Step Tutor: does it contradict the step?
The DSA Visualizer explains every step of every algorithm in two sentences. An explanation is only useful if it is true of the step on screen, so the question here is narrow: how often does it say something false about that step?
Result
1 contradiction in 100 hand-labelled steps.
The best estimate is 1.0%, under the 3.0% bar set for launch. The 95% interval reaches 5.4%, though, so 100 steps can't rule out a true rate above the bar. At this rate, about 240 labelled steps would.
The one contradiction was found by the LLM judge described below, not by the first hand pass: on a union-find step where 0 and 6 already share a root, the explanation said skipping the join “keeps the two sets separate” and “avoids creating a cycle”. Both reasons are false: there is one set, and pointing the root at itself creates no cycle.
What was measured
| Steps explained | 986 of 986 |
|---|---|
| Algorithms and structures | 57 in 17 topics |
| Model | claude-sonnet-5-5, low effort, Message Batches |
| Cost to write every explanation | $2.41 |
| Cost per visitor | $0 (explanations are static files) |
| Labelled sample | 100 steps, about 6 per topic, fixed seed |
Method
- For each step, the model sees only that step’s data: the line of code running, what the step does, its variables, highlights and what is on screen. It is told to use only those facts.
- Every answer goes through a mechanical check before it is published: two sentences, at most 60 words, no markdown, and every number it mentions must appear in the step data. In the first batch the check held back 14 of 986 answers (5 for over 60 words, 4 for not two sentences, 5 for a number not in the step data); those steps were asked again until an answer passed.
- A fixed, stratified sample of 100 steps was labelled by hand against the step itself. A contradiction is any claim that is false for the step: a wrong value, a different action, a false reason, an outcome from a later step, or a misread line of code. Vague but true is not a contradiction.
- The rate is reported with a Wilson 95% interval.
- A second reader: an LLM judge (Claude Haiku, three votes per step) graded all 100explanations against the same facts. It was first checked against 30 labelled examples, half with a planted error, and agreed on 26 (Cohen’s κ 0.73). On the real explanations it flagged 5. One was a real contradiction the hand pass had missed, now in the count above. The other 4 were wrong, so its flags are read, not counted.
Examples from the sample
Dynamic array (doubling), step 24 of 24 · open this step
On screen: 8 pushes cost 7 copies in all: fewer than two copies per push on average, because each doubling pays for the pushes that filled it.
The run finishes with 8 pushes having cost only 7 copies in total, while the array of capacity 8 holds 7, 3, 9, 4, 1, 6, 2. Doubling makes each resize pay for the pushes that filled it, so the average stays under two copies per push.
Label: correct, no contradiction
Permutations (choose, explore, undo), step 10 of 17 · open this step
On screen: Chosen 2,3. Values still free: 1.
The algorithm pushes 3 onto the current path after 2, so cur becomes 2,3 and only the value 1 is still free. This extends the branch beginning with 2 to explore its second ordering, since the first, 2,1,3, has already been recorded.
Label: correct, no contradiction
Big-O growth, step 4 of 20 · open this step
On screen: n = 4: 1 = 1, log n = 2, n = 4, n log n = 8, n² = 16, 2ⁿ = 16.
At n = 4, the exponential series reaches 16, rising from 8 at n = 3 and now equal to n² = 16. This line shows that checking every subset costs O(2ⁿ), a count that doubles with each added element and will soon outgrow n².
Label: correct, no contradiction
Limits
- One labeller, the author. A second labeller on part of the sample would give an agreement score; that is the next step.
- One quick hand pass judged every step correct; the LLM judge then found the one contradiction it had missed. A slower, adversarial human pass may still find more.
- The Tutor covers the preset input of each algorithm only. Inputs that readers type have no explanations, so they are outside this measurement.
- The mechanical check catches numbers that are not in the data, not wrong reasons. The hand labels measure the rest.
Report generated 2026-11-30.