Skip to content

Meet DeepintShield at Bengaluru Tech Summit 2026, 17 to 19 November, BIEC Hall 1, booth H1A106. Book 20 minutes

Start For Free

Platform · Hallucination Defense

LLM hallucination detection and consistent answers

LLM hallucination detection checks whether a model’s answer is supported, relevant and consistent. DeepintShield adds grounding instructions before the model runs, scores sampled answers with five detectors and an overall risk score, and can return the same approved answer to equivalent questions. Scoring runs after the response, so users do not wait.

  • Five detectors plus an overall risk score
  • Approved golden answers
  • Business plan and above
LLM hallucination detection illustration: dashboard panels, a magnifying glass and charts beside a shield

Why answer quality is a security issue

Grounded answers start with trusted context: RAG Security checks what is retrieved, and Hallucination Defense checks what the model says.

Unsupported answers

A confident answer with no support in the source can mislead a customer, an employee or an auditor.

Inconsistent answers

The same question gets different answers on different days, which is hard to defend in regulated work.

No number to track

Without a score, teams cannot see whether answer quality is improving or report it to risk owners.

How LLM hallucination detection works

Hallucination Defense combines checks before the model runs with scoring after it answers. See how the gateway handles a request end to end.

Check for an approved answer

With Response Consistency on, a pinned golden answer or a verified earlier match can be returned first.

Ground the prompt

Directives ask the model to stay grounded, cite sources and hedge when unsure, with no extra model calls.

Score the answer

After the response, five detectors score sampled answers and combine them into an overall risk score.

Tune and review

Adjust strictness, the consistency threshold and the sample rate as the scores come in.

Hallucination defense features

Each control works on its own, so you can start with grounding and scoring, then add consistency for high-stakes topics.

Grounding directives

Stay grounded, don’t make things up, require sources, hedge when unsure and reduce randomness, at low, medium or high strictness.

Five detectors

Faithfulness, answer relevance, coherence, helpfulness and citation precision, combined into an overall hallucination-risk score.

Scored after the response

Scoring runs asynchronously on a sample of traffic. A 10% sample rate is the recommended starting point.

Response consistency

Modes from Exact-Match to Semantic + Pinned and Strict give equivalent questions the same answer.

Golden Registry

Load approved answers from CSV. Entries are versioned, scanned by guardrails and fail closed.

Optional verifier

A verifier can check borderline semantic matches, or all of them, before an earlier answer is reused.

Hallucination Defense and Response Consistency are available on the Business plan and above. The helpfulness detector uses one extra judge call. Compare plans.

Answer checks on the same request path

Hallucination Defense runs on the same gateway traffic as guardrails and cost controls. Every request already has a detail record with timing, tokens, cost and guardrail results, which you review in Observability & Audit. The consistency settings are explicit and documented:

  • Strict mode: temperature 0, seed 42, top-p 1
  • Similarity threshold 0.93 by default (0.80 to 0.99)
  • Consistent answers expire after 72 hours by default
  • Temperature capped at 0.4 when randomness is reduced
Request detail in DeepintShield AI Logs: timings, provider, model, virtual key, tokens and cost(opens the full-size image in a new tab)
Each gateway request has a detail record you can review.

No code change beyond the base URL

Hallucination Defense works on requests that pass through the gateway. Point your existing client at DeepintShield with a virtual key, then turn on grounding, scoring and consistency in the gateway settings. All options are in the Hallucination Defense docs.

import openai

client = openai.OpenAI(
    base_url="https://app.deepintshield.com/openai",  # Point to DeepintShield
    api_key="sk-ds-your-virtual-key"
)

Mapped to AI risk frameworks

Mapped to

  • NIST AI RMF
  • ISO/IEC 42001
  • EU AI Act
  • OWASP LLM Top 10

Mapping supports your own assessment; it does not replace it.

Further reading on answer quality

Hallucination questions

What is an LLM hallucination?

An LLM hallucination is an answer that sounds confident but is not supported by the sources or facts the model was given. It matters most where answers drive decisions, such as finance, healthcare or customer support.

How is the hallucination-risk score worked out?

Five detectors score each sampled answer: faithfulness, answer relevance, coherence, helpfulness and citation precision. Their results combine into one overall hallucination-risk score that you can track over time.

Does scoring slow down responses?

No. Scoring runs asynchronously after the response is returned, and grounding directives add no extra model calls. The helpfulness detector's judge call is part of that after-the-response scoring.

What is a golden answer?

A golden answer is an approved response that you pin for a known question. The Golden Registry loads golden answers from CSV, versions them, scans them with guardrails and fails closed, so equivalent questions get the approved wording.

Which consistency modes are available?

Response Consistency has five modes: Off, Exact-Match, Semantic, Semantic + Pinned and Strict. Strict fixes sampling at temperature 0, seed 42 and top-p 1, and semantic matches must clear a similarity threshold of 0.93 by default.

Which plan includes Hallucination Defense?

Hallucination Defense and Response Consistency are on the Business plan and above. See the plan comparison for what each plan includes.

Measure and control answer quality

Book a demo to see Hallucination Defense on Cloud Business, or start free and route your first requests.

Start For Free