FREE · NO ACCOUNT REQUIRED
Trustworthy AI: learn & practise
INTERACTIVE LEARNING · FREE BROWSER EXERCISE
Explore confidence. Check the evidence.
See how sampling changes a word choice, then decide what an evaluation actually supports.
Likelihood is not evidence
A language model assigns probabilities to possible next tokens. Temperature reshapes that distribution: lower values concentrate probability on the strongest candidates; higher values spread it more widely. Neither setting verifies the truth of a statement.
This exercise uses five fixed word probabilities. It is a teaching simulation, not a language model or a real tokenisation system. The words stand in for tokens; no prompt or data is sent to an AI service.
Try: change the temperature, sample repeatedly, then compare the word frequencies with the probabilities.
Continue the Academy lab pathwayCompare the probabilities at temperatures 0.3 and 1.8. Which distribution is more concentrated?
Ready to sample.
Check a claim
Evidence: a classifier answered 82 of 100 held-out examples correctly. No other population or safety testing is reported.
Optional: run a real GPT-2 model
This is actual local text generation, separate from the five-word simulation above. GPT-2 is an older text-completion model, not a chat assistant. It can produce incorrect, biased or inappropriate text.
Load only when ready: approximately 128 MB of quantised model weights, plus tokenizer and runtime files. Downloads come from Hugging Face and jsDelivr; those services receive normal download requests. Your prompt and generated text stay in this browser worker. No paid AI API is called. First loading may take several minutes and needs sufficient device memory; cached downloads may be reused.
Model not loaded.
Top-k limits candidate count; top-p limits their cumulative probability. Temperature reshapes sampling. None of these settings measures truth or confidence in a factual claim.
Prompt tokenisation
Token IDs will appear when generation starts.
Actual model continuation
No output yet.
Try the same prompt twice. Compare wording, then separately verify any factual claims. No confidence score or evidence verification is implied.
Your sampling record
These counts reflect random samples from the displayed teaching distribution. They do not measure factual accuracy. Compare runs at a fixed temperature before drawing conclusions about frequency.
Samples last for this page session. A correctly answered practice check is saved only in this browser, when storage is available.