AI Fundamentals — How Modern AI Works›04 · Why models get things wrong
Learning Hub / AI Fundamentals & AI-Assisted Engineering / AI Fundamentals — How Modern AI Works

Lesson 04 of 13 · How models work

Why models get things wrong

Why language models sometimes state false things confidently, why they do not know recent events, where bias comes from, why they tend to agree with you, and the techniques that actually reduce these problems: grounding in real documents, tools, citations, and checking.

Foundation
Key wordshallucinationconfabulationknowledge cut-offbiasnon-determinismsycophancygroundingcitationsverification

The headline problem: confident and wrong

A model generates the most plausible text (lesson 2). For common facts, plausible and true are the same thing. For rare details (an exact flag, a version number, a citation, a person's job title) the model's knowledge is thin, and something that looks right can come out with the same confidence as something that is right. This is called hallucination.

You:    "Which kubectl flag shows pods sorted by restart count?"
Model:  "Use kubectl get pods --sort-by-restarts"          ← invented
Real:   kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'

The model is not lying; it has no separate sense of "I'm sure" versus "I'm guessing" unless it was trained to express one, and that sense is imperfect.

Think of a student who has read every book in the library but answers every exam question from memory, without notes, and never leaves a question blank. Mostly they're brilliant. On the questions they half-remember, they still write a confident answer, and it's sometimes made up.

Other failure modes

Problem Why it happens Example
Knowledge cut-off Training data stops at a date Doesn't know a tool's latest version or this week's news
Bias Training data reflects the world's imbalances Assumes a nurse is "she" and an engineer is "he"
Sycophancy Feedback training rewarded agreeable answers Agrees with your wrong diagnosis
Non-determinism Some randomness in choosing tokens Two runs, two different answers
Weak maths and counting Works on tokens, not digits or letters Miscounts letters in a word, slips on long arithmetic

What actually reduces the problems

  1. Ground it. Give the model the real source (the policy, the manual, the log) and tell it to answer only from that, and to say when the answer is not there. This is RAG (lessons 5–7) and is the biggest single improvement for factual questions.
  2. Give it tools. A calculator, a search, a database query or kubectl itself is better than a guess (lesson 8).
  3. Ask for sources. "Quote the sentence you used" lets a person check quickly.
  4. Verify by something other than the model. Tests for code, a policy checker for configuration, a human for anything that matters. Asking the same model "are you sure?" often just produces a confident yes or an apologetic change of answer.
  5. Use it where errors are cheap and easy to spot, and be careful where they are expensive and hidden.

A useful mental rule

Task Trust level
Explaining a well-known concept High; spot-check
Drafting text you will edit High
Summarising a document you gave it Medium-high; check numbers and names
Exact commands, flags, versions, citations Low until verified
Recent events, prices, laws Low unless it used a search tool
Decisions about people, money, safety Must have human review

Recap

  • Models produce plausible text; on thin knowledge, plausible can be false but sound just as sure.
  • Also watch for cut-off dates, bias, agreeing with you, randomness and counting.
  • Reduce errors with grounding, tools, citations and independent verification, not by asking the model to try harder.

This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.