How does AI read a sentence?

Knowledge Videos

Short animated explainers, organised by subject.

How does AI read a sentence?

Tokens, embeddings and attention, stacked in layers to score the next token.

Transcript

Text is chopped into tokens, and each token becomes a list of numbers, called an embedding.

Words with similar meanings get similar numbers, so cat lands near dog.

To read a word, the model looks at every other word, and decides which ones matter.

That is attention. It points to animal, but change the ending, and it points to street.

Dozens of stacked layers refine the meaning of every word.

At the top, it scores the next token, and the loop starts again.

Tokens in, attention across them, one next word out. Repeat that, and you get a conversation.

More in this series