
RAGScore
io.github.HZYAI由 GitHub 账号 HZYAI 发布v0.8.6更新于 Oct 24, 2026
Generate QA datasets & evaluate RAG systems with failure diagnosis. Any LLM.
概览
RAGScore 是一个本地 MCP 服务器,可从文档生成问答数据集并评估 RAG 端点,给出评分并诊断失败原因。
- 可以做什么
- 从文档生成问答对,可按目标读者和用途定制,输出问题、答案、理由与支撑片段为 JSONL。用这些标准问答评估 RAG 端点,得到准确率、平均分和错误问答列表。进行多指标详细评分,涵盖正确性、完整性、相关性、简洁性和忠实度。诊断失败类型,如检索遗漏、生成幻觉、回答不完整或理解错误。通过 Python API 以数据表形式查看结果并绘制图表。
- 适用场景
- 适合维护 RAG 或问答服务、希望用自有文档生成测试问题并稳定衡量回答质量的场景。也适合排查回答失败的原因,或用本地模型对机密文档做私密评估。
- 运行要求
- 以 pip 安装的 Python 包在本地运行,MCP 模式通过 serve 命令启动。需要 LLM:本地 Ollama(无需密钥)或云服务商,使用后者时需设置 OPENAI_API_KEY 或 ANTHROPIC_API_KEY。被评估的 RAG 系统需提供查询端点。可选配置包括 RAGSCORE_CHUNK_SIZE、RAGSCORE_QUESTIONS_PER_CHUNK 和 RAGSCORE_WORK_DIR。
安装
在 SourceWeft 中
- 打开 控制台中的 RAGScore,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[PyPI version] [PyPI Downloads] [Python 3.9+] [License] [Ollama] [Open In Colab] [MCP]
Generate QA datasets & evaluate RAG systems in 2 commands
🔒 Privacy-First • ⚡ Lightning Fast • 🤖 Any LLM • 🏠 Local or Cloud • 🌍 Multilingual
⚡ 2-Line RAG Evaluation
That's it. Get accuracy scores and incorrect QA pairs instantly.
🚀 Quick Start
Install
Already installed? Keep up to date — new versions add features like failure diagnosis and retrieved context capture:
Option 1: Python API (Notebook-Friendly)
Perfect for Jupyter, Colab, and rapid iteration. Get instant visualizations.
Rich Object API:
result.accuracy- Accuracy scoreresult.df- Pandas DataFrame of all resultsresult.plot()- 3-panel visualization (4-panel withdetailed=True)result.corrections- List of items to fix
Option 2: CLI (Production)
Generate QA Pairs
Evaluate Your RAG
🔬 Detailed Multi-Metric Evaluation
Go beyond a single score. Add detailed=True to get 5 diagnostic dimensions per answer — in the same single LLM call.
CLI:
🔍 Failure Diagnosis (--diagnose)
When answers fail, --diagnose tells you why — retriever miss, generator hallucination, incomplete answer, or wrong interpretation:
Uses the support_span already generated with each QA pair to give the judge grounding context. Combine with --detailed for full diagnostics:
📓 Full demo notebook — build a mini RAG and test it with detailed metrics.
🎯 Audience & Purpose demo — generate tailored QA for developers, customers, auditors, and more.
🏠 Ollama local demo — 100% private RAG evaluation with no API keys.
🏠 100% Private with Local LLMs
Perfect for: Healthcare 🏥 • Legal ⚖️ • Finance 🏦 • Research 🔬
Ollama Model Recommendations
RAGScore generates complex structured QA pairs (question + answer + rationale + support span) in JSON format. This requires models with strong instruction-following and JSON output capabilities.
Minimum recommended: 8B+ models. Smaller models (1.5B–3B) produce lower quality support spans and may timeout on longer chunks.
Ollama Performance Guide
Expected performance (28 chunks, 5 QA pairs per chunk):
RAGScore auto-reduces concurrency to 2 for local Ollama to avoid GPU/CPU contention.
🔌 Supported LLMs
📊 Output Formats
Generated QA Pairs (output/generated_qas.jsonl)
Evaluation Results (--output results.json)
🧪 Python API
🤖 AI Agent Integration
RAGScore is designed for AI agents and automation:
CLI Reference:
⚙️ Configuration
Zero config required. Optional environment variables:
🔐 Privacy & Security
Compliance: GDPR ✅ • HIPAA ✅ (with local LLMs) • SOC 2 ✅
🧪 Development
📡 Telemetry
RAGScore collects telemetry only in MCP server mode (ragscore serve). Standard CLI and Python API usage do not send telemetry.
We collect limited anonymous operational metrics to understand feature usage and improve reliability. No document content, prompts, QA text, model outputs, API keys, endpoint URLs, or file paths are collected.
Collected in MCP mode:
- MCP tool invoked
- LLM provider and model name
ragscoreversion, Python version, OS type- Success/failure status
- Random anonymous installation ID
Opt out:
�� Links
- GitHub • PyPI • Issues • Discussions
⭐ Star us on GitHub if RAGScore helps you!
Made with ❤️ for the RAG community
来源:README.md,提交 3fbc6e8
工具
0版本历史
1- v0.8.6最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分