Boost your brand. Grow your know-how. Win back your time. Power up with technology.
Build your project

Artificial intelligence

What is an LLM and how does a language model work?

The technology behind ChatGPT, Claude and Gemini, explained without jargon: how it predicts text, what it takes into account and where it goes wrong.

Web Experience teamPublished

What is an LLM? Short for Large Language Model, it’s an artificial intelligence program trained on huge amounts of text to do one thing very well: predict how a piece of text continues, word by word. From that seemingly simple skill, it can draft an email, summarise a contract, answer an enquiry or translate a catalogue.

It’s the engine behind ChatGPT, from OpenAI; Claude, from Anthropic; and Gemini, from Google. Whenever you type into any of those applications, what answers you is a language model.

Here you’ll see how it works inside, without formulas, so you can decide which tasks in your business it makes sense to hand over to it and which it doesn’t.

What is an LLM, in simple terms

Think of the autocomplete feature on your phone’s keyboard. You type “see you” and it suggests “tomorrow”. An LLM does something similar, but on a far bigger scale: it takes into account everything you’ve written and strings words together until it builds a complete answer.

The “large” refers to the amount of text it’s trained on and to the size of the model, measured in parameters: something like internal dials that get adjusted during training until the model predicts well.

A business example: an estate agency gives an LLM the details of a flat and asks it for a listing description. The model doesn’t know that flat, but it has learnt how good descriptions are written and combines that with the details it was given.

What tokens are

A language model doesn’t read letters or whole words: it reads tokens. A token is a fragment of text, which can be a whole word, part of a word or a punctuation mark. “House” may be a single token, while a long or unusual word, such as “waterproofing”, will probably be split into several.

It’s like a set of building blocks: the model breaks language down into pieces it knows how to handle. This matters for two practical reasons: when a company uses a model through its API, the cost is usually calculated from the tokens that go in and come out, and the limits on how much text it can read and write are also measured in tokens.

How a language model is trained

Training has, broadly speaking, two stages:

  1. Pretraining. The model receives huge amounts of text, such as books, websites, documentation and code, and practises the same exercise over and over: read a fragment and guess how it continues. Each mistake adjusts its parameters a little and, over time, the model picks up grammar, facts about the world, writing styles and a certain ability to reason.
  2. Tuning. A model that only predicts text is not yet a good assistant. In this stage it’s trained with examples of questions and good answers, and with ratings from people who indicate which answer is better. That’s how it learns to follow instructions, keep a tone and refuse certain requests.

A key detail: training ends at some point. The model doesn’t know what happened after that cutoff date, unless the application connects it to a search engine or another source that stays current.

How it generates an answer

When you type a question, the model works out which token is most likely to come next, adds it and calculates again with that new token included. It repeats the process until the answer is complete. That’s why the text appears gradually on screen: it’s being generated at that very moment.

It doesn’t always pick the most likely token: there’s usually a controlled dose of randomness, which is why the same question can get two different wordings.

For your business, what matters is this: the model produces the text that best fits what it has read; it doesn’t look things up in a database of facts. That difference explains both its fluency and its mistakes.

What the context window is

The context window is the amount of text the model can take into account at once: your instructions, the conversation so far and any document you’ve given it. It works like the desk of someone handling a case: they can have several folders open, but the desk only has so much room.

Two practical consequences follow:

  • The model doesn’t remember between conversations on its own. If an application “remembers” you, it’s because it stores information separately and passes it back in.
  • What isn’t in the context doesn’t exist for the model. If you want it to answer questions about your clinic’s opening hours, those hours have to be there, written by you or added by a system.

That idea is the basis of RAG, the technique that lets an AI answer with your company’s information.

Why an LLM “hallucinates”

A hallucination is an answer that sounds confident and well written but is false: a quote that doesn’t exist, an invented regulation, opening hours nobody gave it. It happens because the model is built to produce plausible text, and when a fact is missing, it sometimes fills the gap with something that could be true.

Picture a new, very articulate employee whom nobody has told they’re allowed to say “I don’t know”. If a customer asks about a promotion they’ve never heard of, they might improvise. Something similar happens with an LLM, which is why it needs rules and sources.

Hallucinations can’t be eliminated entirely, but a few practices reduce them:

  • Give it the correct information within the context instead of relying on what it “knows”.
  • Explicitly ask it to say when it doesn’t have the information.
  • Limit its tasks to things that can be checked.
  • Have a person review anything with consequences, such as a quote or a legal answer.

What it can and can’t do for your business

Used well, a language model is very good at working with text: drafting, summarising, classifying, translating, extracting data from a document or answering from the information you give it. Many models also understand images and audio, which means they can read a scanned invoice or transcribe a voice message.

Some concrete examples:

  • A law firm summarises long filings before the lawyer reads them in full.
  • An online academy sorts its students’ messages into course questions, payment problems or certificate requests.

Where you need to be careful: exact calculations (it can get a sum wrong if it doesn’t use a calculator or a spreadsheet as a tool), data that changes all the time and decisions with legal or medical impact. And before you paste customer data into an AI tool, check what it does with it, as we explain in how to use AI without putting your data at risk.

From language model to agent

On its own, an LLM reads text and writes text: it can’t book an appointment or check your stock. When it’s connected to tools, such as your calendar or your management system, and decides which one to use and with what data, it starts working as an AI agent.

That combination is what makes AI useful in customer service: the model brings the understanding of language and your systems bring the real data. At Web Experience, that’s exactly the bridge we work on when we build AI agents for WhatsApp and the web.

In short

  • An LLM is a model trained on huge amounts of text to predict how a text continues; that’s where its ability to write and answer comes from.
  • It reads and writes in tokens, and both its limits and its usage cost are measured in that unit.
  • It only takes into account what fits in its context window: if you want it to use your information, you have to give it.
  • It can make up facts with complete confidence, which is why it needs sources, clear rules and human review for anything important.
  • Connected to your systems, it becomes the foundation of an agent that can handle real tasks.
Bring it to your businessAI agentsSee the service

Artificial intelligence

Frequently asked questions

  1. What does LLM stand for?

    It stands for “Large Language Model”. It’s a program trained on huge amounts of text to understand and generate language.

  2. Is ChatGPT an LLM?

    ChatGPT is an application that runs on OpenAI’s language models. The same goes for Claude, from Anthropic, and Gemini, from Google: the application is the window and the model is the engine.

  3. Does an LLM learn from what I type?

    The model doesn’t change while you chat with it. Some services may use conversations to train future versions, depending on their terms and your settings, so it’s worth checking them before you share sensitive data.

  4. Why does an LLM make up answers?

    Because it generates the most likely text, not the most verified one. If a fact is missing, it may fill the gap with something that sounds right but is false. Giving it your information and asking it to say when it doesn’t know reduces that risk.

Want to apply this in your company?

Tell us what you need and we will propose a concrete path, starting with a free diagnosis.