Detecting hallucinations in scientific AI: checks for facts, physics and code
Updated · Scientifically reviewed by Priyank Srivastava, PhD on
Short answer
Scientific hallucinations are confident outputs that are false: invented references, wrong constants or formulas, results that violate units, conservation or limiting cases, and code that runs but computes the wrong thing. Detect them with layered checks: resolve every citation (DOI, title, authors) in a real database, verify constants against authoritative sources, run dimensional and limit checks, execute code against known analytical solutions, and compare multiple independent answers. Keep a human expert responsible for anything that will be published or acted on.
Who this is for
Researchers, reviewers and teams using language models for literature work, derivations, data analysis or simulation code.
How it works
Treat AI output like a manuscript from an unknown author: plausible until checked. Different error types need different checks.
| Hallucination type | Example | Check |
|---|---|---|
| Fabricated reference | Realistic but non-existent paper | Resolve DOI or search title in Crossref, arXiv or publisher site |
| Misattributed result | Real paper, wrong claim | Read the cited section |
| Wrong constant or formula | Missing , wrong exponent | Compare with CODATA, NRL formulary or textbook |
| Unit inconsistency | Mixing Gaussian and SI expressions | Dimensional analysis of every final expression |
| Physics violation | Energy not conserved, speed exceeding | Conservation, limits, symmetry, sign checks |
| Silent code bug | Off-by-one, wrong normalisation | Run against an analytical test case |
A practical checking workflow
- References: check every DOI resolves and matches title and authors. Treat references without identifiers as unverified.
- Numbers: recompute key numbers independently, for example with our plasma parameter calculators.
- Dimensions and limits: confirm units; test the result when a parameter goes to zero or infinity, where the answer is often known.
- Code: run generated simulation code on a problem with a known solution and check convergence; see simulation verification and numerical convergence study.
- Consistency: ask for the same result by a different route or sample several answers; disagreement flags risk.
- Expert sign-off: a qualified person reviews anything that will be published, submitted or used in design.
Automating part of the checks
- Scripts that extract DOIs and query a metadata service such as Crossref.
- Unit-aware computation (for example the Python
pintlibrary) for derived quantities. - Test suites that run generated code against reference solutions, as used in AI model physics benchmarks.
Automation narrows what humans must check, but it does not replace their judgement.
Assumptions and limitations
- Detection reduces risk but cannot guarantee correctness; some errors are only visible to domain experts.
- Hallucination rates vary by model, task and prompt; this page does not quote rates.
- Vlasify Copilot™, our planned physicist-in-the-loop assistant, is in development and not yet available. Expert review of AI outputs is available now through our physics AI data service.
Frequently asked questions
Why do language models hallucinate citations?+
They generate text that is statistically plausible. A reference with realistic authors, journal and year can be produced without corresponding to a real paper. Retrieval from a real database reduces, but does not eliminate, the problem.
Can the model check itself?+
Self-checking methods (asking again, sampling several answers, asking for verification questions) catch some errors, especially where samples disagree. They are weak against errors the model makes consistently, so external checks remain necessary.
What is the most dangerous kind of scientific hallucination?+
Code or analysis that runs without errors and produces plausible-looking plots but has a wrong factor, unit or boundary condition. Nothing alerts the user, so it needs verification against known solutions.
Does this apply to AI surrogates as well?+
A related problem exists: surrogate models can produce confident predictions outside their training range. Uncertainty estimates and range checks play the role that citation checks play for text.
References
- Ji et al., Survey of hallucination in natural language generation, ACM Comput. Surv. 55, 248 (2023) · Review article
- Manakul, Liusie & Gales, SelfCheckGPT: zero-resource black-box hallucination detection (2023) · arXiv preprint
- Dhuliawala et al., Chain-of-verification reduces hallucination in large language models (2023) · arXiv preprint
- CODATA recommended values of the fundamental physical constants · NIST
- Crossref REST API · Crossref
Need help applying this?
Our physicists turn concepts into working, verified simulations for research groups and companies.
Services listed on this page are available today. Products marked “early access” or “in development” on our platform page are not yet generally available.
Spotted an error or an outdated command? Tell us. We correct verified issues promptly.