Braj Kishore
JourneyVaultML FoundationsAI PM GuideAgenticNewsWork With MeMentorshipPulseNow
Say hi

Hiring · Building · Investing

Have a system — or a team —that needs to scale?

info@avyxon.ai

Usually replies within a day · track record here

JourneyVaultML FoundationsAI PM GuideAgenticNewsWork With MeMentorshipPulseNow
LinkedInXYouTubeSubstackInstagramThreadsFacebookDiscordGitHubTopmate
© 2026 Braj Kishore · Bengaluru, INThink Big · Start Small · Scale Fast
The Guide
02Phase 1 · Foundations

LLMs, Tokens & Temperature

Why a model can sound smooth and still be flat wrong. Plus the dials you actually get to turn.

7-min read~4–5 hrs with the practice + a short course
The analogy

An LLM is an extraordinarily well-read autocomplete: it predicts the next token, one at a time. Tokens are its 'words' (~¾ of a word each). The context window is its working-memory desk — put a new page on a full desk and an old one falls off. Temperature is a creativity dial: low is a careful accountant, high is a brainstorming poet.

Unlearn this

That the model 'looks things up' or 'knows facts' like a database, and that a token equals a word. It generates statistically plausible text (not verified truth), and a token is smaller than a word — non-English text uses more tokens, so it costs more.

The lesson, in five answers

01

What is it?

A Large Language Model (LLM) is trained on huge amounts of text. It works by guessing the next most-likely token, over and over. Tokens are the little chunks it reads and writes. They're also the thing you get billed on. The context window is the most tokens it can hold at once. That covers your input plus its answer. Temperature is a dial for how random the output is.

02

Why it matters to a PM

'Guessing the next token' explains both the magic and the danger. The model aims for text that sounds right, not text that is right. That's why you build in every fact-checking safeguard. Tokens drive your cost and your speed. The context window limits how much document or history you can feed in. Temperature is a product setting. Keep it near zero for support and data-extraction. Turn it up for brainstorming.

consistencyvariety0.0 · factual1.0 · creativetemperature →
One dial, two directions: raise the temperature and answers get more varied but less repeatable. Near 0 for support and data-extraction; higher for brainstorming and copy.
03

When would I reach for it?

Use a plain LLM for open-ended language tasks. It fits when a good-enough draft is useful and a human stays in the loop. For anything factual, back it with real sources (see RAG). Don't trust the raw output on its own.

04

Trade-offs & failure modes

A big context window (roughly a million tokens on the top models, and growing) isn't free memory. The wrong stuff, or too much of it, distracts the model. People call this 'context rot'. Every token also adds cost and slows the answer down. So feed it the relevant slice, not everything. Output tokens usually cost more than input tokens. Higher temperature means more variety but less consistency. In 2026 the biggest lever is reasoning models. They spend extra 'thinking' tokens before they answer. That makes them much stronger at maths and planning. But they're slower and pricier. So for each task, you decide if that extra thinking is worth it.

sweet spotcontext rot →context you stuff in →answer quality
More context helps — until it doesn't. Past the sweet spot, extra tokens dilute the model's focus (“context rot”) while cost and latency keep climbing. Feed it the relevant slice, not the whole pile.
Context windowsAnthropic
05

Say this in an interview

"For a support reply I'd use a fast, non-reasoning model at low temperature. I'd stream the answer so it feels instant, and cap how many output tokens it can use. I'd only reach for a reasoning model when the task really needs multi-step logic. And even with a million-token window, I'd pull in just the relevant policy sections. I wouldn't dump the whole manual in. The wrong stuff, or too much of it, hurts accuracy. And every token is money."

Learn it from the best — as you go

The canonical explainers for this topic. Open them alongside the lesson, not after it.

Watch
  • Intro to Large Language ModelsAndrej Karpathy · 1-hour mental model of what an LLM is and how it's built, from the person who'd know.
  • Transformers, the tech behind LLMs3Blue1Brown · Beautifully animated walkthrough of next-token prediction and attention.
Read
  • The Illustrated TransformerJay Alammar · The classic visual deep-read on how transformers work.
Paper
  • Attention Is All You NeedVaswani et al., 2017 · The original transformer paper — skim the abstract and figures for where it started.
Docs
  • Context windowsAnthropic · How the context window works, what counts toward it, and why more isn't always better.
Tool
  • Tiktokenizerdqbd · Type text and watch it split into tokens live — makes 'tokens' click instantly.

External links open in a new tab. Content and prices change — verify before relying on any of them.

Key terms

Token

A small chunk of text, about 4 characters in English. It's the unit for cost, for speed, and for the context window. Output tokens usually cost more than input tokens.

Context window

The most tokens the model can hold at once, counting your input plus its output. More isn't free. The wrong stuff, or too much of it, distracts the model. That's 'context rot'.

Temperature

Randomness dial. Low = focused/repeatable; high = varied/creative.

Next-token prediction

How an LLM writes. It picks one likely token at a time. It isn't looking facts up.

Reasoning model

A model that works through 'thinking' tokens before it answers. That makes it stronger on logic and planning, but slower and pricier. You pick it task by task.

Streaming / TTFT

Time-to-first-token. Showing the answer as it's written makes a feature feel much faster than a spinner.

The stack — tools you'll hear about

You don't need to use or master these. Recognising the names — and which box each sits in — is the tech-stack awareness a PM needs. No deep dive.

  • OpenAI (GPT)Model providersFrontier closed models via API.
  • Anthropic (Claude)Model providersFrontier models; strong on reasoning & safety.
  • Google (Gemini)Model providersFrontier models, very long context.
  • Llama · Mistral · DeepSeek · QwenOpen modelsOpen-weight models you can self-host.
  • tiktokenPrompt toolingTokenizer — see how text becomes tokens.
  • Hugging FacePlatformsWhere open models are published & compared.

