title: The Next Letter Lab description: Enter a futuristic 3D AI laboratory and discover how artificial intelligence predicts and samples the next letter using probability. libraries: three emoji: 🧠 color: purple -->
Step inside an AI prediction engine. Explore how artificial intelligence calculates possibilities and chooses the next letter, one prediction at a time.
Imagine an AI is writing a word. It looks at the letters already written and calculates what might come next.
AI looks at the letters already written and considers possible next letters.
It assigns a probability to each possible letter. Higher probability means more likely.
You make a prediction. Then the AI samples a letter using its probability distribution.
A 60% probability does not guarantee that a letter will be selected. A 5% possibility can still happen!
THE AI HAS ALREADY WRITTEN
Which letter will the AI select next?
These percentages represent the model's estimated probabilities.
You explored how probability helps AI generate language.
AI calculates probabilities for possible next letters and samples an outcome. It does not always choose the letter with the highest probability.