Glossary · AI Engineering

What is an LLM (large language model)?

Short answer

An LLM (large language model) is an AI model trained on very large amounts of text to predict the next token in a sequence. That simple objective, at scale, lets it write, summarise, translate, answer questions, reason through problems and generate code. GPT, Claude, Gemini and Llama are examples.

How an LLM works, briefly

Text is split into tokens, and the model, a transformer neural network with billions of parameters, predicts the most likely next token, one at a time, based on everything before it. Pre-training on public and licensed text teaches language and broad knowledge; further training with human feedback teaches it to follow instructions and to refuse harmful requests.

What LLMs are good and bad at

  • Good at: drafting and rewriting text, summarising, extracting structured data from messy input, explaining and writing code, classification.
  • Weak at: facts they were not given (they can hallucinate), exact arithmetic over large numbers, and knowing about events after their training data ends.

Using LLMs in applications

Most applications call an LLM through an API, keep instructions in a system prompt, supply facts through RAG, and let the model act through tool calling. Cost and speed depend on the number of tokens in and out, so prompt size matters. You can estimate it with the LLM Token Counter.

Frequently asked questions

What is the difference between AI and an LLM?

AI is the broad field. An LLM is one kind of AI model, specialised in language, and is the engine behind most of today’s chat assistants and AI coding tools.

Published · Updated · By · All terms

Go deeper