Skip to content Are you an AI agent? QIO facts, prices and requests are here

10 min read

What is an LLM and how do large language models work?

A large language model predicts a likely continuation of a text. Here is how LLMs work, how they differ from other neural networks, which types are available and what a website needs to appear in their answers.

A chrome sphere made of thin discs, with the next disc floating above it

A large language model (LLM) is a neural network trained on vast amounts of text to predict the next piece of text. These models power assistants such as ChatGPT, Claude, Gemini and the Russian services GigaChat and YandexGPT. The model builds a likely continuation of your prompt one step at a time. That explains both its strengths and its characteristic mistakes.

What is a large language model in simple terms?

An LLM is a neural network with billions of adjustable parameters. It takes text as input and produces text as output. “Large” refers both to the volume of training data and to the number of parameters.

Three features define a large language model.

  • Scale. Modern models have anywhere from a few billion to hundreds of billions of parameters. These are numbers the model adjusts during training.
  • Natural language. You can interact with the model using everyday language, without programming or learning special commands.
  • Context. The model takes a whole passage or conversation into account. It can continue a train of thought, shorten a document or answer a follow-up question.

Why this matters outside engineering

Understanding how a model generates text helps you give it suitable tasks and judge the results. It predicts plausible wording without independently checking facts. That is why you need to verify answers against sources.

For businesses, visibility matters too. People increasingly turn to assistants with questions, and search engines incorporate AI answers into their results. A clearly organised website is easier for these systems to use as a source.

How do LLMs relate to AI and neural networks?

Artificial intelligence is the field. Neural networks are one of its tools, and LLMs are a type of neural network designed for language.

Three terms with different scopes

  • AI covers systems that perform tasks traditionally associated with human thinking, from playing chess to recommending films on a streaming service.
  • A neural network builds such a system from layers of simple computational units. Neural networks can recognise faces in photos, detect noise in audio and spot defects on a production line.
  • An LLM works with text. It can write, translate, answer questions and generate code.

A text-to-image generator also uses a neural network, but its output is a picture. Many assistants are multimodal and combine several models, so you can work with both text and images in one chat.

How does an LLM work?

Chrome cubes joined by wires of different thicknesses, with the final cube half formed
The model weighs the relationships between tokens to predict the next one.

An LLM splits text into pieces, represents them as numbers, weighs their relationships and repeatedly predicts the next piece. Its statistical predictions favour continuations that fit the preceding text. This differs from how a person understands meaning.

Tokenisation

The model splits text into tokens, which can be words, parts of words or individual characters. A finite vocabulary of tokens lets it assemble even words it has never seen in full. Providers generally use tokens to measure prompt length, usage limits and costs.

Embeddings

Each token becomes a vector, a set of numbers called an embedding. Related meanings have similar vectors. For instance, “buy” and “order” would be closer together than “buy” and “cloud”. Search engines and chatbots also use embeddings to find passages in a knowledge base that match the meaning of a query even when the words differ.

Attention

Attention helps the model work out which other words matter most to the token it is processing. Google’s machine learning course uses the sentence “The animal didn't cross the street because it was too tired.” Attention helps relate “it” to “animal” rather than “street”. The transformer architecture behind modern LLMs uses this mechanism. Google researchers described it in their 2017 paper “Attention Is All You Need”.

Predicting the next token

Given a prompt, the model calculates probabilities for possible next tokens, selects one, adds it to the text and repeats. An answer several paragraphs long takes hundreds of these steps. This is why people sometimes describe an LLM as a sophisticated autocomplete system.

Architecture and trained weights

The architecture defines how many layers a model has, how they connect and how attention works. Weights are the parameter values learned during training. Different weights produce different models even when the architecture is the same. Fine-tuning on examples of a particular task changes the weights while preserving the architecture.

What influences a language model’s answers?

Training data, model size, generation settings and the contents of the prompt all affect the result.

What is context?

Context includes all the text available when the model answers: system instructions, conversation history, attached documents and the question itself. The context window limits how much fits. In a long conversation, the model may appear to forget the beginning once it falls outside the window.

Why the same model gives different answers

  • Temperature controls randomness in token selection. A lower temperature makes answers more predictable. A higher one produces more variety and carries more risk.
  • Knowledge cut-off. Training data covers the world up to a particular date. The system must supply search results or documents for the model to learn about later events.
  • Prompt wording. Details, examples and an assigned role can change the result substantially without changing the model’s weights.

What types of LLM are there?

Models can be closed or open, large or compact, general-purpose or specialised. Choosing one involves trade-offs between quality, cost and control over data.

TypeHow it worksWhen it fits
Closed model accessed through an APIYour application sends requests to the provider’s serversYou need a quick start and the data is not confidential
Open weights, hosted locallyThe model runs on your serverYou have data storage requirements and your own computing resources
Compact modelRuns faster and at lower cost, even on ordinary hardwareRoutine classification, field extraction and short answers
Specialised modelFine-tuned on texts from an industry or taskA narrow field with its own terminology

