What is an LLM? How Do Chatbots Work?

A large language model (LLM) is an AI trained on enormous amounts of text that predicts the next word in a sentence โ€” chatbots like ChatGPT are built on top of one.

Think of it like this

An LLM is like an extremely well-read autocomplete. It has seen so much text that, word by word, it can predict what a very good answer would probably look like โ€” without "knowing" anything the way a person does.

What's happening

Diagram showing a large language model being trained on enormous amounts of text, then being used to predict a sentence one word at a time in response to a question

Summary

An LLM is trained on huge amounts of text so it can predict, one word at a time, what a plausible response looks like โ€” a chatbot is just a friendly interface wrapped around that prediction loop.

A Closer Look

During training, the model reads enormous amounts of text โ€” books, articles, websites, conversations โ€” and learns statistical patterns in how words follow other words, across billions of examples. It doesn't memorise facts the way a database does; it learns the shape of language well enough to continue it convincingly.

When you type a question into a chatbot, the model doesn't look up an answer โ€” it predicts the most likely next word, adds that word to the conversation, then predicts the next one, and repeats until the response is complete. This is why LLMs can write fluently about almost anything, and also why they can sound completely confident while being factually wrong: fluency and accuracy are two different things.

Common Misconceptions

  • An LLM doesn't search the internet in real time by default โ€” some chatbot products add that as a separate tool, but the core model is only working from what it learned during training.
  • An LLM can be confidently wrong โ€” this is often called "hallucinating," and it happens because the model is optimised to produce plausible-sounding text, not verified facts.
  • A chatbot usually doesn't remember you between separate conversations โ€” unless a product specifically saves and reloads that history, each new chat starts fresh.

How it connects

LLMs are a specific, very visible application of ideas covered elsewhere on this site:

Try it yourself

Ask any chatbot a question you already know the answer to, then check its response carefully for small mistakes. Fluent, confident wording is not the same thing as being correct โ€” this is the best way to build an intuition for the difference.