Codele / LLMs, RAG and agentic AI
How text gets generated
A model writes one token at a time. It predicts the likelihoods, picks one, adds it to the text, and repeats.
- A model writes one token at a time: predict the likelihoods, pick one, add it to the text, repeat.
- Temperature sets how flat the likelihoods are. Low is steady and repeatable, high is varied and riskier.
- Real systems pick at random, weighted by the likelihoods. Our toy uses a fixed rule so it never changes.
- Each new word is chosen from the text so far, so an early odd pick can steer everything after it.
- This is a toy: our table looks only at the last word, while a real model reads the whole text so far.
Loading the playable lesson…