Home/ Part I — Foundations: The Minimum You Need to Not Get Lost/1. Mental Models for Working With LLMs

1. Mental Models for Working With LLMs

Overview and links for this section of the guide.

Why mental models matter

If you treat an LLM like a search engine or a senior engineer on autopilot, you’ll get the worst results: confident-sounding output that drifts, breaks, or hides mistakes. A simple mental model makes your prompting clearer and your verification sharper.

The key idea

The model is optimized to produce plausible text. Your workflow is what turns plausible output into correct behavior.

How to use this section

Read these pages with an engineering goal: improve the quality of your next iteration loop.

  • Skim first: get the vocabulary (tokens, context window, temperature, tools).
  • Then apply: use each concept immediately in a small prompt → code → run cycle.
  • Collect patterns: keep a short list of “prompts that work” and “failure modes I hit.”
The fastest learning method

Run tiny experiments. One knob change (temperature, context size, schema constraints) + one verification run = one real lesson.

Skills you’re building

  • Calibration: knowing what the model can do reliably vs what must be verified.
  • Instruction control: writing constraints that stick and avoiding contradictory context.
  • Context discipline: including only what helps, summarizing state, and staying under budget.
  • Determinism control: understanding variability and when you want repeatability.
  • Verification habits: treating hallucination as normal and building checks into your loop.

Section map (1.1 → 1.5)

A quick practice loop

Use this loop while reading the section. It keeps learning grounded and avoids “prompt theory.”

  1. Pick one concept (e.g. temperature, context budgeting).
  2. Create a tiny task (e.g. “generate a function + tests,” “summarize this text into JSON”).
  3. Run two variants (change one knob or constraint).
  4. Verify (tests, lints, runtime output, schema validation).
  5. Write one sentence: “When I changed X, Y happened; next time I’ll do Z.”
Don’t confuse fluency with correctness

Great writing and clean code style can still be wrong. Treat verification as mandatory, not optional.

Where to go next