How Large Language Models Work: an editable mindmap

Explore How Large Language Models Work as an editable mindmap. Follow color-coded branches for Training, Tokenize, Attention, Generate, Output, with supporting ideas and curved connections.

A mindmap of How Large Language Models Work, with the main ideas arranged around a central topic and connections that show how they relate.

How Large Language Models Work: an editable mindmap

The interactive MindMap canvas for this explanation — every lane, row and arrow above is a real QueryChart diagram you can open and edit.

How to read this mindmap

  • Begin at “How Large Language Models Work” in the centre, then explore any branch that answers your question. The branch colors keep each group of ideas together.
  • Curved lines show relationships; arrowheads appear only where one idea leads to another. Select any idea in the editor to change its text, position, or connections.

Training

This branch brings together “Pre-training is a single prediction task at massive scale: given a sentence with a word hidden, predict it. From that one task the model learns grammar, facts and reasoning patterns.”, “The model learns statistical patterns between words”, “Fine-tuning continues training on a smaller, curated dataset — customer support, code, a company's docs — to change the model's behaviour toward the desired style.”.

Tokenize

This branch brings together “The prompt is split into tokens”, “Tokens become numerical embeddings”.

Attention

This branch brings together “Attention is what lets “bank” be read as a river bank or a money bank depending on the surrounding words — the whole sentence influences every token's meaning.”.

Generate

This branch brings together “The model predicts the most likely next token”, “The model writes one token at a time, feeding each output back in as new input. A stop condition (end-of-text token, length limit) ends the loop.”.

Output

This branch brings together “Tokens are decoded back into readable text”, “The response is returned to the user”.

Connections across the map

An LLM is a next-token predictor, not an answer-retrieval system: every response is a chain of single-token predictions.

Pre-training supplies the capability; fine-tuning and prompting steer it toward a task.

Tokens, not characters or whole words, are the units the model thinks in.

Attention lets context reshape meaning, which is what makes the same words mean different things in different sentences.

Generation is recursive: each output token becomes new input, which is why responses can be long, coherent and wrong with equal confidence.

Key relationships and takeaways

  • An LLM is a next-token predictor, not an answer-retrieval system: every response is a chain of single-token predictions.
  • Pre-training supplies the capability; fine-tuning and prompting steer it toward a task.
  • Tokens, not characters or whole words, are the units the model thinks in.
  • Attention lets context reshape meaning, which is what makes the same words mean different things in different sentences.
  • Generation is recursive: each output token becomes new input, which is why responses can be long, coherent and wrong with equal confidence.

When to use this visual

  • Explaining to a non-technical audience what an LLM actually does and why it can be confidently wrong.
  • Teaching a product team the difference between training, fine-tuning and prompting so they can reason about model behaviour.
  • Grounding a discussion of token limits, cost and latency in the token-by-token mechanics.

How it works

  1. Start at the central topic

    Rename “How Large Language Models Work” if you want to adapt this map to a specific project or lesson.

  2. Develop the branches

    Edit the supporting ideas, then add examples and notes where a branch needs more detail.

  3. Connect related ideas

    Draw curved connections across branches; use an arrow only when the relationship has a direction.

Frequently asked questions

What is a large language model?

A large language model (LLM) is a neural network trained to predict the next word in a sequence, at enormous scale. From that single objective it learns grammar, facts, reasoning and style well enough to generate fluent text. The name describes the mechanism: it is large (billions of parameters), trained on language, and fundamentally a next-token predictor.

Why does an LLM generate text one token at a time?

Because its only operation is predicting the most likely next token given everything so far. After each prediction, that token is added to the input and the process repeats: the "Keep generating?" loop in the visual. That recursive design is what lets the model produce arbitrarily long text, and also why output can drift or repeat: each step only sees the tokens it has already generated.

What is the difference between pre-training and fine-tuning?

Pre-training is the massive initial phase: the model learns general language patterns from terabytes of text, which gives it its raw ability. Fine-tuning is a smaller, later phase on curated data for a specific task or style, which changes how the pre-trained model behaves. Most users of LLMs never fine-tune: they prompt, which steers the same model at inference time.

Why do LLMs sometimes give wrong answers confidently?

Because the model optimises for likely text, not for truth. It has no internal database or correctness checker; it produces the continuation that fits its training patterns. When the pattern is a plausible-sounding claim, it states it confidently. That is why the visual describes the model as a predictor rather than a retriever: the honesty caveat is a property of the mechanism, not a bug that will be patched by scaling alone.

Edit this mindmap in QueryChart

Open this mindmap as your own editable free canvas. Move ideas, add branches, and draw new connections.

Edit this mindmap in QueryChart

More in Mindmaps