Glossary · AI & ML

Hallucination

When an AI model generates plausible-sounding but factually incorrect or fabricated information.

In AI, a hallucination occurs when a large language model generates content that appears plausible and coherent but is factually incorrect, fabricated, or unsupported by the training data or provided context. For database applications, hallucinations can manifest as references to non-existent tables or columns, incorrect SQL syntax, made-up data values, or logically unsound query constructions. Hallucinations are particularly dangerous in data analysis because incorrect queries can lead to wrong business decisions. Mitigation strategies include schema validation, query verification, RAG (grounding responses in actual schema data), output constraints, and human-in-the-loop review.

In practice

How AI for Database applies it

AI for Database minimizes hallucinations by validating all generated SQL against your actual schema before execution and flagging potential issues.
AI & ML · aifordatabase glossaryRead-only ✓

Fig — every answer ships with the tables, rows and SQL behind it.

See it on your own database

Connect read-only in minutes. Free models included.

Start free