π° Originally published on Securityelites β AI Red Team Education β the canonical, fully-updated version of this article.
π£οΈ LLM BASICS FOR BEGINNERS Β FREE
Day 3 of 5 Β Β·Β 60% complete
A lawyer once submitted a legal brief that cited six court cases as precedents. All six cases were completely made up. Heβd asked ChatGPT to find supporting cases, and ChatGPT had confidently produced six plausible-sounding but entirely fictional court rulings β complete with case names, dates, and judges. The lawyer didnβt check them. The judge noticed. It became one of the most famous early examples of an LLM hallucination causing real damage.
That story isnβt about the lawyer being careless (though he was). Itβs about something fundamental to how LLMs work: they produce confident-sounding text regardless of whether the underlying information is true. They canβt tell the difference between βsomething I know accuratelyβ and βsomething that sounds like what would be said here.β The confidence is always the same.
Today Iβm explaining exactly why LLMs make mistakes β not in a vague βAI isnβt perfectβ way, but the specific mechanical reasons for each failure type. Understanding these will permanently change how you use LLMs.
π― What Youβll Learn in Day 3
What hallucinations are and exactly why they happen
Why an LLMβs confidence has nothing to do with its accuracy
How bias gets into LLMs and what it looks like in practice
Why LLMs struggle with maths, counting, and precise logic
The five categories of questions you should always verify
β± 20 min read Β· 3 exercises Β· Just a browser needed
π Before You Start:
- Completed Day 1 and Day 2
- Remember: LLMs predict the next word β they donβt retrieve facts
- Remember: LLMs are frozen after training β they donβt update their knowledge
Why LLMs Make Mistakes β Day 3 of 5
- Hallucinations β Confident Lies From a Prediction Machine
- The Confidence Problem β Why You Canβt Trust the Tone
- Bias β When the Training Data Leans One Way
- Why LLMs Are Terrible at Maths and Counting
- Knowledge Gaps β What the LLM Doesnβt Know
- Five Categories to Always Verify
- Questions and Answers
Days 1 and 2 built your model of how LLMs work. Today that model makes LLM failures make complete sense. None of these mistakes are random or mysterious β they all flow directly from the βpredict the next wordβ mechanism and the training data quality issues from Day 2. The phishing URL scanner we run at SecurityElites is a great counterexample: itβs a specialised model trained specifically on phishing patterns, not a general LLM β which is why it gives reliable results on that specific task even when general LLMs would struggle.
Hallucinations β Confident Lies From a Prediction Machine
A hallucination is when an LLM produces false information as if it were true. Not a mistake the LLM knows is uncertain. A confident, fluent, plausible-sounding statement about something that isnβt real.
The court case story I opened with is a perfect example. The LLM produced six detailed, realistic-sounding case citations β names, dates, courts, judges. None were real. But they followed exactly the pattern of real case citations. The LLM was doing its job: predicting the most probable next words given βfind court cases supporting this legal argument.β The most probable next words looked like real case citations. The fact that the specific cases didnβt exist was irrelevant to the prediction engine.
Why does this happen? From Day 1: the LLM is always predicting. Thereβs no internal check that asks βis this actually true?β The model has no fact-checking mechanism. It has no memory of what actually happened. It just has patterns β statistical relationships between words and phrases from its training data. If the pattern of words that would follow your question is βa confident, detailed-sounding answer,β thatβs what it produces β regardless of whether the specific details are real.
Hereβs my favourite analogy. Imagine someone who has read every crime novel ever written and can reproduce any plot point, character name, or detective technique from any of those books. Ask them βwhat happened in the plot of [book title]β and they can give you a detailed, convincing answer β because they learned the patterns of how crime novel plots work. Now ask them about a book that doesnβt exist. Theyβll still give you a detailed, convincing plot summary β because theyβre generating what a book like that would contain, not reporting what actually exists. Thatβs an LLM hallucinating.
securityelites.com
// WHY HALLUCINATIONS HAPPEN β THE MECHANISM
USER ASKS:
βWhat are the main findings of the Smith & Johnson 2019 AI safety paper?β
LLM THINKS:
βWhat words most likely follow a question about an academic paperβs findings?β
LLM PRODUCES:
βThe Smith & Johnson (2019) paper identified three key findings: [detailed, plausible-sounding findings]β¦β
REALITY:
The paper may not exist. The LLM generated what an answer to that question should look like β not what is actually true.
π Read the complete guide on Securityelites β AI Red Team Education
This article continues with deeper technical detail, screenshots, code samples, and an interactive lab walk-through. Read the full article on Securityelites β AI Red Team Education β
This article was originally written and published by the Securityelites β AI Red Team Education team. For more cybersecurity tutorials, ethical hacking guides, and CTF walk-throughs, visit Securityelites β AI Red Team Education.

Top comments (0)