Module 3 · Turning scores into text

Asking the same question several times

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 7 of 10 in this chapter

This chapter’s goalChoose and justify a decoding strategy for a given task, read raw log-probabilities to get a usable confidence signal, force structurally valid output without prompt-begging, and explain why identical requests at temperature zero can still differ.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

One prompt, several draws

Because generation samples, running the same prompt twice gives you two independent attempts. That is not only a nuisance to be suppressed; it is a resource.

Three techniques use it, and they differ in what they need.

Self-consistency. Sample n answers at a moderate temperature, then take the majority answer. It needs a task with a checkable final answer (a number, a label, a chosen option) so that “majority” is well defined. On multi-step arithmetic and reasoning benchmarks this reliably beats a single sample, with the gain flattening somewhere around 10 to 40 samples depending on the task.

Best-of-n. Sample n answers, then score them with something (a reward model, a rubric-driven judge, or a test suite) and keep the best. Applicable to open-ended output where voting is meaningless, but only as good as the scorer.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the AI, Actually Explained exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Asking the same question several times’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/sampling-many-answers (Accessed: 29 November 2026).