Product RAG enginePlatform overviewAI governanceAI chatbotBuild AI assistantsAI searchAI knowledge baseConnectors & integrationsMCP serverTake the product tour →
Engine & self-hosted RAGSuite EngineSelf-hosted / on-premiseRAGSuite Engine or self-hosted? →
Solutions SMEsHealthcarePublic sectorBanking & insuranceChatGPT alternativeAgencies & partnersAll solutions →
Case studies
Pricing
Resources GuidesBlogFree toolsAI data protectionEU AI ActTrust Center
Start free trial Book a demo
Guide · Language models

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.

Language modelone request
What happens in one request
Input“Summarise the travel policy.”
Split intotokens
Modelpredicts the next token
Outputan answer, token by token
Without your documents it only knows its training

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.
Definition

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.

Diagram in four steps: 1 input “The notice period is”, 2 split into tokens, 3 the model computes probabilities for the next token, 4 candidates three 62 percent, four 21 percent, two 9 percent.How an LLM produces text1Input: “The notice period is …”2TOKENSThenoticeperiodis3The model computes: which token fits next?4NEXT TOKEN (PROBABILITY)three62%four21%two9%
Diagram: simplified; token split and probabilities for illustration.
How it works

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.

2. Tokens become numbers

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.

3. Attention links the context

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.

4. The next token is chosen

At the end there is a probability for every possible token. One is chosen and added, and the process starts again.

Calculate the context window →Context engineering →

Training

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.

PhaseWhat happensWho does it?
PretrainingThe model learns to predict the next token from very large amounts of text.Model providers, with large data centres
Instruction tuningFine-tuning on examples of an instruction and a good answer, so the model follows tasks.Model providers
Feedback trainingPeople rate answers; the model is steered towards the preferred ones (for example RLHF).Model providers
Your own fine-tuningA 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? →

The difference

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.

FeatureLLMRAG systemAI agent
What it isa model that generates texta system: search in your sources plus an LLMa system that uses an LLM to plan steps and use tools
Where knowledge comes fromfrom trainingfrom your documents, fresh for every questionfrom the tools and sources it calls
Source in the answernopossible, per passage, if the system shows themdepends on the set-up
Typical usedrafting and rewording textquestions about policies, manuals, productsmulti-step tasks with approval

RAG explained →AI agents →RAG pipeline →

Examples

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 familyPublisherAccess
GPTOpenAIvia API and chat apps
ClaudeAnthropicvia API and chat apps
GeminiGooglevia API and chat apps
LlamaMetaopen weights, own licence
MistralMistral AIvia API; some models with open weights
QwenAlibabamany models with open weights
Teuken-7BOpenGPT-X projectopen weights, trained for European languages
EuroLLMconsortium of European universities and companiesopen weights, trained for EU languages

Best local LLMs for German →Choosing an open-source LLM →

Limits

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.

Fixed knowledge cut-off

The model does not know what happened after its training data ends. It never knew your internal documents.

In the company

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.

RouteHow it worksWhat you get
Chat appEmployees type questions into a ready-made chat tool.quick to start; knowledge only from training
Your own integration via APIYour own application sends requests to a model.flexible; you build search, permissions and sources yourself
RAG platformA 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.

RAG Engine →Install local AI →

Glossary

LLM glossary: 30 terms in one sentence each.

The key terms around language models, each explained in one sentence.

TermIn one sentence
LLMLarge language model: a model trained on very large amounts of text that generates text.
Language modelA model that computes how likely a word or token is to follow the previous ones.
TokenThe unit in which a model reads and writes text: a word, part of a word or a character.
TokenizerThe step that splits text into tokens before the model processes it.
ParametersThe learned numbers inside the model, usually counted in billions (for example 8B).
WeightsAnother word for parameters. “Open weights” means you can download the model.
TransformerThe architecture behind almost every LLM today, introduced in 2017. It processes the tokens of an input in parallel rather than one after another.
AttentionThe mechanism in a transformer that weighs, for every token, which other tokens matter for it.
EmbeddingA list of numbers (a vector) that represents the meaning of a token or a whole text. Similar texts sit close together.
Context windowThe maximum number of tokens a model can handle in one request, input and answer together.
PromptThe instruction or question you give the model.
System promptFixed rules sent before every user question, such as role, tone and limits.
InferenceRunning a trained model, which means producing an answer.
PretrainingThe first and most expensive training phase: the model learns to predict the next token from large amounts of text.
Fine-tuningTraining an existing model further on your own examples, for example for style, format or terminology.
Instruction tuningFine-tuning on examples of an instruction and an answer so a model follows instructions.
RLHFReinforcement learning from human feedback: training with human ratings of which answer is better.
LoRALow-rank adaptation: fine-tuning that trains small added matrices instead of all weights.
QuantisationStoring weights with fewer bits (for example 4 instead of 16). It saves memory and costs some accuracy.
HallucinationAn answer that sounds convincing but is wrong or not backed by a source.
TemperatureA setting for randomness in word choice: low is more predictable, high is more creative.
Knowledge cut-offThe date the training data ends. The model does not know later events.
RAGRetrieval-augmented generation: for every question, matching passages are found and given to the model with their source.
Vector databaseA database that stores embeddings and finds similar passages quickly.
ChunkingSplitting documents into sections so matching passages can be found one by one.
MultimodalA model that handles images, audio or other formats as well as text.
Reasoning modelA model that produces intermediate steps before answering, to solve harder tasks.
Open-weight modelA model whose weights are published. Its licence sets what you may use it for.
AI agentA system that uses an LLM to plan steps and call tools on its own.
BenchmarkA standard test used to compare models on specific tasks.
Checklist

Is your LLM use well prepared?

Tick what is done. Nothing is stored.

Sanjay Chauhan
Wondering which language model fits your data?Sanjay Chauhan · CTO
FAQ

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.

Sanjay Chauhan
Sanjay Chauhan
CTO

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.