← Glossary

LLM

An AI model whose task is to predict the next token in a sequence

What are LLMs

They are artificial intelligence models that specialize in processing human language and generating responses based on it.

How LLMs work

  1. They are trained on a huge amount of data, not only text, reaching sizes of petabytes (1000 * 1000 gigabytes). The data is fed into the model in the form of tokens, and the model's parameters are learned from it.
  2. Crunching through such a large amount of data allows the model to respond in line with our language patterns, sentence structures and the intended meaning of words.
  3. Based on the learned data, the model's main task is to predict the next token in the sequence that should be returned. By repeating this prediction many times, we get a “statistically correct” string of text in the response. This is why the returned text is fluent and sounds as if it was written by a human.

An important concept to understand is that these models don't “understand” the data they receive or its context at all. That is a big mental shortcut. Their job is to return the statistically most likely string of characters for our question. That's why models sometimes hallucinate.