ByHeartAI
Beginner6 min read

What is an LLM?

An LLM is a very large pattern-predictor for language: give it text, and it predicts what comes next.

Explain like I'm new to AI

A Large Language Model (LLM) is a computer program that has read an enormous amount of text and learned the patterns of language so well that it can continue any piece of text sensibly.

Ask it a question, and it doesn't "look up" an answer like a search engine. Instead, it predicts, word by word, the most plausible continuation — and that continuation turns out to be a useful answer.

Mental model

Think of an LLM as autocomplete taken to the extreme. Your phone predicts the next word; an LLM predicts the next word so well, across so much context, that it can write essays, code, and explanations.

How it works

  1. Text is broken into tokens (small pieces of words).
  2. The model predicts the next token, one at a time.
  3. Each predicted token is fed back in, and the process repeats.
  4. During training, it saw trillions of tokens and adjusted billions of internal parameters to get better at prediction.

Real-world example

When you type "The capital of France is", an LLM confidently predicts "Paris" — not because it stored a fact table, but because that continuation is overwhelmingly likely given everything it has read.

Technical explanation

Modern LLMs are transformer networks trained with next-token prediction. Their parameters encode statistical relationships in language. At inference, sampling settings like temperature control how deterministic or creative the output is.

Common mistakes

Common mistake

Believing an LLM "knows" facts like a database. It predicts likely text, which is why it can be confidently wrong — a behavior called hallucination.

When to use it

  • Generating, summarizing, translating, or transforming text.
  • Reasoning over language, code, and instructions.

When NOT to use it

  • When you need guaranteed, verifiable facts without grounding (pair it with RAG).

Alternatives

  • Classical NLP models for narrow, well-defined tasks.

Related concepts

  • What is a Token?A token is the small chunk of text — often a word or word-piece — that an LLM actually reads, counts, and predicts.
  • What is a Context Window?The context window is the maximum number of tokens an LLM can consider at once — its working memory for a single request.
  • What are Reasoning Models?Reasoning models spend extra decode tokens thinking before they answer; a short prompt can still cost a lot.
  • What is Streaming?Streaming sends tokens as they are generated so users see the first word fast; TTFT is wait-to-first-token, TPOT is later gaps.
  • What are Small Language Models (SLMs)?Small language models (about 1–8B parameters) win on device, privacy, cost, and easy tasks; route hard turns to a larger model.

Further reading

NextWhat is a Token?

Last reviewed: 2026-08-30 · Written by ByHeart AI · Reviewed by ByHeart AI