An LLM (large language model) is a kind of artificial intelligence trained on an enormous amount of text, which writes answers by predicting what comes next. Chats such as ChatGPT, Gemini and Claude run on LLMs, as do assistants in code editors and search engines.
In short
- An LLM predicts which piece of text (token) should come next - and that is how an answer is built, bit by bit.
- The model "remembers" the conversation only within its context window, and its knowledge ends at its training date.
- It writes fluently and convincingly, but it does not check facts - that is your job.
Autocomplete on steroids
Know the suggestions on your phone's keyboard? You type "Good" and the phone suggests "morning". An LLM works on a similar principle, only at a gigantic scale. During training it "read" a huge share of publicly available text - books, articles, websites, code - and learned what usually follows what.
When you ask a question, the model predicts the first piece of the answer, appends it to the text, predicts the next one, and so on. That is why the answer appears on screen gradually. Sounds simple? The surprising part is that, at the right scale, such a simple principle gives you the ability to translate, summarise, write code and solve problems.
Tokens
The model does not see text as letters or words, but as tokens - pieces of words. A short, common word is often one token; a longer, rarer one is several. In English a token is about 4 characters on average, while languages with lots of inflection and accents, like Polish, usually need more tokens for the same text.
This matters in practice: AI services count fees and limits in tokens, not words.
The context window, or the conversation's memory
The model does not remember your earlier conversations on its own. For every answer it gets the whole current conversation again - your questions, its answers, the documents you pasted. How much it can take in at once is set by the context window, measured in tokens. Today's models have windows of hundreds of thousands of tokens, whole books, but still finite.
When a conversation gets very long, the oldest parts may be dropped or "blur" in the model's attention. In other words: for a new topic, start a new chat rather than dragging on a thread from an hour ago.
Where an LLM gets its knowledge
From training, which ends at a certain point (the so-called knowledge cutoff). The model does not know about anything that happened later on its own. That is why many chats can now search the Internet or read documents you give them - then the answer is based on those sources, not only on the model's "memory".
The limits of an LLM
- It does not check facts - it writes what sounds likely. Hence hallucinations.
- It can be weak at arithmetic - predicting text is not a calculator, though newer models are getting better and can use tools on their own.
- Its answer is only as good as the question - more in What is a prompt and how to write one?.
When it matters to you
- You write with the help of an AI chat - understanding tokens and context makes it easier to see why the model "forgets" or mixes up details.
- You paste text from a chat into Word or an email - answers usually come in Markdown, which is easy to clean up with the AI text cleaner.
- You paste company data - read AI and privacy.
Related terms
artificial intelligence, token, context window, prompt, hallucinations.