AI Hallucination Detector for Openclaw

A local-first verification tool that scans AI-generated text to identify, flag, and correct factual inaccuracies, contradictions, and hallucinations.

ai-gaoqian
v1.0.0
Jun 13, 2026
0
141
5

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install ai-hallucination-detector

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install ai-hallucination-detector using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is AI Hallucination Detector?

The AI Hallucination Detector is a powerful, local-first utility designed to safeguard the accuracy and integrity of content generated by large language models. Operating directly within your workflow, this skill programmatically parses outputs from engines like GPT, Claude, and Gemini, systematically cross-referencing claims to pinpoint logical conflicts, contextual drift, and flat-out factual fabrications.

By leveraging advanced natural language processing libraries, this entry in the Openclaw Skills library offers developers a reliable safety net. It runs locally with minimal resource overhead, ensuring that enterprise-grade content verification remains fast, cost-effective, and fully private without exposing raw generation data to external networks.

AI Hallucination Detector Use Cases

  • Automated Content Moderation: Scanning articles, documentation, or marketing copy generated by AI agents before they are published.
  • RAG Pipeline Validation: Ensuring that search-augmented context is truthfully reflected in the generated answers without added hallucinations.
  • Chatbot Guardrails: Analyzing user-chatbot conversations in real-time to intercept and flag misleading or incorrect AI responses.
  • Dataset Auditing: Evaluating high-volume synthetic datasets to clean out low-quality or factually incorrect rows prior to training models.

How AI Hallucination Detector Works

  1. Tokenization and Parsing: The input text is ingested and broken down into distinct factual claims and grammatical entities using spaCy.
  2. Semantic Encoding: Each extracted claim is converted into dense semantic vectors using sentence-transformers to capture deep contextual meaning.
  3. Consistency Verification: The tool performs comparative analysis against a baseline reference text or checks internal consistency across different sections of the document.
  4. Report Output: A comprehensive JSON payload is generated, highlighting error locations, severity, original vs. corrected text, and an overall safety score.

AI Hallucination Detector Setup

Install the skill via your terminal using the package manager:

clawhub install hallucination-detector

Ensure that you have Python 3.10+ installed along with the required local dependencies. You can set them up with the following commands:

pip install sentence-transformers spacy numpy
python -m spacy download en_core_web_sm

Once installed, you can trigger the detector within your AI agent context by instructing it to check a block of text for hallucinations.

AI Hallucination Detector Data Schema & Taxonomy

The skill returns a structured JSON evaluation report. Below is the anatomy of the output schema:

Field Type Description
overall_score Float Safety index score from 0.0 (high risk) to 1.0 (perfectly safe).
risk_level String Qualitative risk assessment (low, medium, high).
total_issues Integer Total count of anomalies or contradictions found.
dimensions Array Breakdown of performance metrics across factuality, consistency, and alignment.
hallucination_instances Array Specific details about each discovered error, including location, original text, recommended correction, and confidence score.
recommendations Array Actionable editorial or technical steps to rectify issues.

AI Hallucination Detector Advanced Features

  • Local Execution Guard: Zero dependency on third-party cloud evaluation APIs, guaranteeing absolute data privacy and rapid feedback loops.
  • Adjustable Confidence Thresholds: Customize sensitivity levels to match your application's tolerance for minor contextual variances.
  • Automated Corrections: Provides context-aware rewriting suggestions to automatically patch flagged hallucinations.
  • Low Resource Profile: Highly optimized to run efficiently with only 512MB of RAM and 0.5 CPU cores, making it suitable for edge deployments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*