Skip to main content

Command Palette

Search for a command to run...

Day 02: Why LLMs feel intelligent but still generate one step at a time

The practical reason LLM behavior needs constraints, validation, and repeatable output design.

Updated
3 min readView as Markdown
Day 02: Why LLMs feel intelligent but still generate one step at a time
V
I’m Vamsi, a builder focused on production AI systems. I write Production AI Field Notes to break down the architecture behind reliable LLM apps, RAG, agents, multi-agent workflows, evaluation, observability, safety, and governance. My goal is simple: help builders move beyond impressive AI demos and design systems that can be tested, operated, trusted, and improved in the real world.

An LLM reads like it knew the whole answer before it started typing. It did not.

It chose one likely next token, then looked at everything including that choice and picked the next one, and so on to the end. There was never a plan, only a path, assembled one step at a time.

Why that detail is not trivia

If the model had an internal plan, you could ask it to follow yours. Because it has a path, you are steering, not commanding, and that single reframe explains most of what is otherwise mysterious about LLM behaviour.

It explains why wording matters more than it should. Why an example in the prompt shifts the output more than an instruction does. Why "always respond in JSON" works most of the time and fails on the input you did not test. Each of those nudges the probability of the next step; none of them constrains it.

It also explains the failure mode nobody plans for: the same prompt does not produce the same shape twice.

Variance is a product risk, not a quirk

One clean generation tells you almost nothing. It shows the path the model happened to take once.

In production the same prompt meets a longer input, a stranger phrasing, an unusual name, and takes a different path: one that adds a preamble your parser chokes on, or omits a field, or answers in the wrong language because the input document was in that language.

That does not surface as an architecture problem. It surfaces as occasional weird outputs, flaky parsing, and bugs nobody can reproduce, which is one of the most expensive categories of failure a team can inherit.

What to do about it

  • Test with repetition, not examples. Run the same prompt ten times against a messy input. You are looking for the shape holding, not for one good answer. Single-run testing is how variance reaches production undetected.
  • Constrain the shape where it must be strict. If software consumes the output, the format needs enforcement (schema validation, structured output modes) not a polite request in the prompt. More on that on day 8.
  • Decide where variance is fine. Creative copy can vary. A field that feeds a database cannot. Making that distinction explicit tells you where to spend the constraint budget.

Next-token prediction is not a piece of trivia about how models work. It is the practical reason your system needs constraints, validation, and repeatability tests, and why "it worked when I tried it" is not evidence of anything.

Day 2 of 60 Days of Production AI Systems.

Where in your workflow does output variance stop being harmless and start being a product risk?


Previous: Day 01: Why model choice is rarely the first production AI problem
Next: Day 03: Why tokenization quietly affects cost, limits, and reliability

Day 2 of 60 · AI Systems Basics (chapter 1 of 10)

AI Systems Basics

Part 2 of 6

A beginner-friendly foundation for understanding production AI systems. This series explains why AI is more than a model, how next-token generation works, why tokens and context windows matter, and how prompts and creativity settings become product decisions.

Up next

Day 03: Why tokenization quietly affects cost, limits, and reliability

How a low-level text detail quietly becomes a product constraint for cost, latency, and reliability.