Nyraxis/ docs
Providers
Developer documentation

Grounded output

Configuration, evaluation scope, and practical limits for hallucination.

hallucination is the policy type used by the API and policy editor.

What it checks

Compares LLM output against configured source strings. Safeguard templates set require_sources: true and leave this rule disabled until source setup is reviewed. With that setting, missing source strings or missing output make the check incomplete; a user question is not automatically accepted as factual evidence.

Configure the policy

Create a policy under Dashboard → Security → Policies. Choose this policy type, set the agent scope, and start in warning mode while you measure results. Use blocking only after verifying the application’s decision gate.

The following is the config object, not a complete policy-creation request:

{
  "threshold": 0.4,
  "require_sources": true,
  "sources": [
    "Support hours are Monday to Friday, 09:00\u201317:00 UTC."
  ]
}

Scope and limits

Send both input and output to evaluation. There is no context field in the evaluation request; configure approved policy sources. The check supports a bounded number and length of sources. In strict source mode, a known source/output truncation makes the result degraded. Alignment with supplied text is not independent factual verification, citation validation or a guarantee of grounded answers; similar wording can still contain contradictory facts. Review configured processing destinations before submitting sensitive source material.

Legacy policies without require_sources: true retain their input-as-context fallback for compatibility. Review that configuration before relying on its results: an untrusted question is not an approved reference. Applying the updated template does not rewrite an existing policy.

For a smoke test, configure reference hours in sources, submit a question as input and a proposed answer as output, then inspect the actual result. Compare supported answers, contradictory answers, missing sources, long sources and paraphrases. A controlled software test is not a detector accuracy benchmark. Use the authenticated Playground or evaluation API with both input and output. The inline input-only detector preview cannot supply the output required by a strict grounded-output rule.

Verify before rollout

Test a representative safe input, a synthetic positive case, and an unavailable-detector case. Inspect evaluation_status, errors, policies_evaluated, findings and allowed. A clean empty finding list is useful only when the required checks completed.

The policy mode determines the decision: warning findings can coexist with allowed: true. Your application must act on a blocking decision before the protected operation. Evaluation does not automatically redact text or cancel an operation that already happened.

On this page