PromptisePromptise
Docs
GitHub
Promptise - AI Framework LogoPromptise

The foundation layer for agentic intelligence. Build, secure and operate autonomous AI systems with Promptise Foundry.

pip install promptise

[01] Foundry

  • MCPcast
  • The Promptise Agent
  • Reasoning Engine
  • MCP
  • Agent Runtime
  • Prompt Engineering
  • Execution Engine
  • Agent Identity

[02] Resources

  • Documentation
  • GitHub
  • Guides
  • Learning Paths
  • Questions

[03] Company

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Subprocessors

© 2026 Promptise by Manser Ventures. All rights reserved.

Open source · Python

← Guides> Library> Topic

LLM hallucinations: why they happen and how to catch them

A hallucination is a fluent, confident statement from a model that is false or not supported by its sources. It happens because a model generates likely text, not checked facts, and nothing in plain generation tells it to stop when it does not know.

You cannot remove hallucinations completely, but you can make them rarer and easier to catch. Grounding answers in supplied documents, asking for citations, letting the model say it does not know, verifying claims in a separate step and checking outputs in code all help. These guides start with quick checks for beginners and move to methods such as Chain-of-Verification, SelfCheckGPT and semantic entropy, which detect unsupported claims by comparing several answers.

[n.01/02]> 11 guides
  1. 01Why Can't LLMs Count Letters? Tokens and ProbabilityWhy LLMs miscount letters, reverse strings wrong and miss word limits: tokenization, sampling, real failures, and why exact work belongs in your code.Beginner · 4 minOct 18, 2026
  2. 02Are LLMs Stochastic Parrots? What the Term Gets RightAre LLMs stochastic parrots? What Bender et al. meant, what next-token prediction implies, where the term falls short, and the habit it should give you.Beginner · 5 minOct 18, 2026
  3. 03Grounding LLM Answers: Give the Model the Right ContextGround LLM answers in your own text: paste the source, fence it with delimiters, require citations and handle gaps. Real return-policy example.Beginner · 7 minOct 18, 2026
  4. 04LLM Hallucinations: Why They Happen and Quick ChecksWhy LLMs hallucinate and how to catch it: spot risky questions, allow "I don't know", require quotes and check them in code. Real fake-citation example.Beginner · 7 minOct 18, 2026
  5. 05LLM Confidence Scores: Add Self-Check Fields to PromptsGet useful LLM confidence scores: add basis, quote and check fields to the output, define each level and route answers in code. Real example and output.Beginner · 8 minOct 18, 2026
  6. 06LLM Output Validation: Check Responses Before You Use ThemValidate LLM output before you act on it: schema, grounding and consistency checks, safe handling of links, SQL and HTML, and when to retry or escalate.Intermediate · 10 minOct 18, 2026
  7. 07Why LLMs Get Niche Facts Wrong: Popularity and Training DataWhy LLMs know popular facts but invent niche ones: accuracy tracks how often a fact appears in training data. When to retrieve instead. Real example.Intermediate · 5 minOct 18, 2026
  8. 08AI Code Hallucinations: Why Plausible Output Fools YouWhy LLM code looks right but fails: plausibility vs correctness, hallucinated packages, a real regex that broke, and how to verify output by running it.Intermediate · 4 minOct 18, 2026
  9. 09LLMs as Lossy Compression: Why They Can't Quote ExactlyWhy an LLM is a lossy compression of its training data: it keeps gist and loses exact wording, quotes and URLs. What to ask it for, with a real example.Intermediate · 4 minOct 18, 2026
  10. 10Chain-of-Verification and SelfCheckGPT: Catch HallucinationsChain-of-Verification (CoVe) and SelfCheckGPT explained: draft, verify with independent questions, flag claims that samples disagree on. Real pitfalls.Advanced · 9 minOct 18, 2026
  11. 11Semantic Entropy: Detect When an LLM Is UnsureSemantic entropy explained: sample answers, group them by meaning, and use the entropy to decide when to answer, retrieve or abstain. Runnable Python code.Advanced · 8 minOct 18, 2026
[n.02/02]> go further

Related topics

  • LLM Mental Models19
  • Grounding and Citations6
  • How LLMs Work8
  • RAG (Retrieval-Augmented Generation)9
  • Structured Outputs8
  • Uncertainty and Confidence3
  • Context Engineering6
  • Evals and Testing15

Topic hubs

  • Testing and evals→

By category and level

  • Prompt Engineering guides54
  • LLM Security guides10
  • Beginner guides36
  • Intermediate guides80
  • Advanced guides24

Search every guide.

The library lists all guides with filters for topic, level, category and reading time.

All guidesLearning paths