These categories overlap. A compact, specialised model can have open weights and also be available through an API.

Choosing between open and closed models

Closed models are easier to connect, and leading ones often perform better on complex tasks. Locally hosted models with open weights keep data within your servers and network and allow fine-tuning. You need to budget for equipment and engineering time. Model rankings change regularly. Choose according to your task, budget and security requirements.

Where businesses use LLMs and how to connect one

LLMs can help wherever teams handle large amounts of routine text, including support, document processing, marketing, analysis and development. You can connect through an existing API or run the model on your own server. Applications include:

  • Answering customer questions using the company knowledge base
  • Drafting emails, product descriptions and articles
  • Extracting data from contracts, enquiries and reviews
  • Translating and adapting text
  • Helping developers write and review code

When an assistant answers from a knowledge base, the surrounding system handles retrieval. For example, a customer asks how much a service costs. The software finds the relevant price list entry and sends it to the model with the question. The model phrases the answer using that text.

Examples from marketing and SEO

A model can sketch a content plan, draft articles and meta tags, or classify search queries by intent. It does not know search volumes. Collect those figures from analytics and tools such as Yandex Wordstat, a Russian search query statistics service. The model can then group and describe the data.

Using an API or hosting the model yourself

An API is convenient to start with. You pay for usage, the provider handles updates and you need no hardware of your own. Our comparison of free LLM APIs covers some options. Local hosting can make sense for personal or commercial data, or for sustained high demand. Either way, the model needs a connection to your website, CRM or knowledge base. Our guide to integrating AI into a website and CRM explains how this works.

What to check when optimising a website for LLMs

For language models and search assistants to use your pages as sources, the pages should be crawlable, indexed and clearly written. The same fundamentals apply to conventional search.

Google says there are no additional requirements for AI Overviews, which appear above search results, or AI Mode, its dedicated AI search experience. A page must be indexed and eligible for a snippet, the short description in search results. Google also says it requires no special machine-readable files or markup.

  • robots.txt. Allow crawlers to access relevant sections. Check whether your content delivery network (CDN), which serves the site to visitors, or bot protection blocks them. Certain crawler identifiers in robots.txt, such as Google-Extended, control the use of content for model training without affecting ordinary search. These identifiers are unrelated to text tokens.
  • llms.txt. This proposed standard puts a Markdown file in the site root with a short description and links to key pages. You can add one, but Google says its AI features do not require it. Cover the basics first.
  • Schema.org. Structured data can identify your organisation, products, articles and questions unambiguously. It should match what visitors see on the page.

A practical writing checklist

  • Answer the heading’s question directly in the first paragraph below it.
  • Use headings that reflect questions your audience actually asks.
  • State facts, figures and conditions explicitly.
  • Include an author, a date and links to primary sources.
  • Give each page one topic and avoid duplicating it on other URLs.

Our guide to getting your brand into AI answers explains how to prepare your site.

LLM limitations and common mistakes

LLMs offer speed, scale and flexibility. They can also invent facts, rely on outdated knowledge and respond differently to small changes in wording. Problems often start when a task demands something the model was never designed to do.

A language model predicts plausible text without retrieving facts itself. A confident tone tells you nothing about the accuracy of its answer.

When to avoid using an LLM

Use human review for high-stakes work such as legal opinions, medical recommendations, pricing calculations and financial reporting. When a task requires a precise, current fact, the system also needs access to a verified data source.

Common mistakes

  • Publishing answers without checking facts, figures and links
  • Asking the model to invent product features instead of supplying catalogue data
  • Sending personal or commercial data to an external service without assessing the risks
  • Stuffing pages with keywords suggested by the model
  • Introducing an LLM across every workflow before piloting it on one task
  • Failing to measure time, answer quality and conversions before and after implementation

Our article on AI hallucinations explains why models sometimes give confident but incorrect answers and how to reduce the risk.

To identify which tasks in your company suit a language model, start with a review of your workflows as part of our AI implementation and automation service.

Sources

Questions and answers

What is an LLM in simple terms?

It is a neural network trained on large collections of text to predict the next word or part of a word. These models power chat assistants that write, translate and answer questions.

What does LLM stand for?

Large language model. “Large” refers to the scale of the training data and the billions of model parameters.

How does an LLM differ from other neural networks?

An LLM specialises in language and takes text as input and output. Other neural networks recognise images or speech, or predict numerical values.

What is a local LLM?

A locally hosted model processes requests on your computer or server. Open weights mean you can obtain the model’s parameter files and run it yourself. If you send a document to the same model through an external service’s API, the provider processes it.

Why do LLMs invent facts?

A model chooses a plausible continuation without checking it against a database of facts. When information is missing, it can give a confident but incorrect answer.

Where are LLMs used?

Applications include support chatbots, writing and document preparation, translation, analysing reviews and enquiries, programming and searching a company knowledge base.

Follow the journal

New pieces on websites, SEO and AI come out in the QIO journal. Follow in Google, by RSS or in Telegram to get them first.

Read next

How can we help?
Discuss a project