Traction Growth

How does AI work? - Large Language Models Explained Simply

A plain-language visual guide to how ChatGPT-style AI works — how models are built, how they pick the next word, how agents use tools, and what happens when you hit send.

View as Markdown

You’ve used ChatGPT. This guide explains what’s going on under the hood — without assuming you live in tech.

Prefer cards?

Try the step-by-step version

(experimental).

LLM means large language model.

It’s a system trained on a huge amount of text so it can write text back — one small piece at a time.

Apps like ChatGPT wrap that model with instructions, your chat history, tools, and safety checks.


1. How LLMs were built

Before you ever open a chat, a company builds a model version.

A helpful picture: school for a writing machine.

What actually happens is simpler and less magical. Engineers feed the system lots of text. They keep tweaking its settings until it gets better at guessing what comes next.

It is not learning the way a person does. It is not “understanding life.”

Raw sources

Web, books, code, examples…

clean

Pretrain

Practice: guess the next piece

Post-train

Instructions, prefs, safety

ship

Model version

Used inside chat apps

How a model is built (before you chat): clean text → practice guessing the next piece → polish into an assistant → ship a version. Everyday chat is a separate use phase.

What “data” means

Training data is the material used to shape the model.

Public web pages. Books. Code. Docs. Licensed collections. Examples written by people. Some text made by other models.

Companies clean and filter that pile. They remove duplicates where they can. The exact mix is often a secret. Rights to some sources are still argued over.

So the model’s “reading list” is huge — and messier than a curated bookshelf.

What “learning” means

When people say the model learned, they mean something narrow.

Hide the ending

Break text into tokens — a word, part of a word, or punctuation.

Guess the next piece

Rank how likely each option is. Early on, the guesses are often wrong.

Nudge when wrong

Adjust billions of tiny settings (often called parameters) a little. Patterns live across many of them together. There is no single “Paris knob.”

Repeat until fluent

That long practice stage is pretraining. The result is often called a base model.

Before lots of practice

"The capital of France is"

→ ??? (wild guesses)

After lots of practice

"The capital of France is"

→ Paris (usually)

Pretraining is not the last step

A base model is good at continuing text. It is not yet a polite chat assistant.

Post-training comes next. Companies show it instruction examples. They collect preference feedback. They add safety behavior. They teach tool use.

That’s why a chat model answers your question instead of just continuing it like a story.

Learning ≠ a live encyclopedia

Training stores patterns from data. It is not a perfect knowledge base with a live news feed.

Built once, used many times

Build phase

Expensive, mostly offline

  1. Gather and clean sources
  2. Pretrain, then post-train
  3. Test, then ship a model version

Use phase

What you do every day

You type in a chat → the product and model write a reply

You’re almost always in the use phase — typing into a product.

Providers still ship new versions. “Built offline” does not mean “never changes again.”

Check your understanding

After pretraining, a base model is best described as…

After pretraining, a base model is best described as…

2. How they write the next word (LLM explained visually)

The core idea is simpler than the hype. It is also richer than phone autocomplete.

The engine in one sentence

An LLM ranks possible next tokens. The product picks one. It adds that piece to the reply. Then it does it again — until the answer looks finished, or it hits a limit.

“Next token” is the precise term (a word or word-piece). “Next word” is the friendly shorthand.

Input tokens

Your prompt + available context

Attention

Weigh which earlier bits matter

Score options

How likely is each next piece?

Pick & add

Then repeat — or stop

How a reply is written: the model looks at the available context, weighs what matters, ranks possible next pieces, picks one, then repeats until it stops.

What happens for one next piece

  1. Your input becomes tokens, then numbers.
  2. Layers of the model run. Attention weighs which earlier bits matter — not only the previous word.
  3. The model scores possible next tokens.
  4. One gets picked, appended, and the loop continues.

Useful patterns are spread across many settings working together.

Context so far:

"After the meeting, please send me the"

Likely next:

  • agenda
  • notes
  • deck
  • sandwich(unlikely in a work email)
Simply put: the model ranks possible next pieces (words or parts of words), then picking one continues the sentence.

Some products add a little randomness. Others stay more predictable. It depends on product settings.

More than phone autocomplete

Like autocomplete, an LLM scores what comes next.

Unlike a simple keyboard suggestion, a modern model can use thousands of earlier tokens. It has many learned layers.

That’s why the same mechanism can summarize, translate, write code, and work through some multi-step problems.

Fluent, “reasoning-like” text is still not proof of human-like understanding or awareness.

Three things to keep separate

Mechanism: it generates by picking tokens.
Capabilities: that can support summarizing, planning, coding, and some reasoning.
Consciousness: smooth writing is not evidence of a mind like yours.

Check your understanding

When an LLM writes an answer, what is it mainly doing?

When an LLM writes an answer, what is it mainly doing?

3. How this became powerful as agents and loops

One short reply is already useful.

Products got more powerful by wrapping the model in an outer loop — and giving it tools.

Keep two loops straight:

