In this course9 lessons
- What AI product rounds test, Free7 min
- How large language models work, for PMs, Free7 min
- Designing an AI feature, Free7 min
- Evals and quality, Free7 min
- Metrics for AI products, Free6 min
- Risk, safety and trust, Free6 min
- Cost and latency trade-offs, Free7 min
- Worked answers14 min
- Common traps and how to recover6 min
How large language models work, for PMs
7 min readFree lesson
You do not need to know how to train a model to do well in an AI product round. But you do need a clear picture of a large language model (LLM). Know what it is and what it is not. Know how each tech idea turns into a product choice. This lesson gives you that picture in plain words.
Here is the test for every section. Could you explain it to a curious company leader in two sentences? Then could you say what it means for the product?
What an LLM actually does
An LLM is a program. It was trained on a huge amount of text to do one thing. It looks at some text and predicts what comes next. To predict is to make a good guess. It writes its answer one small piece at a time. Each time, it picks the next piece based on everything before it.
That simple idea explains most of what you will design around. The model is very good at writing text that sounds right, because sounding right is what it was trained for. It has no built-in step that checks whether what it says is true.
Most models used in products also got extra training to follow instructions. That is why they answer your question instead of just finishing your sentence. But at the core, it is still prediction.
Tokens
Models do not read words. They read tokens: chunks of text that are often a whole short word, part of a longer word, or a piece of punctuation. As a rough rule of thumb for English, a token is a bit less than a word, and many other languages need more tokens for the same meaning.
Why a PM cares: almost everything is priced and limited in tokens. Cost usually scales with input tokens plus output tokens. Speed scales heavily with output tokens, because the model writes them one at a time. A feature that sends a 40-page contract with every request costs far more than one that sends a paragraph.
Many current models can also reason before answering, producing tokens the user may never see. You still pay for and wait for those tokens, so how much reasoning to allow is a cost and speed decision too.
Context windows
The context window is the maximum amount of text, counted in tokens, the model can take in and produce in a single request. Everything the model "knows" about this conversation must fit inside it: your instructions, the user's message, any documents you attach and the response.
Two facts surprise people:
- The model has no memory between requests. A chat product feels continuous because the app re-sends the conversation history each time. When the history gets too long, the app must drop or summarize older parts. That is a product decision.
- Bigger is not automatically better. Long inputs cost more, run slower, and the model can miss details buried in the middle of a very long input.
Why a PM cares: "Just put all the documents in the prompt" works in a demo and breaks at scale. The usual answer is retrieval, below.
Sampling and temperature
At each step the model produces a set of probabilities for what the next token could be. The app then samples one. Temperature is a setting that controls how adventurous that choice is. Low temperature favors the most likely token, so outputs are more consistent. Higher temperature spreads the choice wider, so outputs vary more and can feel more creative.
Why a PM cares: the same input can produce different outputs. That breaks the normal "click it and check it" way of testing software, which is why AI teams need evals (see Evals and quality). It is also a design lever: low temperature for extracting invoice fields, higher for brainstorming taglines. Even at the lowest setting, do not promise users identical answers every time; in practice outputs can still differ slightly.
Hallucination
A hallucination is a fluent, confident output that is false: an invented citation, a made-up policy, a wrong number stated as fact. It follows directly from how the model works. It was trained to produce plausible text, and a plausible-sounding wrong answer is still plausible.
Hallucination can be reduced, never assumed away. The main levers are giving the model the right source material, asking it to answer only from that material and cite it, letting it say "I don't know", and checking outputs before they reach users when the stakes are high.
Why a PM cares: the cost of a hallucination depends on the product. A wrong word in a draft email the user will read is cheap. A wrong dosage, refund amount or legal deadline is not. That cost drives how much human review you design in.
Key idea An LLM is a prediction engine, not a database. It does not look facts up unless you build a way for it to, and it does not know when it is wrong.
Retrieval-augmented generation
Retrieval-augmented generation (RAG) means: before asking the model to answer, search your own content for the most relevant passages, put those passages into the prompt, and instruct the model to answer from them. Search is often done with embeddings, numeric representations of text that let you find passages with similar meaning, not just matching keywords.
RAG lets a model answer questions about your help center, your policies or a user's own files, including content written after the model was trained. It also makes citations possible, which helps users check answers.
Why a PM cares: in a RAG product, most quality problems are retrieval problems. If the search step fetches the wrong passage, the model will write a fluent answer from the wrong passage. When a RAG answer is bad, ask first: did we retrieve the right thing? RAG also raises a permissions question: the search must only return content this user is allowed to see.
Prompting versus fine-tuning
There are two main ways to shape a model's behavior for your product.
| Prompting | Fine-tuning | |
|---|---|---|
| What it is | Writing instructions and examples into each request | Further training a model on many examples of the behavior you want |
| Good for | Most tasks; fast iteration; changing behavior today | A consistent format or style at scale; narrow tasks; getting a smaller, cheaper model to do one job well |
| Weak at | Very long instructions add cost to every call | Teaching facts that change; it needs good training data and takes longer to update |
| Typical order | Start here | Consider once prompting and retrieval hit a ceiling |
A common interview mistake is proposing fine-tuning as the first step, or as the way to teach the model your latest product catalog. For knowledge that changes, retrieval is usually the better tool. Fine-tuning shapes behavior; retrieval supplies facts.
Tool use and agents
Models can be given tools: descriptions of functions the app can run, such as "look up order status" or "create calendar event". The model does not run anything itself. It outputs a structured request to use a tool, the app runs it, and the result goes back to the model.
An agent is a system where the model works in a loop: decide on a step, call a tool, read the result, decide the next step, until the task is done. Agents can handle multi-step work, like "find three suppliers, compare prices and draft an email to the cheapest".
Why a PM cares: two things. First, errors compound. If each step succeeds most of the time, a ten-step task fails noticeably more often than a one-step task. Second, tools turn wrong words into wrong actions. A hallucinated sentence is embarrassing; a hallucinated refund is expensive. Agents need tighter permissions, confirmation before irreversible steps, and logs a human can audit. Risk, safety and trust covers how attackers exploit tools.
What LLMs are not
Each item is a design trap.
- Not a database. Facts can be wrong or out of date. Its knowledge stops at its training data unless you supply more.
- Not a calculator. Models can slip on exact arithmetic and counting. Give them a calculation tool or do the math in code.
- Not deterministic. Same input, possibly different output.
- Not self-aware about accuracy. A model's stated confidence ("I'm 95% sure") is often poorly matched to how often it is actually right.
- Not remembering you. Memory is something the app builds, stores and re-sends.
Try it Explain RAG to an imaginary executive in two sentences, then give one product decision it forces. Time yourself. If it takes more than thirty seconds, cut words.
How to use this in an interview
Bring technical ideas in only when they change a decision. "Because the model can invent policies, I'd answer from our help-center articles with retrieval and show the source link" is a strong sentence. A paragraph about how retrieval works, with no decision attached, is not.
If you are in a technical round, System design for PMs shows how to sketch where the model, the retrieval step and your own services sit.
Recap
- An LLM predicts the next token; it sounds right by design and checks nothing by default.
- Tokens drive cost and speed; the context window caps what the model sees, and there is no memory between requests.
- Temperature trades consistency for variety, and outputs are never fully guaranteed to repeat.
- Use retrieval for facts that change, fine-tuning for behavior at scale, and prompting first.
- Tools and agents turn wrong words into wrong actions, so they need permissions, confirmations and logs.
Practice this lesson
You’ve just read one of 39 free lessons.
The other 77, including 72 worked answers written out in full, are in the full kit: $129 once for life, or 1 year for $69.
See plans · from $69