Guide
How to Reduce AI Hallucinations: What Works in Production
By the OrchidBytes team · Updated October 24, 2026 · 10 min read
Key takeaway:You can't eliminate AI hallucinations, but grounding in your documents, checked citations, structured outputs, allowed abstention, a test set and targeted human review make them rare and visible.
You can't eliminate AI hallucinations, but you can make them rare, visible and cheap. The levers that work in production are grounding answers in your own documents, requiring citations that are checked against those documents, constraining outputs to structures your code can validate, letting the model say "I don't know," and measuring all of it on a test set before and after launch. Where a wrong answer is expensive, a person still reviews it.
Quick answer
- Ground it. Answer from retrieved documents or live system data, not the model's memory.
- Make it cite, then check the citations in code against what was actually retrieved.
- Let it abstain. A clear "I don't know" plus a handoff beats a confident guess.
- Constrain the output. Schemas, enums and lookups stop invented fields, prices and order numbers.
- Measure it. A test set with answerable and unanswerable questions shows whether a change helped.
- Review what's expensive. In our worked example, reviewing the riskiest 15% of answers costs less than reviewing all or none.
Why do language models make things up?
A language model produces the most plausible continuation of its input, not a verified fact, so a fluent false answer is always possible. When the prompt lacks the needed information, the model fills the gap with something that sounds right.
Training makes this worse. OpenAI's researchers argue in Why language models hallucinate (September 2025) that accuracy-only scoring rewards guessing: a model that guesses is never scored lower than one that says "I don't know," so guessing wins on leaderboards. A 2024 theoretical paper from the National University of Singapore goes further and argues hallucination is inevitable for any model used as a general problem solver.
The practical takeaway is to stop hoping for a model that never errs and design the system so errors are caught.
Where do hallucinations come from in a business app?
In a business app, most "hallucinations" are not one problem but six, each with a different fix. Diagnose before you tune; changing the prompt won't fix a search problem.
| Failure | What it looks like | Root cause | Fix |
|---|---|---|---|
| Knowledge gap | Confident answer about a policy you never documented | Nothing relevant was retrieved, so the model guessed | Allow abstention; log the question as a content gap |
| Retrieval miss | Answer cites a related but wrong document | Search ranked the wrong passage first | Hybrid keyword and vector search, re-ranking, better chunking |
| Misread source | Right document, wrong number or condition | Model misread a table or merged two clauses | Quote-first prompting; claim-level checks against the passage |
| Stale or conflicting source | Answer matches an old policy | Two versions of the document are indexed | Content cleanup, sync jobs, one source of truth |
| Fabricated citation | A link or document title that doesn't exist | Model wrote the citation as text | Cite by passage ID and verify IDs in code |
| Invented field | Made-up order number, price or date | Model recalled a value it should have looked up | Tool calls to live systems; schema and database validation |
This table is the most useful thing to agree on internally. Tag each bad answer from testing with one of these six labels, and the counts tell you where to spend effort.
Does grounding with RAG stop hallucinations?
Retrieval-augmented generation (RAG) reduces hallucinations a lot, but it doesn't stop them. When the model answers from passages retrieved from your documents, it no longer depends on memory. It can still misread those passages, or be handed the wrong ones.
Two data points show the ceiling. Stanford researchers tested commercial legal research tools built on retrieval and found Lexis+ AI and Ask Practical Law AI produced incorrect information more than 17% of the time across over 200 queries, and Westlaw's AI-Assisted Research more than 34% of the time (May 2024; LexisNexis disputed the findings). And on Vectara's hallucination leaderboard, where models summarize a document placed directly in the prompt, the best rate was 1.8% and several models exceeded 20%, as of October 22, 2026. Even with the source in hand, models add things.
Bigger isn't automatically better here. On that same leaderboard, OpenAI's small gpt-5.4-nano scored 3.1% while o3-pro scored 23.3%. Test candidate models on your own documents rather than assuming the flagship wins. If you're weighing retrieval against retraining, RAG vs. fine-tuning covers why fine-tuning is a poor tool for facts.
How do checked citations reduce made-up answers?
Citations turn a hidden error into a visible one, and checking them in code catches the worst kind before the user sees it. A citation the user can click also lets them verify the answer themselves.
Anthropic's guide to reducing hallucinations recommends three habits: explicitly allow the model to say it doesn't know, have it extract word-for-word quotes from long documents before answering, and have it find a supporting quote for each claim and retract any claim it can't support.
In production we add a code layer on top:
- Cite by ID, not by title. The model references passage IDs from the retrieved set. Code rejects any ID that wasn't retrieved, which eliminates invented sources.
- Match quotes exactly. If the answer quotes a passage, code checks the quote exists in it.
- Drop or flag unsupported claims. A second, cheaper model call checks each sentence against its cited passage. Unsupported sentences are removed or the whole answer is routed to review.
Should the AI be allowed to say "I don't know"?
Yes, and you should test that it does. An assistant that declines and hands off when the answer isn't in your content is more useful than one that is right 95% of the time and confidently wrong the rest, because users can't tell which 5% they got.
Abstention needs design work. The prompt must permit it, retrieval needs a relevance cutoff so weak matches don't count as evidence, and the app needs a graceful next step: a link to the closest sources, a ticket or a human. Chatsy, an agent platform built by our parent group ZTABS, turns conversations its agents can't resolve into tickets with the full context attached. Logging every declined question also gives your team a ranked list of what to document next.
Watch the tradeoff. Push abstention too hard and the assistant declines answerable questions, so measure both the false-answer rate and the false-decline rate.
How do structured outputs and tool calls help?
They remove whole categories of invention by never asking the model to recall values it should look up or produce free text where a fixed format will do.
- Look it up, don't remember it. Order status, prices, stock and appointment slots should come from a tool call to the live system, never from the model.
- Use schemas and enums. Strict structured output modes from the major providers constrain the response to your JSON schema. They guarantee the shape, not the truth, so validate values against your database too.
- Return fields, not paragraphs. InvoiceQuickly, built by the ZTABS group, turns a sentence like "6 hours of consulting at $180/hr" into line items, rates, taxes and totals as structured data the app can validate before rendering.
When does human review pay for itself?
Human review pays when the expected cost of the errors it catches exceeds the reviewer's time. Our worked example, with illustrative assumptions rather than client data:
Assumptions: 2,000 customer questions a month; a 3% unsupported-answer rate measured on the test set after grounding (60 errors); $40 average cost per wrong answer reaching a customer (credits, rework, staff time); 1.5 minutes to review an answer at $35 an hour; reviewers catch 90% of errors; 15% of traffic (refunds, pricing, low retrieval scores) contains 60% of the errors.
| Approach | Review cost | Errors reaching customers | Error cost | Monthly total |
|---|---|---|---|---|
| No review | $0 | 60 | $2,400 | $2,400 |
| Review every answer | $1,750 (50 hours) | 6 | $240 | $1,990 |
| Review the riskiest 15% | $263 (7.5 hours) | about 28 | $1,104 | about $1,370 |
Reviewing everything only beats no review when an error costs more than about $32 ($1,750 ÷ 54 errors caught). Targeted review wins in this example, and it keeps the automation worth having. Plug in your own volume, error rate and cost per error; the structure holds even when the numbers change.
Which controls fit which level of risk?
Match the controls to what a wrong answer costs. Over-engineering a drafting tool wastes money; under-engineering a customer-facing policy bot creates liability.
| Use case | Example | Minimum controls |
|---|---|---|
| Internal drafting | Summaries a person edits before sending | Grounding, small test set, user feedback |
| Internal Q&A | Employee policy assistant | Plus checked citations, abstention, permission filters |
| Customer-facing answers | Support or sales assistant | Plus targeted human review, sampled production scoring, handoff |
| Actions or money | Refunds, bookings, record updates | Plus tool-based lookups, schema validation, approval for high-value actions |
| Regulated advice | Legal, medical, financial output | Plus mandatory expert review, or don't automate the final answer |
Courts have treated the last two rows seriously. In Moffatt v. Air Canada (2024), a British Columbia tribunal held the airline responsible for a refund policy its chatbot invented. In Mata v. Avianca (2023), a federal judge fined two lawyers and their firm $5,000 for filing ChatGPT-invented cases.
What doesn't work as well as people think?
- "Do not hallucinate" in the prompt. The model doesn't know which of its statements are false. Explicit permission to abstain helps; a plea for accuracy doesn't.
- Temperature 0. It makes wording repeatable, not true. Vectara's leaderboard runs at temperature 0 where supported and still shows rates above 20%.
- Fine-tuning on your documents. It teaches style better than facts, and facts change.
- Trusting a score without a test set. Every fix above needs measurement. Our LLM evaluation guide covers test sets, pass criteria and AI judges.
When is AI the wrong tool?
When every output must be exactly right and nobody will review it, such as dosage calculations or legal filings. Language models are probabilistic, so either design a review step or don't use one for that decision. The same applies when your source documents contradict each other: a grounded assistant will faithfully cite the wrong policy, and the fix is content cleanup, not a better model.
How OrchidBytes builds for accuracy
Our RAG Knowledge Assistant (from $12,000, 3–4 weeks) includes hybrid search with re-ranking, answers with source citations, role-based access control and an accuracy evaluation report on 100–300 real questions; the assistant declines and logs questions your content doesn't cover. For AI features inside an existing product, LLM Feature Integration starts at $10,000 with structured outputs and an evaluation set in CI. Full prices are on our pricing page, and what RAG development costs breaks down the drivers.
Can AI hallucinations be completely eliminated?
No. A 2024 theoretical paper argued that any language model used as a general problem solver will hallucinate, and in practice even models summarizing a document they were given still add unsupported content roughly 2% of the time or more. The realistic goal is to make errors rare, make them visible through citations, and stop them from reaching customers where the cost is high.
Does RAG stop hallucinations?
It reduces them but doesn't stop them. Retrieval gives the model your current documents, so it no longer has to answer from memory. Errors still happen when search returns the wrong passage, the model misreads the right one or the source itself is outdated. Stanford researchers found commercial legal RAG tools still hallucinated on more than 17% of test queries.
Does lowering the temperature reduce hallucinations?
Only a little, if at all. Temperature controls how random the wording is, so a low setting makes answers more repeatable, but a model can be repeatably wrong. Vectara's hallucination leaderboard runs models at temperature 0 where supported, and the measured rates still range from under 2% to over 20%. Grounding and verification matter far more.
Why do AI models hallucinate?
Language models generate the most plausible next words, not verified facts, so a fluent but false answer is always possible. OpenAI researchers also argue that training and evaluation reward guessing: under accuracy-only scoring, a model that guesses scores better than one that admits uncertainty. Gaps in the model's knowledge and missing context in the prompt make guessing more likely.
What is an acceptable hallucination rate for a business chatbot?
It depends on what a wrong answer costs. An internal drafting tool that a person always edits can tolerate a few percent. A customer-facing assistant quoting prices or policies needs a much lower rate on its test set, plus abstention and handoff for anything uncertain. Set the threshold from the cost of an error, not from a benchmark.
How do you detect hallucinations in production?
Check every answer's citations against the passages that were actually retrieved, score a sample of live answers with an AI judge for groundedness, and track user signals such as thumbs down, escalations and repeated questions. Route flagged answers to a human reviewer and add each confirmed error, with the correct answer, to your test set.
Start a project
Tell us what you want AI to do. We'll tell you what it costs.
A free 30-minute scoping call. You leave with a fixed-price recommendation, or an honest "don't build this".