LoopWhat it is
Generation loopInside one reply: keep picking tokens until that message ends
Agent / tool loopOutside: call the model, maybe run a tool, feed the result back, decide whether to continue

Your goal

A multi-step ask

Model chooses

Reply text or ask for a tool

Product checks

Is this allowed? Should we stop?

Tool runs (optional)

Search, files, code… result comes back

Stop or continue

Finish, hit a limit, error, or ask you

Agent-style loop (the app around the model): the model still writes text piece by piece, but the product may run a tool, add the result, call the model again, and stop on a finish action, limit, error, or human decision.

From one reply to an outer work loop

One reply

Just the writing loop

You ask → the model writes pieces until that message ends → done

Agent-style work

Outer loop + tools

  1. Model chooses text or a tool
  2. Product checks permissions
  3. A tool may run; the result comes back
  4. Model is called again until a stop rule

Think of one email draft versus an assistant who can draft, look something up, and revise — with the product deciding what is allowed.

What “tools” means

A tool is something the product can run besides inventing words.

Web search. A calculator or code runner. Reading a file. Taking an action in another app, when connected.

Model versus product

The model writes tokens — including text that asks for a tool. The product handles history, permissions, running the tool, and policies. Then it feeds results back.

What people mean by “agent”

Not a robot in your house.

It’s surrounding software that can ask the model what to do next, run an approved tool, add the result to context, and call again — until a stopping rule says stop.

“Plan a 3-day Tokyo trip under $X and make a day-by-day list.”

  1. 1Decide next step: flights, hotels, neighborhoods
  2. 2Tool: search options (if permitted)
  3. 3Write a short plan
  4. 4Tool: check a shaky detail
  5. 5Revise the itinerary
  6. 6Stop on finish / limit / human

The model still writes each message token by token. The outer loop is what feels “agent-like.”

It stops when software says so. That is not the same as “the real-world goal is perfectly done.”

Power comes with new failure modes

A loop can confidently take the wrong step several times. Tools help with fresh information. They do not guarantee correctness.

Check your understanding

What makes a chat product feel like an “agent”?

What makes a chat product feel like an “agent”?

4. How a normal person’s request gets handled

Open a ChatGPT-like app and ask something ordinary:

“Explain what a waiting list is for a consumer app, in simple words, with one example.”

You

Type and hit send

Product

Pack the context

Split into tokens

Text → small pieces

Model

Write (maybe use tools)

You again

Read the reply as it arrives

What happens when you hit send: you send → the product packs a limited context → text becomes tokens → the model writes (maybe with tools) → you read the reply as it streams in. Exact steps vary by product.

What “context” means

Context is what the product includes in this model request.

Quiet instructions. Some chat history. Your newest message. Sometimes attachments or tool results.

Models have a limited context window. Long chats may be trimmed, summarized, or selectively pulled in.

Context is not permanent memory. And it does not automatically become new training data.

Instructions vs. your message

Products often attach quiet ground rules next to what you type. You usually only see your side.

Step-by-step

You hit send

Your message goes to the product’s servers.

The product assembles context

Instructions, available history, your ask, and attachments that fit the window.

The input becomes tokens

Text is split into the small pieces the model can process.

The model generates

Score → pick → repeat. Many apps stream the reply in chunks as it appears.

Tools may interrupt

If the model asks for an allowed tool, the product runs it and calls the model again.

The reply reaches you

Tokens become text. A follow-up starts another round.

A practical habit for better answers

Say the goal, the audience, and any constraints in the same message. If facts matter, ask for sources — and check them yourself.

Weak: “Help with waiting lists.”

Stronger: “Explain consumer-app waiting lists to a non-technical founder in under 150 words. One example. If you use a statistic, cite a source; otherwise leave statistics out.”

What can still go wrong

Sounds clear
You feel done

…but a detail might still be outdated, generic, or invented — especially for numbers, quotes, or “what happened today” without a reliable source.

Treat the first answer like a fast assistant’s draft. Great starting point. Verify anything that must be true.

Check your understanding

What does “context” mean for one ChatGPT-style reply?

What does “context” mean for one ChatGPT-style reply?

Quick recap

The whole journey, briefly:

01

Build

data + polish

02

Write

pick the next piece

03

Loop

tools + follow-ups

04

Your chat

everyday reply

Two takeaways:

  1. Clearer asks get clearer drafts — goal, audience, constraints.
  2. Capability ≠ guaranteed truth — important claims still need evidence.

The takeaway

An LLM is trained to predict language, one small piece at a time. Chat products add polish, instructions, history, tools, and outer loops. Remarkably capable — still not a guarantee of truth, completion, or human-like understanding.


  • What is Jev? — a typed decision model built for routing, scoring, and software gates instead of prose
  • What is gstack? — process toolkit that turns AI coding agents into a virtual eng team
  • What is GBrain? — durable memory you control for the agent you already use
  • Home — product and growth learning from real systems
  • Open source product growth case studies — architecture, workflows, and growth explainers from real OSS products