hallucination-check

LLM hallucination detector with dual strategy (UQLM + rule-based fallback). Scores any AI output's confidence and flags potential hallucination risks.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "hallucination-check" with this command: npx skills add li8476295-bot/hallucination-check

Hallucination Check

Detect AI hallucination risks in LLM outputs. Uses UQLM (uncertainty quantification) as primary scorer, with a rule-based fallback when UQLM dependencies aren't available.

Quick Start

# Install
pip install uqlm

# Check a text
hallucination-check --input "根据我的分析,这可能是新算法,我不太确定具体参数"
# → 置信度: 65.3%  | 建议: 低置信度,建议重新生成

# JSON output
hallucination-check --input "..." --json

# Check from file
hallucination-check --file response.json --field text

How It Works

LLM output → UQLM scorer → confidence 0-1 → threshold check
                                      ↓
                            rule-based keyword flags
                                      ↓
                           output: safe/warn/danger

Dual Strategy

ModeWhenAccuracy
UQLMpip install uqlm doneHigh (semantic entropy + min token prob)
Rule fallbackUQLM unavailableMedium (keyword + pattern matching)

Thresholds

  • --threshold 0.3 (default): below = high risk
  • Flags: vague language, unsourced numbers, contradiction patterns

For Developers

The core function is check_text(text, context=""):

from hallucination_check import check_text
result = check_text("AI生成的内容", context="指令")
print(result["confidence"], result["suggestion"])

Notes

  • UQLM needs transformers<5.0.0 (see pypi for version compat)
  • Rule fallback is zero-dependency, works everywhere
  • Best used before critical operations (code execution, SQL, external sends)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Douyin Scraper V2

抖音图文笔记采集工具。支持自然语言搜索(如"搜索一下海鲜视频"),自动提取关键词 → 搜索 → 筛选「图文·一周内」→ Playwright 截图(绕过反爬虫)→ Baidu OCR 识别图片文字 → 输出 Markdown 报告(含热度评分)。当用户提到"抖音搜索"、"抖音图文采集"、"抖音笔记抓取"、"抖音爬...

Registry SourceRecently Updated
General

Public Skill

平台公邮:用于将天气、日报、报告、提醒等内容推送到用户自己的邮箱,零配置完成消息留存

Registry SourceRecently Updated
General

Qclaw Cron Skill

[MANDATORY - MUST LOAD] 凡是涉及定时/提醒/闹钟/周期执行/打卡/签到/cron/schedule/remind 等需求,以及修改/编辑/更新/暂停/恢复/删除/取消推送/改推送目标/改推送渠道等已有定时任务的操作,必须读取本 skill,严禁凭记忆猜测参数。

Registry SourceRecently Updated
General

Neodata Financial Search

自然语言通用金融数据搜索服务。用自然语言查询股票、基金、指数、板块、宏观经济、外汇、大宗商品等全品类金融数据,涵盖行情报价、财务报表(财报)、资金流向、研报评级、事件公告等。

Registry SourceRecently Updated