
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 分