Skip to Content

What Gen AI Really Is: LLMs, Tokens & the Mental Model

Module 01 · Lesson 1

What Gen AI Really Is: LLMs, Tokens & the Mental Model

Watch first — a 2-minute orientation before you read the lesson.

Almost everyone's first encounter with Gen AI is the same: they type a question, get an impressive answer, and quietly conclude the model "knows things" — like a search engine with a personality. That single wrong assumption is the root of most beginner frustration: hallucinations feel like betrayals, vague answers feel like laziness, and prompting feels like guesswork. The truth is more useful: an LLM is not a fact database and not a search engine. It's a prediction engine that generates the most plausible next chunk of text, one piece at a time. Once that clicks, everything downstream — prompting, APIs, agents — stops being magic and starts being engineering.

Learning Objectives
By the end of this lesson, you'll be able to:
  • Explain what a Large Language Model is — and what it isn't — in plain language.
  • Describe next-token prediction and why it explains both the strengths and failures of LLMs.
  • Define a token and roughly estimate how much text a token count represents.
  • Explain why LLMs "hallucinate" without treating it as a bug or a mystery.
  • Identify the four categories of work LLMs are genuinely good at.

An LLM is a next-token predictor, not a search engine

A Large Language Model is a program trained on an enormous amount of text to do one deceptively simple thing: given some text, predict what comes next. It doesn't retrieve an answer from a stored table — it generates one token at a time, each time asking "given everything so far, what's the most probable next piece?" String enough of those predictions together and you get sentences, essays, and code that read as if a knowledgeable person wrote them.

NEXT-TOKEN PREDICTION · ONE STEP AT A TIME INPUT The capital of France is… PREDICT NEXT TOKEN Paris 71% the 12% located 6% known 3% SELECTED TOKEN Paris repeat until done OUTPUT SO FAR The · capital · of · France · is · Paris plausible ≠ true → this is why models hallucinate

An LLM doesn't retrieve an answer — it predicts the most plausible next token, appends it, and repeats. The model picks "Paris" because it's statistically likely given everything so far, not because it "looked it up." That single mechanism explains both why LLMs write so fluently and why they can state falsehoods with total confidence.

What a token actually is

Models don't read words or letters — they read tokens, which are common chunks of text. A token is roughly ¾ of a word in English. Some quick anchors: ~1 token ≈ 4 characters ≈ 0.75 words; 100 tokens ≈ 75 words (a short paragraph); 1,000 tokens ≈ ~750 words (about 1.5 pages). Tokens matter because everything is measured and billed in tokens — your input, the model's output, and the model's memory limit. Understanding tokens now saves you money and confusion later.

Why this explains hallucinations

Because the model's job is to produce plausible text, not true text, it will happily generate a confident, well-formatted answer that is completely wrong — a fake citation, an invented function, a made-up statistic — because that text is statistically plausible even when it's factually false. Hallucination isn't a glitch; it's the predictable byproduct of a system optimized for plausibility. That's why verification is your job, not the model's.

The four jobs LLMs are genuinely good at

  1. Generating — drafting, writing, brainstorming, coding.
  2. Transforming — summarizing, translating, reformatting, changing tone.
  3. Reasoning over provided context — analyzing a document you give it, comparing options.
  4. Structuring — turning messy input into clean, organized output.

Notice what's absent: being a reliable source of live facts. That's a tooling problem we solve later (APIs, retrieval, agents) — not something the raw model does.

How to think about any LLM task from now on

  1. Assume it predicts, not knows Ask: does this task need facts I must supply, or just language skill?
  2. Bring the ground truth If the answer depends on real data, put that data in the prompt. Don't expect recall.
  3. Estimate the token load Roughly how big is the input + expected output? This shapes cost and whether it fits.
  4. Name the job type Generation, transformation, reasoning, or structuring — naming it sharpens the prompt.
  5. Plan your verification step Decide now how you'll check the output before you trust it.

One habit-forming template

The full prompt framework arrives in Lesson 4. For now, this template trains the right instinct: give the model the truth, then ask it to work with it.

The "Explain With My Context" Prompt
You are explaining to a beginner. Do NOT rely on outside facts. Base your answer ONLY on the context I provide below. If something isn't in the context, say "not in the provided context." Context: {paste the source material} Task: {what you want done with that context}

5-minute walkthrough you can recreate

