HOW AI WORKS
HOW IT WORKS
AI is basically a guessing machine that uses probability. It looks at the words so far and gives each possible next word a chance. Those chances come from patterns it learned from lots of human writing, including books, articles, websites, and conversations. It picks one word, adds it to the sentence, and guesses again.
MORE INFO
A text-generating language model produces one token at a time. A token can be a whole word, part of a word, punctuation, or a space. At each step, the model uses the text it can currently see to score possible next tokens. A selection rule chooses one token, adds it to the text, and repeats.
During training, the model repeatedly compared its predictions with training text. Its internal numbers were adjusted to improve the next prediction. People did not type a full set of grammar rules into it.
This demo randomly samples from the chances shown. Real systems can sample, choose the highest-scoring token, or use other selection rules. Sampling makes different outputs possible. Choosing only the highest score can work for short output, but it can become repetitive in longer text.
A real model scores a much larger vocabulary at each step. The exact size depends on the model. This demo shows up to seven choices, and their displayed chances are rescaled to add up to 100%.
This demo checks only a few recent words in a small hand-written table. A real model can use far more earlier tokens, up to the amount of text it can hold at once. That is why "The dog jumped onto the ___" and "The frog jumped onto the ___" can produce different choices.
The chances here were written by hand. A real model calculates scores from the numbers it learned during training. A basic language model is not searching a database for a stored sentence. An AI product can still be connected to search, files, calculators, or other tools.