Model foundations · about 15 minutes of study

Next token

An autoregressive model produces a distribution over possible next tokens, chooses one under a decoding rule, appends it and repeats.

Before you start: Review Attention first. Python-like examples use variables, lists and functions.

Guided concept walkthrough

Follow the mechanism

Prefix

Provide the tokens already available.

1 / 4

A conceptual animation, not a live model trace. Play advances every five seconds and stops at the final stage.

Start with an everyday explanation

Predicting the next note in a song resembles choosing a continuation. A plausible next note does not establish that the song describes a true event.

See a concrete example

A toy distribution is approve 0.45, reject 0.33, settled 0.14 and pending 0.08. Greedy decoding picks approve even if the actual policy record says reject.

A claim to question

The most probable continuation is not necessarily the correct decision.

Try before revealing the answer

Write a decision rule that refuses to approve a claim without a verified record, regardless of generated wording.

Show the worked answer

Keep the business decision in authorized application logic. Let the model explain the verified outcome and cite the record; do not execute a sampled decision as authority.

Now explain the idea to someone else using your own example. If you cannot explain a stage, revisit it before moving on.

Your explanation and revision notes

Loading local notes…

Read the primary reference

Generation configuration

The explanation and exercises are original teaching material. The linked source provides background; examples and assumed numbers here are not claims about a particular company.