Skip to content
Back to skills

Hallucination Detection

ASecurity

AI 回答中幻觉问题的检测方法(无依据陈述、编造引用、事实错误)。当需要检测大模型应用输出是否存在幻觉时使用。

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 8, 2026
ai-agents

Security analysis

A100/100

Scanned October 8, 2026

npx -y skills add majiayu000/claude-skill-registry --skill hallucination-detection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hallucination Detection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hallucination Detection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-hallucination-detection/badge)](https://www.skillsdirectory.com/skills/majiayu000-hallucination-detection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: 幻觉检测Skill
description: AI 回答中幻觉问题的检测方法(无依据陈述、编造引用、事实错误)。当需要检测大模型应用输出是否存在幻觉时使用。
---
# 幻觉检测Skill

## 适用场景
AI 专项测试环节,检测回答中的幻觉内容,量化幻觉率并定位来源。

## 执行步骤
1. 采集真实输出样本(≥50 条,覆盖各业务场景)。
2. 逐条核验幻觉类型:
   - 事实错误:与事实依据矛盾(数值/日期/人名/规则)。
   - 无依据陈述:无法在知识库/上下文中找到来源的断言。
   - 编造引用:引用不存在的文档/条款/链接。
   - 概念混淆:张冠李戴、错误归因。
3. 判定流程:输出断言 → 在源材料中检索依据 → 有据→非幻觉;无据或矛盾→幻觉。
4. 统计幻觉率(含幻觉的回答占比 + 单条幻觉密度),分场景/分类型拆解。
5. 归因:RAG 检索失败 / 上下文截断 / Prompt 引导不足 / 模型能力。

## 规范要点
- 核验必须「穷尽检索」后再判无据:先在知识库与上下文中查找,找不到才算无依据,禁止凭印象判。
- 无法核验的断言单独归类「待核验」,不混入幻觉率。
- 每条幻觉必须留证:输出原文 + 核验结果 + 正确依据(如有)。
- 幻觉样本要回传给 Prompt 工程侧用于迭代模板。

## 输出模板
```
## 幻觉检测报告
| # | 输出原文 | 幻觉类型 | 核验依据 | 归因 |
## 幻觉率统计(分场景/分类型)
```

## 自检清单
- [ ] 核验穷尽检索后判定
- [ ] 每条幻觉有证据链
- [ ] 待核验项与幻觉率分离
- [ ] 有归因与改进方向

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.