Frontend Inbox

How LLMs Work

Beginner8 min
Draft

Tokens, context windows, and next-token prediction — enough of the mechanism to predict the failures.

#ai
#concepts

Draft. This piece is scaffolded from the roadmap. The outline below is the shape the finished article will take — headings are real, prose is not.

In one sentence

Tokens, context windows, and next-token prediction — enough of the mechanism to predict the failures.

Why it matters

Where this sits in a production system, what breaks without it, and the class of bug it exists to prevent. Written for someone who has shipped software before but is new to ai-assisted development.

How it works

The mechanism, from the outside in — the API surface first, then the behaviour underneath it, then the parts you only need when something goes wrong.

// A minimal, runnable example lands here.

In practice

The decisions you actually face: defaults worth keeping, the two or three knobs that matter, and the numbers to reach for when you have nothing to go on.

Common pitfalls

  • The mistake almost everyone makes on their first attempt.
  • The one that only shows up under production load.
  • The one that looks like a framework problem but is a browser problem.

Further reading

Primary sources — specs, MDN, and framework documentation — rather than a link farm.