What is a large language model?

In short
A large language model, or LLM, is a machine learning program trained on huge amounts of text to predict and generate language. It can answer questions, summarize documents, translate and draft writing. It works by predicting likely next words, so its answers need checking.
A large language model (LLM) is a type of machine learning model that works with text. It is trained on a very large collection of written material, such as books, articles and web pages. After training, it can read a prompt and produce a reply that reads like natural human writing.
The word "large" refers to two things. The model has a huge number of adjustable values, called parameters, which store what it learned. It is also trained on a large amount of text. Both make the model much bigger than the earlier language programs many developers have seen.
How it works
At its core, an LLM predicts what comes next. It breaks text into small pieces called tokens, which can be whole words or parts of words. Given the tokens so far, the model calculates how likely each possible next token is. It picks one, adds it to the text, and repeats the process until the reply is complete.
During training, the model sees a piece of text with the last part hidden, guesses the hidden part, and compares its guess with the real text. The difference is used to adjust the parameters slightly. Repeat this billions of times and the model learns grammar, facts from its training data, and common patterns of reasoning.
The model is built from neural networks. These are layers of simple math units that pass numbers forward and combine them with weights. Inside each unit, an activation function lets the network learn complex, non-straight-line relationships. You do not need the math to use an LLM, but knowing that it is a neural network helps explain why it needs so much data and computing power.
When to use it
LLMs fit tasks that involve language. Common uses include:
- Drafting or rewriting emails, documentation and product text
- Summarizing long articles or meeting notes
- Translating between languages
- Answering questions in a chat interface
- Explaining code or suggesting fixes
They are less suited to tasks that need exact results every time, such as precise arithmetic or looking up a value in a live database. For those jobs, a normal program or a database query is more reliable. An LLM can be combined with such tools, and the glossary describes agents, which are software that plans steps and calls tools on a user's behalf.
Common mistakes
The most common mistake is trusting an answer because it sounds confident. An LLM generates text that is likely to fit the prompt, not text it has checked against a source. It can invent names, dates or citations that look real. Always verify important facts.
A second mistake is writing vague prompts. The model responds to the context you give it. Clear instructions, examples of the output you want, and details about the audience usually lead to better replies.
A third mistake is judging quality with the wrong measure. Accuracy, the share of correct predictions, can look impressive while hiding real problems, especially when one answer is far more common than the others. The Google Machine Learning Glossary explains accuracy, precision and recall, which help you check how a model really behaves.
Where to learn more
The Google Machine Learning Glossary is a good place to check the terms you meet when working with LLMs. It covers topics such as neural networks, activation functions, agents and evaluation metrics. Read the entries that match the words you see in model documentation, and treat each one as a building block for the bigger picture.
If you are new to the field, start with the basic ideas of training and prediction. Once those feel familiar, the details of tokens, parameters and prompts will be much easier to follow.
FAQ
Is a large language model the same as artificial intelligence?
No. Artificial intelligence is the broad field. A large language model is one kind of AI system that focuses on understanding and generating text.
Do LLMs understand the text they produce?
They learn statistical patterns in language, which lets them produce useful replies. Whether this counts as understanding is debated, so it is safest to check their output.
Do I need to train an LLM myself to use one?
No. Most developers call an existing model through an API or a library. Training a model from scratch needs large amounts of data and computing power.
Why does an LLM sometimes give wrong answers?
The model predicts likely text rather than looking up verified facts. If its training data was incomplete or the prompt was unclear, it can produce confident but incorrect content.
Sources
This page is based on the official documentation below. Read it for full detail.
Large language model — official documentation ↗