Try it

Watch it predict the next token

An LLM builds a sentence one plausible token at a time. Pick a path — and change the temperature.

Next-Token Prediction (02)

A model writes by guessing the next token.

An LLM doesn't look up an answer — it repeatedly predicts the most probable next token from a distribution, then feeds the result back in. That makes it fluent, and plausibly — not reliably — correct.

Generated so far

The best way to onboard a new product manager is to

Medium temperature keeps the ranking but leaves room for the model to vary its wording.

Predicted next token — pick one

Same text can score differently at each temperature — the bars are the model's confidence, not a fact-check.

Why it matters to a PM

Because the model predicts plausible next tokens rather than retrieving facts, it can be fluent and confidently wrong — so anything factual must be grounded (RAG). Keep temperature low for support and extraction where you want the safe, top answer; raise it for brainstorming where variety is the point.

Try it

Tokenizer playground

Tokens are the unit of cost and context. See how text — and language — change the count.

Tokenizer Playground (01)

Words are for humans. Tokens are for models.

Models read text in tokens — chunks roughly four characters long — not words. Cost, latency, and the context window are all measured per token. Type below to watch the split happen.

Characters
57
≈ Tokens
15
≈ Cost / 1,000 runs
$0.04
Approximate tokens
Shipthesmallestthingthatprovestheriskyassumption.

This is an approximation. Real tokenizers use BPE and learn their splits from data — a token can be a whole word, a word-piece, or a single character. Cost assumes an illustrative $3 / 1M input tokens.

Why this matters to a PM

Tokens are the unit of cost and latency, and they set a hard ceiling on how much can fit in the context window — so trimming prompts and choosing concise language is a real product lever, not just polish.

Try it

Budget the context window

The window is finite and shared by input and output. Add blocks and watch it fill — and overflow.

Context engineering

The context window is a budget

Everything the model sees — instructions, examples, history, retrieved docs, the question — plus the room it needs to reply all share one finite pool. Decide what earns a seat. Fill it and you pay more, wait longer, and risk the model losing the plot.

What goes in the window
Few-shot examples× ~150 tok
2
1,500 tok
Retrieved docs (RAG)× ~350 tok
3
User queryfixed · ~80 tok
800 tok

Output is drawn from the SAME window — reserve too little and the answer gets cut off; reserve too much and there is less room for context.

Window · 8,000 tokens

3,930 / 8,000 used

49% full · 4,070 tok free≈ $0.0214 / call
  • System prompt200
  • Few-shot examples300
  • Chat history1,500
  • Retrieved docs (RAG)1,050
  • User query80
  • Reserved for output800

Even well under the limit, more context is not free: every token adds cost and latency, and padding the window with marginally relevant text can dilute the model’s focus (“context rot”). Curate the relevant slice — don’t dump.

Illustrative: an 8,000-token window at $3/1M input and $15/1M output. Real windows are far larger and prices vary — the budgeting logic is what carries over.

Why it matters to a PM: context engineering is budgeting this window. Retrieve the relevant slice instead of the whole corpus, cap the output, summarise old turns, and don’t stuff everything in “just in case.” What you leave out is a product decision as real as what you put in.

Try it

Why streaming feels faster

Same total time, very different feel — time-to-first-token is what users actually notice.

Streaming & Perceived Speed (03)

Streaming feels faster — even at the same total time.

Users don't feel total latency; they feel time-to-first-token (TTFT). Show tokens as they generate and the wait evaporates, even when the full response takes exactly as long.

Prompt

How should I brief the team on our Q3 roadmap shift?

Response

Press Ask to compare how each mode feels.

First token
—
TTFT — what users feel
Total time
—
Same budget either way
Clock
0.00s
Ready

Both modes take about the same total time (~2.6s). Streaming just starts sooner: the first token lands in ~0.3s instead of ~2.6s, so it feels dramatically faster.

Why it matters to a PM

Budget latency by TTFT, not total time, and stream long outputs so users see progress immediately. Perceived speed — not raw throughput — is what drives adoption and retention.

Try it

Fast model vs reasoning model

Watch a reasoning model 'think' to the right answer a fast model fumbles — at a cost in time and tokens.

Reasoning vs Fast Models

Is the thinking budget worth it?

Pick a task

Route to

Task: A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?

Press Run to send this task to the fast model.

Latency

~0.4s

near-instant

Tokens

180

answer only

Relative cost

1×

illustrative, not billed

Why it matters to a PM: reasoning models raise accuracy on hard, multi-step tasks — but they cost several times more and add seconds of latency. Choose per use-case: route the easy majority to a fast model and reserve the thinking budget for the tasks that actually need it.

Test yourself

Recall beats re-reading. Answer before you flip.

LLMs, Tokens & Temperature · self-test
2 cards
Card 1 / 2 · box 1
Do this

Open the OpenAI tokenizer, paste an English sentence and the same sentence in Hindi, and compare token counts. Then estimate the monthly cost of a feature that sends 500 tokens per request, 10,000 times a day, at $3 / 1M tokens.

This is where the hours go — reading is the warm-up, doing is the learning.

Go deeper
  • Generative AI for Everyone (course)DeepLearning.AI
  • Tokenizer — see tokens liveOpenAI

External resources open in a new tab. Course prices and links change — verify before paying.

Marked this one off? Your progress saves on this device.

PreviousAI, ML & Deep LearningNextPrompting & Context Engineering