AI, Actually ExplainedLesson 26 of 92

Module 3 · What a chatbot is actually doing

Why the same question gives different answers

In this lesson

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

This chapter’s goalTrace text through tokenisation and next-token generation, distinguish training from inference, and explain how attention, decoding, context management, retrieval and product controls affect an assistant. Check sources instead of treating fluent answers or citations as proof.

This chapter’s media

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

FormatEnglishहिंदी
Chapter filmWatch11:01Watch12:27
Full audiobookNot availableNot available

A little at a time

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

Step 1 of 8Free · no account needed
Lesson steps

The model does not choose the word

At each text-generation step, the model supplies next-token scores. A decoding procedure uses them to select output, sometimes with sampling and sometimes without it. Model scores, decoding settings and the surrounding serving system all contribute to the observed behaviour.

Always selecting a highest-scoring next token is greedy decoding. Research on particular open-ended generation tasks found that likelihood-focused decoding could produce bland or repetitive text. That does not mean greedy decoding always loops or is unsuitable for every task.

When sampling is enabled, two familiar controls are temperature and top-p. Their availability, defaults and interaction depend on the model and software.

Temperature changes how sharply the scores favour leading tokens before sampling. Lower positive values usually concentrate the distribution; higher ones usually flatten it. Some systems use zero to request greedy decoding. There is no universal “creative” value or temperature at which all models become nonsensical, so consult the actual implementation and test it.

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

Stuck on something?Ask Meenal, your AI tutor

How to cite: Addaly (2026) ‘Why the same question gives different answers’, in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/why-answers-differ (Accessed: 29 November 2026).