Skip to the workspace
Pebellslearn by building
Introduction to AI Engineering  ›  Lesson

Large Language Models

Large Language Model (LLM) 12 minA large language model generates text by repeatedly predicting a likely next token, so its output is plausible rather than guaranteed true.

ai engineer / Large Language Models

Explore each scene at your own pace.

01 · The rule

The rule

Large Language Models

The first prototype of the Pedal Point assistant was impressive for ten minutes. Then a customer asked about helmet returns and it answered "60 days" with total confidence. The real policy is 30. Nothing was broken: the model was doing exactly what it is built to do. Knowing what that is will save you from trusting it in the wrong places.

The rule

An LLM predicts the next token, again and again.

A large language model (LLM) is a model trained on an enormous amount of text. Training teaches it one skill: given some text, estimate how likely each possible next piece is. Those pieces are tokens, usually a word or part of a word.

Generation is a loop:

  1. Read all the text so far.
  2. Score every possible next token by probability.
  3. Pick one, attach it, and go back to step 1.

Given "Your order has been", the model might rate "shipped" as very likely and "eaten" as nearly impossible. It picks, appends, and repeats until it produces a stop signal or hits a length limit.

This one loop explains most LLM behaviour:

  • Fluency. Having seen so much text, it writes smooth, well-structured language.
  • Hallucination. It produces what is plausible, not what is checked. When the true fact is missing, a likely-sounding one fills the gap.
  • Frozen knowledge. What it learned stops at the end of training. It knows nothing about orders placed today.
  • No memory between calls. Each request starts fresh. A chat "remembers" only because the app sends the earlier messages again.
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.