groundlens_dgi
Detect hallucination in LLM responses by measuring geometric alignment between question and answer without needing source context.
Instructions
Check whether an LLM response shows hallucination patterns (DGI).
DGI (Directional Grounding Index) measures whether the question-to-response displacement aligns with the direction characteristic of verified grounded responses. No source context is needed — this works for open-ended chat, general Q&A, or any situation where you just have a question and answer.
A positive score means the displacement aligns with grounded patterns. A score below 0.30 means the response is geometrically anomalous. A negative score means high hallucination risk.
Args: params (DGIInput): The question and LLM response.
Returns: str: JSON with a plain-language CHECK, the DGI score, and the magnitude.
Examples: - Checking a chatbot's answer to a factual question - Screening LLM outputs before showing them to users - Batch-evaluating model responses for quality
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |