What is an LLM? Large language models explained simply
An LLM, short for large language model, is an AI that has learned from huge amounts of text and continues text piece by piece. This guide explains in plain words how an LLM works, how it is trained, where its limits are and how companies use it safely with their own knowledge.
With a glossary: 30 terms in one sentence each.
Key points
- An
LLM computes how likely every possible next token is at every step, and picks one. That is how whole answers come about. - It only knows what was in its training data and what you give it with the request.
It does not know your internal documents. - For answers from company knowledge, most companies use
RAG : the model gets matching passages with their source for every question.
What is an LLM?
An LLM (large language model) is an AI model trained on very large amounts of text. In training it learned how language works: which words belong together, how sentences continue, how questions get answered. Given a text, it computes how likely every possible next piece of text is, picks one, adds it and repeats until the answer is complete.
“Large” refers to two things: the amount of training data and the number of parameters, the learned numbers inside the model. Today’s models often have billions of them. Almost all are built on the transformer architecture, which a research team introduced in 2017 (Vaswani et al. 2017).
What matters for companies: an LLM is not a reference work. It produces plausible language. It does not check on its own whether a statement is true. That is why the knowledge you give it with a question matters.
How an LLM works, in four steps.
Everything the model handles in one request has to fit into its context window: system prompt, question, the passages you add and the answer itself. How much that is depends on the model.
The tokenizer splits your input into tokens: whole words, parts of words or characters. Long compound words are often split into several pieces.
Count tokens →Each token is turned into a vector, an embedding. At first it stands for the token on its own; the meaning in context builds up in the layers that follow.
Across many layers the model weighs which tokens matter to each other. That is how it can work out what “it” refers to in a sentence.
At the end there is a probability for every possible token. One is chosen and added, and the process starts again.
How an LLM is trained.
A model is built in several phases. Model providers handle the first three. What companies can do themselves is fine-tuning. For knowledge that changes, it is rarely the best route.
| Phase | What happens | Who does it? |
|---|---|---|
| Pretraining | The model learns to predict the next token from very large amounts of text. | Model providers, with large data centres |
| Instruction tuning | Fine-tuning on examples of an instruction and a good answer, so the model follows tasks. | Model providers |
| Feedback training | People rate answers; the model is steered towards the preferred ones (for example RLHF). | Model providers |
| Your own fine-tuning | A finished model is trained further on your own examples for style, format or terminology. | Companies, if needed |
How feedback training with human ratings works for language models is described by Ouyang et al. 2022.
Fine-tuning in detail →Train AI on your own data, or use RAG? →
LLM, RAG and AI agent: the difference.
The three terms often get mixed up. The LLM is the core. RAG and agents are systems that use an LLM and give it knowledge or tools.
| Feature | LLM | RAG system | AI agent |
|---|---|---|---|
| What it is | a model that generates text | a system: search in your sources plus an LLM | a system that uses an LLM to plan steps and use tools |
| Where knowledge comes from | from training | from your documents, fresh for every question | from the tools and sources it calls |
| Source in the answer | no | possible, per passage, if the system shows them | depends on the set-up |
| Typical use | drafting and rewording text | questions about policies, manuals, products | multi-step tasks with approval |
Well-known LLMs at a glance.
Some models you can only use through a provider’s interface; others have open weights you can download and run yourself. ChatGPT, by the way, is not a model but a chat app that runs on GPT models.
| Model family | Publisher | Access |
|---|---|---|
| GPT | OpenAI | via API and chat apps |
| Claude | Anthropic | via API and chat apps |
| Gemini | via API and chat apps | |
| Llama | Meta | open weights, own licence |
| Mistral | Mistral AI | via API; some models with open weights |
| Qwen | Alibaba | many models with open weights |
| Teuken-7B | OpenGPT-X project | open weights, trained for European languages |
| EuroLLM | consortium of European universities and companies | open weights, trained for EU languages |
What an LLM cannot do.
Most everyday problems have the same cause: for a given question, the model does not see the information it needs for a correct answer.
An LLM can invent statements that sound convincing. Without a source, that often goes unnoticed.
What helps against hallucinations →The model does not know what happened after its training data ends. It never knew your internal documents.
Only a certain amount of text fits into one request. A whole filing cabinet does not belong in a prompt.
Context window calculator →What you type goes to wherever the model runs. For personal data, what counts is where that is and who has access.
AI and data protection →How companies use LLMs with their own knowledge.
There are three typical routes. Which one fits depends on whether answers have to come from internal documents and be verifiable.
| Route | How it works | What you get |
|---|---|---|
| Chat app | Employees type questions into a ready-made chat tool. | quick to start; knowledge only from training |
| Your own integration via API | Your own application sends requests to a model. | flexible; you build search, permissions and sources yourself |
| RAG platform | A platform searches your sources and gives the model matching passages. | answers with sources; permissions and deletion in one place |
In RAGSuite, a language model answers questions from your sources and names the sources it used. You choose the model per project and can switch it at any time. With Enterprise you can also connect local models on your own servers, via Ollama or an OpenAI-compatible endpoint.
LLM glossary: 30 terms in one sentence each.
The key terms around language models, each explained in one sentence.
| Term | In one sentence |
|---|---|
| LLM | Large language model: a model trained on very large amounts of text that generates text. |
| Language model | A model that computes how likely a word or token is to follow the previous ones. |
| Token | The unit in which a model reads and writes text: a word, part of a word or a character. |
| Tokenizer | The step that splits text into tokens before the model processes it. |
| Parameters | The learned numbers inside the model, usually counted in billions (for example 8B). |
| Weights | Another word for parameters. “Open weights” means you can download the model. |
| Transformer | The architecture behind almost every LLM today, introduced in 2017. It processes the tokens of an input in parallel rather than one after another. |
| Attention | The mechanism in a transformer that weighs, for every token, which other tokens matter for it. |
| Embedding | A list of numbers (a vector) that represents the meaning of a token or a whole text. Similar texts sit close together. |
| Context window | The maximum number of tokens a model can handle in one request, input and answer together. |
| Prompt | The instruction or question you give the model. |
| System prompt | Fixed rules sent before every user question, such as role, tone and limits. |
| Inference | Running a trained model, which means producing an answer. |
| Pretraining | The first and most expensive training phase: the model learns to predict the next token from large amounts of text. |
| Fine-tuning | Training an existing model further on your own examples, for example for style, format or terminology. |
| Instruction tuning | Fine-tuning on examples of an instruction and an answer so a model follows instructions. |
| RLHF | Reinforcement learning from human feedback: training with human ratings of which answer is better. |
| LoRA | Low-rank adaptation: fine-tuning that trains small added matrices instead of all weights. |
| Quantisation | Storing weights with fewer bits (for example 4 instead of 16). It saves memory and costs some accuracy. |
| Hallucination | An answer that sounds convincing but is wrong or not backed by a source. |
| Temperature | A setting for randomness in word choice: low is more predictable, high is more creative. |
| Knowledge cut-off | The date the training data ends. The model does not know later events. |
| RAG | Retrieval-augmented generation: for every question, matching passages are found and given to the model with their source. |
| Vector database | A database that stores embeddings and finds similar passages quickly. |
| Chunking | Splitting documents into sections so matching passages can be found one by one. |
| Multimodal | A model that handles images, audio or other formats as well as text. |
| Reasoning model | A model that produces intermediate steps before answering, to solve harder tasks. |
| Open-weight model | A model whose weights are published. Its licence sets what you may use it for. |
| AI agent | A system that uses an LLM to plan steps and call tools on its own. |
| Benchmark | A standard test used to compare models on specific tasks. |
Is your LLM use well prepared?
Tick what is done. Nothing is stored.
Questions about LLMs.
What is an LLM in simple terms?
An LLM is a large language model. It has learned from huge amounts of text how language works and continues a text piece by piece. That is how it answers questions, summarises or writes drafts. It produces plausible language but does not check on its own whether a statement is true.
What does LLM stand for?
LLM stands for large language model. In the AI context it does not mean the LL.M. law degree (Master of Laws).
Is ChatGPT an LLM?
Not quite. ChatGPT is a chat app. The answers come from language models in the GPT family, and those are LLMs. The same applies to other chat apps and the models behind them.
What is the difference between an LLM and RAG?
The LLM is the model that generates text. RAG is a method that gives the model matching passages from your documents for every question. The model can then answer from your knowledge and name the source, without being retrained.
What types of LLMs are there?
For example, models you can only reach through a provider’s interface, and models with open weights you can run yourself. There are also small and large models, text-only and multimodal models, and reasoning models that produce intermediate steps before they answer.
Can I use an LLM with my own data?
Yes. The usual route is RAG: your documents are made searchable, and the model gets the matching passages with every question. You usually do not need to train a model for this. Fine-tuning pays off more for style, format or terminology.
A language model that knows your knowledge.
Sanjay shows you how RAGSuite connects a language model of your choice to your sources, with the source on every answer.