Understand LLMs · Lesson 03

Why can two answers be different?

How can we separate randomness from changes in context, model, or environment?

Level
Beginner
Core time
12 min
Updated
27 July 2026
Prerequisites
None
Progress
Not started

Start with the mechanism

Three steps to keep in mind

  1. 1

    Compare the inputs

    Hidden instructions, history, retrieved documents, and formatting all belong to the context.

  2. 2

    Compare decoding

    Temperature, top-k, top-p, penalties, and the seed can change token selection.

  3. 3

    Compare the system

    Model versions, libraries, hardware, and parallel execution may affect reproducibility.

Try it yourself

The lab isolates this mechanism with a small, transparent simulation. Everything runs locally in your browser.

Open “Reproducibility diagnosis

Keep these three ideas

Go deeper when you need it

Technical detailWhat the short version leaves out

Greedy decoding removes the random draw at each local step, but it does not guarantee identical results across every infrastructure.

To diagnose variation, change one factor at a time and record the complete configuration.

Your local progress

Status: Not started

Progress stays on this device.