0:00
Ask a question it can't know. Open any chat LLM and ask "What did our company earn in Q3?" Watch it refuse or invent. It has no access to that fact.
1:00
Now paste the fact. Add a short fake "Q3 report" (3–4 lines of numbers) and ask again. Watch it answer correctly from your context. This is the whole lesson in one move.
3:00
See tokens. Ask it to "count the tokens" in a sentence, then compare with a tokenizer tool. Notice words ≠ tokens.
4:00
Prove it predicts. Ask the same question twice in two fresh chats and note the slightly different wording. Prediction, not lookup.

Try This Now: Context vs. No Context

Pick one real question from your work and ask an LLM twice — this is the single most important habit in the course.

  1. Ask with no context ("What's the best pricing for my product?").
  2. Ask again with context pasted in (your actual product, market, costs).
  3. Compare the two answers.
  4. Write one sentence on what changed and why.

Before vs. After: same model, added truth

Before
Write me a launch email.

Result: a generic, could-be-anyone email. The model filled the gaps with averages.

After
Write a launch email for our Feb 12 release of a budgeting app for freelancers. Tone: friendly, direct. Key point: it auto-categorizes expenses. Audience: existing free users.

Result: a specific, usable draft. Same model — you supplied the ground truth it can't know.

Four ways the "bring your own context" habit pays off

Card · Support
Turn an angry message into three on-brand replies
Paste the customer's message + your refund policy; get three reply drafts grounded in the actual policy, not guesses.
TransformingSupport
Card · Engineering
Diagnose an error from the real stack trace
Paste the stack trace + the relevant function; get a ranked list of likely causes to check (then verify).
ReasoningDebugging
Card · Content
Turn a messy transcript into a clean outline
Paste a rough voice-memo transcript; get a structured blog outline that reflects what you actually said.
StructuringContent
Card · Research
Plain-English a dense contract clause
Paste the clause; get a summary with flagged risks — a starting point you then verify, never a final legal answer.
ReasoningLegal
— Common Mistakes (and the fix)

Avoid these on day one

  • Treating the LLM as a search engine. Fix: it predicts; it doesn't retrieve. Bring your own facts.
  • Trusting confident output. Fluency ≠ accuracy. Fix: always verify facts, code, and numbers.
  • Ignoring tokens. Fix: don't paste a whole book and wonder why it's slow, expensive, or truncated.
  • Blaming the model for vagueness. Vague in → vague out. Fix: the answer is almost always more context.
— Advanced Tip

Make the model show its guessing

Ask the model to separate what it knows from what it's inventing: "Answer, then add a line labeling each claim as [from my context], [general knowledge], or [uncertain]." This makes hallucinations visible instead of hidden — a habit that pays off enormously once you're building apps.

Reflection

Think of one task last week where you assumed AI "wasn't smart enough."

— The Recap

An LLM is a next-token prediction engine trained on text — not a database, not a search engine. It reads and bills in tokens (~¾ of a word). Its fluency comes from predicting plausible text, which is also why it hallucinates. It shines at generating, transforming, reasoning over context you provide, and structuring — and it's weak at recalling facts on its own. The master habit: bring the ground truth, then verify the output.

Homework · Before Lesson 2

Explain an LLM in your own words

Write a 150-word plain-English explanation of "what an LLM is" for a non-technical friend, using your own analogy. Then run a small experiment:

  • Paste a real document into an LLM.
  • Ask a question answerable only from that document.
  • Note how grounding the model in context changes the answer.
Deliverable: Your 150-word explanation + one screenshot of the context experiment, saved for reference.

Knowledge Check — click an answer

What is an LLM fundamentally doing when it responds?

✓ Correct

✗ Not quite — see the highlighted option.

Why B: LLMs generate text by repeated next-token prediction. They don't retrieve stored answers or browse live data unless given tools.

Roughly how many words is 1,000 tokens in English?

✓ Correct

✗ Not quite — see the highlighted option.

Why B: ~1 token ≈ 0.75 words, so 1,000 tokens ≈ 750 words.

Why do LLMs hallucinate?

✓ Correct

✗ Not quite — see the highlighted option.

Why B: Plausibility is the objective. A confident wrong answer can be highly plausible, so hallucination is expected, not exceptional.

Your LLM gives a generic answer. Best first fix?

✓ Correct

✗ Not quite — see the highlighted option.

Why C: Generic input produces generic output. Supplying context is the highest-leverage fix.

Which is not one of the four jobs LLMs are genuinely good at?

✓ Correct

✗ Not quite — see the highlighted option.

Why C: Live, factual recall is exactly where raw LLMs are weakest; it requires tools/retrieval.

Rating
0 0

There are no comments for now.

to be the first to leave a comment.