ai Hallucination Detector
# AI Code Hallucination Detector
> **Trending:** March 14, 2026 (Guardian exposé on Amazon Kiro) | **Category:** Core Dev
## The Problem
AI coding agents hallucinate. They import packages that don't exist, call APIs that were never real, and generate config options they invented. This is the #1 reliability issue in AI-augmented development.
## The 7 Types of Code Hallucinations
1. **Phantom Imports** — Importing packages that don't exist
2. **Invented APIs** — Calling methods that aren't real (e.g., `prisma.user.findManyAndCount()`)
3. **Stale Patterns** — Using deprecated APIs from older versions
4. **Config Fabrication** — Inventing configuration options
5. **Plausible Nonsense** — Code that compiles but has subtle logic errors
6. **Documentation Drift** — Comments that don't match the code
7. **Security Hallucinations** — Generating insecure code that looks secure
## Quick Check: Add to Your RULES.mdwhen to use it
Community prompt sourced from the open-source GitHub repo dohko04/awesome-ai-prompts-for-devs (MIT). A "ai Hallucination Detector" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
ecommercecommunitygeneral
source
dohko04/awesome-ai-prompts-for-devs · MIT