02 · AI Fundamentals Lab

How does the model decide which words are even allowed?

Before a model picks a word, it has a ranked list of candidates with a score on each. Top-p draws a line down that list and throws away everything below it. Move the line and watch the list get shorter — then notice that the same setting behaves completely differently depending on how sure the model is.

Pick a sentence to finish

Each one comes with a hand-written list of candidate next words and a number for each. Illustrative distribution, not live model output.

Draw the line

Top-p is a share of the total, not a number of words. Keep the most likely candidates until their numbers add up to p — then stop.

The whole point: same p, different behaviour

This updates as you move the slider above. One setting, four sentences.

My observations

Kept in this browser tab only, for this session.