
RAGScore
io.github.HZYAIPublished by GitHub account HZYAIv0.8.6Updated Oct 24, 2026
Generate QA datasets & evaluate RAG systems with failure diagnosis. Any LLM.
Overview
RAGScore is a local MCP server that generates QA datasets from your documents and evaluates a RAG endpoint, scoring answers and diagnosing failures.
- What you can do
- Generate QA pairs from documents, optionally tailored to an audience and purpose, with question, answer, rationale and support span saved as JSONL. Evaluate a RAG endpoint against those golden QAs and get accuracy, average score and a list of incorrect pairs. Run detailed multi-metric scoring on correctness, completeness, relevance, conciseness and faithfulness. Diagnose failures as retriever miss, generator hallucination, incomplete answer or wrong interpretation. Use the Python API to get results as a DataFrame and plot charts.
- When to use it
- Useful when you maintain a RAG or question-answering service and want a repeatable way to build test questions from your own docs and measure answer quality. Also suited to diagnosing why answers fail, or to private evaluation of confidential documents with a local model.
- Requirements
- Runs locally as a Python package installed with pip; the MCP mode is started with the serve command. Needs an LLM: local Ollama (no key) or a cloud provider, with OPENAI_API_KEY or ANTHROPIC_API_KEY set for those providers. The RAG system under test must expose a query endpoint. Optional settings include RAGSCORE_CHUNK_SIZE, RAGSCORE_QUESTIONS_PER_CHUNK and RAGSCORE_WORK_DIR.
Installation
In SourceWeft
- Open RAGScore in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 3fbc6e8
Tools
0Version history
1- v0.8.6LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts