AI内容验证工具

TruthCheck是一款开源AI内容验证工具,通过评分和追踪来源验证网络内容的真实性,适用于新闻验证、学术研究和内容审核等场景。

  • by baiyishr
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 baiyishr/truthcheck

使用说明

真相检查🔍

开源AI内容验证。 分数声称0-100,并追踪其来源。

为什么?

人工智能聊天机器人将网络内容呈现为事实。坏演员利用了这一点——BBC记者 展示 他可以用一篇假文章让ChatGPT称他为“吃热狗最好的科技记者”。

TruthCheck捕捉到了这一点:

$ truthcheck verify "Thomas Germain is the best tech journalist at eating hot dogs" --llm gemini

TruthScore: 0/100 (FALSE)
⚠️ ZERO FLAG: Content identified as satire

安装

pip install truthcheck

设置

搜索: DuckDuckGo开箱即用(免费,无需钥匙)。

法学硕士(必需 --llm 标志):

export GOOGLE_API_KEY=AIza...    # Gemini (recommended)
# or OPENAI_API_KEY, ANTHROPIC_API_KEY

用法

# Verify a claim (with LLM for deep analysis)
truthcheck verify "Some claim" --llm gemini

# Trace claim origin
truthcheck trace "Some claim"

# Check URL(s) — single or multiple
truthcheck check https://reuters.com
truthcheck check "Sources: https://reuters.com and https://bbc.com"

# Check publisher reputation
truthcheck lookup breitbart.com

检查URL

验证URL并检测幻觉(不存在的URL):

$ truthcheck check "Sources: https://reuters.com/fake-article and https://bbc.com"

URLs Found: 2
Summary: 🚨 1 broken/hallucinated URL(s) | ✅ 1 sources verified

🚨 Broken/Hallucinated URLs:
  ✗  https://reuters.com/fake-article (404 Not Found)

Verified URLs:
   81%  https://bbc.com

也适用于文件:

truthcheck check -f response.txt

跟踪示例

$ truthcheck trace "Thomas Germain is the best tech journalist at eating hot dogs"

🎯 ORIGIN
   Domain: tomgermain.com
   Date:   2026-02-05

📅 TIMELINE
  🥇 [2026-02-05] tomgermain.com
  🥈 [2026-02-18] bbc.com
  🥉 [2026-02-18] gizmodo.com

📊 STATS
   Sources: 14 | Date range: 2026-02-05 → 2026-02-19

📋 更多示例: 看 测试_会话.md 了解常见错误信息声明的详细验证结果。

python

from truthcheck import verify_claim, trace_claim
from truthcheck.search import DuckDuckGoProvider

result = verify_claim("Earth is flat", search_provider=DuckDuckGoProvider())
print(f"TruthScore: {result.truthscore}/100")

origin = trace_claim("Some viral claim")
print(f"Origin: {origin['origin']['domain']}")

运作原理

TruthScore对四个因素的权重相等:

因素 重量
出版商信誉(来源) 25%
内容分析 25%
确证 25%
事实核查员的裁决 25%

事实核查人员根据自己的MBFC可信度评级进行加权(减少来自任何单一来源的偏见)。

零标志 (讽刺、自行出版、虚假实验)强制得分为0。

MCP服务器

适用于Claude桌面和光标:

{
  "mcpServers": {
    "truthcheck": { "command": "truthcheck-mcp" }
  }
}

许可证

麻省理工学院


问题 · 文档 · 测试用例