ragcheck-cli 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/PKG-INFO +194 -193
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/README.md +8 -8
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/pyproject.toml +6 -5
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/__init__.py +1 -1
- ragcheck_cli-0.2.1/ragcheck_cli.egg-info/PKG-INFO +194 -0
- ragcheck_cli-0.2.1/ragcheck_cli.egg-info/SOURCES.txt +41 -0
- ragcheck_cli-0.2.1/ragcheck_cli.egg-info/dependency_links.txt +1 -0
- ragcheck_cli-0.2.1/ragcheck_cli.egg-info/entry_points.txt +2 -0
- ragcheck_cli-0.2.1/ragcheck_cli.egg-info/requires.txt +19 -0
- ragcheck_cli-0.2.1/ragcheck_cli.egg-info/top_level.txt +1 -0
- ragcheck_cli-0.2.1/setup.cfg +4 -0
- ragcheck_cli-0.2.0/.github/workflows/ragcheck.yml +0 -25
- ragcheck_cli-0.2.0/.github/workflows/tests.yml +0 -22
- ragcheck_cli-0.2.0/.gitignore +0 -12
- ragcheck_cli-0.2.0/CONTRIBUTING.md +0 -31
- ragcheck_cli-0.2.0/legal_data/BNSS 2023.pdf +0 -0
- ragcheck_cli-0.2.0/legal_data/BNS_2023.pdf +0 -0
- ragcheck_cli-0.2.0/legal_data/BSA_2023.pdf +0 -0
- ragcheck_cli-0.2.0/ragcheck.yaml +0 -27
- ragcheck_cli-0.2.0/sample_data/components.txt +0 -1
- ragcheck_cli-0.2.0/sample_data/intro.txt +0 -1
- ragcheck_cli-0.2.0/tests/__init__.py +0 -1
- ragcheck_cli-0.2.0/tests/integration/test_end_to_end.py +0 -74
- ragcheck_cli-0.2.0/tests/integration/test_pip_install.py +0 -26
- ragcheck_cli-0.2.0/tests/unit/__init__.py +0 -1
- ragcheck_cli-0.2.0/tests/unit/test_auto_qa.py +0 -36
- ragcheck_cli-0.2.0/tests/unit/test_chunkers.py +0 -150
- ragcheck_cli-0.2.0/tests/unit/test_cli.py +0 -44
- ragcheck_cli-0.2.0/tests/unit/test_config.py +0 -33
- ragcheck_cli-0.2.0/tests/unit/test_embeddings.py +0 -30
- ragcheck_cli-0.2.0/tests/unit/test_failure_classifier.py +0 -58
- ragcheck_cli-0.2.0/tests/unit/test_html_report.py +0 -73
- ragcheck_cli-0.2.0/tests/unit/test_recommender.py +0 -70
- ragcheck_cli-0.2.0/tests/unit/test_retrieval_tester.py +0 -97
- ragcheck_cli-0.2.0/tests/unit/test_vector_store.py +0 -61
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/CHANGELOG.md +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/LICENSE +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/MANIFEST.in +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/docs/ARCHITECTURE.md +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/chunk_demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/classifier_demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/embed_demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/full_pipeline_demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/qa_demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/examples/report_demo.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/__main__.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/analyzers/__init__.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/analyzers/chunkers.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/analyzers/failure_classifier.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/analyzers/recommender.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/cli.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/__init__.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/config.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/config_loader.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/document_loader.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/embeddings.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/progress.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/core/vector_store.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/reports/__init__.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/reports/chunk_visualizer.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/reports/export.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/reports/generator.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/reports/html_report.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/testers/__init__.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/testers/auto_qa.py +0 -0
- {ragcheck_cli-0.2.0 → ragcheck_cli-0.2.1}/ragcheck/testers/retrieval_tester.py +0 -0
|
@@ -1,193 +1,194 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ragcheck-cli
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Lighthouse for RAG systems — diagnose and fix your retrieval pipeline
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Project-URL:
|
|
8
|
-
Project-URL:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Classifier:
|
|
14
|
-
Classifier:
|
|
15
|
-
Classifier:
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.
|
|
18
|
-
Classifier:
|
|
19
|
-
Classifier: Topic ::
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist: sentence-transformers>=2.2.0
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[![
|
|
44
|
-
[![
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
ragcheck
|
|
51
|
-
ragcheck
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **
|
|
64
|
-
- **
|
|
65
|
-
- **
|
|
66
|
-
- **
|
|
67
|
-
- **
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
├──
|
|
122
|
-
├──
|
|
123
|
-
├──
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
uv
|
|
167
|
-
uv run
|
|
168
|
-
uv run
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
- [
|
|
183
|
-
- [ ] v0.3.0 —
|
|
184
|
-
- [ ] v0.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ragcheck-cli
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Lighthouse for RAG systems — diagnose and fix your retrieval pipeline
|
|
5
|
+
Author-email: Pranay Mane <pranaymane78@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pranay7863/ragcheck
|
|
8
|
+
Project-URL: Documentation, https://github.com/pranay7863/ragcheck/blob/main/README.md
|
|
9
|
+
Project-URL: Repository, https://github.com/pranay7863/ragcheck
|
|
10
|
+
Project-URL: Issues, https://github.com/pranay7863/ragcheck/issues
|
|
11
|
+
Keywords: rag,llm,evaluation,retrieval,ai,chunking,diagnostics
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: typer>=0.12.0
|
|
24
|
+
Requires-Dist: rich>=13.0.0
|
|
25
|
+
Requires-Dist: jinja2>=3.1.0
|
|
26
|
+
Requires-Dist: nltk>=3.9.0
|
|
27
|
+
Requires-Dist: pydantic>=2.5.0
|
|
28
|
+
Requires-Dist: litellm>=1.0.0
|
|
29
|
+
Requires-Dist: sentence-transformers>=2.2.0
|
|
30
|
+
Requires-Dist: chromadb>=0.4.0
|
|
31
|
+
Requires-Dist: PyYAML>=6.0
|
|
32
|
+
Requires-Dist: transformers>=4.30.0
|
|
33
|
+
Provides-Extra: pdf
|
|
34
|
+
Requires-Dist: PyPDF2>=3.0.0; extra == "pdf"
|
|
35
|
+
Provides-Extra: export
|
|
36
|
+
Requires-Dist: playwright>=1.40.0; extra == "export"
|
|
37
|
+
Provides-Extra: ragas
|
|
38
|
+
Requires-Dist: ragas<0.5.0,>=0.4.0; extra == "ragas"
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# ragcheck - Lighthouse for RAG Systems
|
|
42
|
+
|
|
43
|
+
[](https://badge.fury.io/py/ragcheck-cli)
|
|
44
|
+
[](https://www.python.org/)
|
|
45
|
+
[](https://opensource.org/licenses/MIT)
|
|
46
|
+
|
|
47
|
+
> One command to diagnose your RAG pipeline and get actionable fixes.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install ragcheck-cli
|
|
51
|
+
ragcheck init
|
|
52
|
+
ragcheck run --docs ./data --query "What is Article 370?"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## What is ragcheck?
|
|
56
|
+
|
|
57
|
+
**ragcheck** is a lightweight, one-command diagnostic CLI that generates a beautiful, shareable HTML report analyzing why your RAG system fails and how to fix it.
|
|
58
|
+
|
|
59
|
+
Think of it as **Lighthouse for RAG systems** — just like Lighthouse audits web pages, ragcheck audits your retrieval pipeline.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- **Auto-Generated Test Suite** - 50 synthetic questions from your documents
|
|
64
|
+
- **Chunk Visualizer** - See exactly where your chunking breaks
|
|
65
|
+
- **Retrieval Heatmap** - Identify dead chunks and dominant chunks
|
|
66
|
+
- **Failure Classification** - Know WHY your RAG fails, not just THAT it fails
|
|
67
|
+
- **Actionable Recommendations** - Specific fixes with predicted impact
|
|
68
|
+
- **CI/CD Integration** - Fail builds when RAG quality regresses
|
|
69
|
+
|
|
70
|
+
## Quick Start
|
|
71
|
+
|
|
72
|
+
### Installation
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install ragcheck-cli
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Or with [uv](https://github.com/astral-sh/uv):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
uv tool install ragcheck-cli
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Initialize
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
ragcheck init
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Creates a `ragcheck.yaml` config file in your project.
|
|
91
|
+
|
|
92
|
+
### Run Analysis
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
ragcheck run --docs ./data --query "Your test query"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Generates `ragcheck_report.html` with:
|
|
99
|
+
- Scorecards (retrieval accuracy, faithfulness)
|
|
100
|
+
- Chunk boundary visualization
|
|
101
|
+
- Retrieval heatmap
|
|
102
|
+
- Failure mode classification
|
|
103
|
+
- Before/after score predictions
|
|
104
|
+
|
|
105
|
+
### CI Mode
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
ragcheck run --docs ./data --ci --min-score 0.80
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Returns exit code 0/1. Use in GitHub Actions to fail builds on quality regression.
|
|
112
|
+
|
|
113
|
+
## Example Report
|
|
114
|
+
|
|
115
|
+

|
|
116
|
+
|
|
117
|
+
## Architecture
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
ragcheck CLI
|
|
121
|
+
├── Chunk Analyzer (6 strategies + benchmark)
|
|
122
|
+
├── Retriever Tester (auto-QA + dense retrieval)
|
|
123
|
+
├── Failure Classifier (4 failure modes)
|
|
124
|
+
├── Recommendation Engine (decision tree)
|
|
125
|
+
└── Report Engine (Jinja2 + CSS/HTML)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Tech Stack
|
|
129
|
+
|
|
130
|
+
| Component | Tool |
|
|
131
|
+
|-----------|------|
|
|
132
|
+
| CLI | Typer + Rich |
|
|
133
|
+
| Config | Pydantic |
|
|
134
|
+
| Embeddings | sentence-transformers |
|
|
135
|
+
| Vector DB | ChromaDB |
|
|
136
|
+
| LLM Interface | LiteLLM |
|
|
137
|
+
| Reports | Jinja2 + CSS/HTML |
|
|
138
|
+
|
|
139
|
+
## Configuration
|
|
140
|
+
|
|
141
|
+
`ragcheck.yaml`:
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
project_name: ragcheck
|
|
145
|
+
docs_path: ./data
|
|
146
|
+
chunking:
|
|
147
|
+
strategy: recursive
|
|
148
|
+
chunk_size: 512
|
|
149
|
+
chunk_overlap: 128
|
|
150
|
+
llm:
|
|
151
|
+
provider: openai
|
|
152
|
+
model: gpt-3.5-turbo
|
|
153
|
+
retrieval:
|
|
154
|
+
top_k: 5
|
|
155
|
+
similarity_threshold: 0.7
|
|
156
|
+
report:
|
|
157
|
+
format: html
|
|
158
|
+
include_heatmap: true
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
git clone https://github.com/pranay7863/ragcheck.git
|
|
165
|
+
cd ragcheck
|
|
166
|
+
uv sync
|
|
167
|
+
uv run pytest
|
|
168
|
+
uv run ruff check .
|
|
169
|
+
uv run mypy ragcheck/
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Contributing
|
|
173
|
+
|
|
174
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT — see [LICENSE](LICENSE)
|
|
179
|
+
|
|
180
|
+
## Roadmap
|
|
181
|
+
|
|
182
|
+
- [x] v0.2.0 — Offline reports, NLI faithfulness, scaled auto-QA, chunk viz
|
|
183
|
+
- [ ] v0.3.0 — More vector DBs (Pinecone, Weaviate)
|
|
184
|
+
- [ ] v0.3.0 — SaaS API for teams
|
|
185
|
+
- [ ] v0.4.0 — Enterprise features (SSO, audit logs)
|
|
186
|
+
|
|
187
|
+
## Support
|
|
188
|
+
|
|
189
|
+
- [GitHub](https://github.com/pranay7863/ragcheck)
|
|
190
|
+
- Twitter: [@mane_pranay](https://twitter.com/mane_pranay)
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
**Built with discipline.** Read the [blueprint](docs/ARCHITECTURE.md) that started it all.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# ragcheck - Lighthouse for RAG Systems
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/py/ragcheck)
|
|
3
|
+
[](https://badge.fury.io/py/ragcheck-cli)
|
|
4
4
|
[](https://www.python.org/)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
7
|
> One command to diagnose your RAG pipeline and get actionable fixes.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
pip install ragcheck
|
|
10
|
+
pip install ragcheck-cli
|
|
11
11
|
ragcheck init
|
|
12
12
|
ragcheck run --docs ./data --query "What is Article 370?"
|
|
13
13
|
```
|
|
@@ -32,13 +32,13 @@ Think of it as **Lighthouse for RAG systems** — just like Lighthouse audits we
|
|
|
32
32
|
### Installation
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
pip install ragcheck
|
|
35
|
+
pip install ragcheck-cli
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Or with [uv](https://github.com/astral-sh/uv):
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
uv tool install ragcheck
|
|
41
|
+
uv tool install ragcheck-cli
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### Initialize
|
|
@@ -72,7 +72,7 @@ Returns exit code 0/1. Use in GitHub Actions to fail builds on quality regressio
|
|
|
72
72
|
|
|
73
73
|
## Example Report
|
|
74
74
|
|
|
75
|
-

|
|
76
76
|
|
|
77
77
|
## Architecture
|
|
78
78
|
|
|
@@ -82,7 +82,7 @@ ragcheck CLI
|
|
|
82
82
|
├── Retriever Tester (auto-QA + dense retrieval)
|
|
83
83
|
├── Failure Classifier (4 failure modes)
|
|
84
84
|
├── Recommendation Engine (decision tree)
|
|
85
|
-
└── Report Engine (Jinja2 + CSS/HTML
|
|
85
|
+
└── Report Engine (Jinja2 + CSS/HTML)
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
## Tech Stack
|
|
@@ -146,8 +146,8 @@ MIT — see [LICENSE](LICENSE)
|
|
|
146
146
|
|
|
147
147
|
## Support
|
|
148
148
|
|
|
149
|
-
- [GitHub
|
|
150
|
-
- Twitter: [@
|
|
149
|
+
- [GitHub](https://github.com/pranay7863/ragcheck)
|
|
150
|
+
- Twitter: [@mane_pranay](https://twitter.com/mane_pranay)
|
|
151
151
|
|
|
152
152
|
---
|
|
153
153
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ragcheck-cli"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Lighthouse for RAG systems — diagnose and fix your retrieval pipeline"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = {text = "MIT"}
|
|
@@ -48,11 +48,12 @@ Repository = "https://github.com/pranay7863/ragcheck"
|
|
|
48
48
|
Issues = "https://github.com/pranay7863/ragcheck/issues"
|
|
49
49
|
|
|
50
50
|
[build-system]
|
|
51
|
-
requires = ["
|
|
52
|
-
build-backend = "
|
|
51
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
52
|
+
build-backend = "setuptools.build_meta"
|
|
53
53
|
|
|
54
|
-
[tool.
|
|
55
|
-
|
|
54
|
+
[tool.setuptools.packages.find]
|
|
55
|
+
where = ["."]
|
|
56
|
+
include = ["ragcheck*"]
|
|
56
57
|
|
|
57
58
|
[tool.ruff]
|
|
58
59
|
line-length = 100
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ragcheck-cli
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Lighthouse for RAG systems — diagnose and fix your retrieval pipeline
|
|
5
|
+
Author-email: Pranay Mane <pranaymane78@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pranay7863/ragcheck
|
|
8
|
+
Project-URL: Documentation, https://github.com/pranay7863/ragcheck/blob/main/README.md
|
|
9
|
+
Project-URL: Repository, https://github.com/pranay7863/ragcheck
|
|
10
|
+
Project-URL: Issues, https://github.com/pranay7863/ragcheck/issues
|
|
11
|
+
Keywords: rag,llm,evaluation,retrieval,ai,chunking,diagnostics
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: typer>=0.12.0
|
|
24
|
+
Requires-Dist: rich>=13.0.0
|
|
25
|
+
Requires-Dist: jinja2>=3.1.0
|
|
26
|
+
Requires-Dist: nltk>=3.9.0
|
|
27
|
+
Requires-Dist: pydantic>=2.5.0
|
|
28
|
+
Requires-Dist: litellm>=1.0.0
|
|
29
|
+
Requires-Dist: sentence-transformers>=2.2.0
|
|
30
|
+
Requires-Dist: chromadb>=0.4.0
|
|
31
|
+
Requires-Dist: PyYAML>=6.0
|
|
32
|
+
Requires-Dist: transformers>=4.30.0
|
|
33
|
+
Provides-Extra: pdf
|
|
34
|
+
Requires-Dist: PyPDF2>=3.0.0; extra == "pdf"
|
|
35
|
+
Provides-Extra: export
|
|
36
|
+
Requires-Dist: playwright>=1.40.0; extra == "export"
|
|
37
|
+
Provides-Extra: ragas
|
|
38
|
+
Requires-Dist: ragas<0.5.0,>=0.4.0; extra == "ragas"
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# ragcheck - Lighthouse for RAG Systems
|
|
42
|
+
|
|
43
|
+
[](https://badge.fury.io/py/ragcheck-cli)
|
|
44
|
+
[](https://www.python.org/)
|
|
45
|
+
[](https://opensource.org/licenses/MIT)
|
|
46
|
+
|
|
47
|
+
> One command to diagnose your RAG pipeline and get actionable fixes.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install ragcheck-cli
|
|
51
|
+
ragcheck init
|
|
52
|
+
ragcheck run --docs ./data --query "What is Article 370?"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## What is ragcheck?
|
|
56
|
+
|
|
57
|
+
**ragcheck** is a lightweight, one-command diagnostic CLI that generates a beautiful, shareable HTML report analyzing why your RAG system fails and how to fix it.
|
|
58
|
+
|
|
59
|
+
Think of it as **Lighthouse for RAG systems** — just like Lighthouse audits web pages, ragcheck audits your retrieval pipeline.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- **Auto-Generated Test Suite** - 50 synthetic questions from your documents
|
|
64
|
+
- **Chunk Visualizer** - See exactly where your chunking breaks
|
|
65
|
+
- **Retrieval Heatmap** - Identify dead chunks and dominant chunks
|
|
66
|
+
- **Failure Classification** - Know WHY your RAG fails, not just THAT it fails
|
|
67
|
+
- **Actionable Recommendations** - Specific fixes with predicted impact
|
|
68
|
+
- **CI/CD Integration** - Fail builds when RAG quality regresses
|
|
69
|
+
|
|
70
|
+
## Quick Start
|
|
71
|
+
|
|
72
|
+
### Installation
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install ragcheck-cli
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Or with [uv](https://github.com/astral-sh/uv):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
uv tool install ragcheck-cli
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Initialize
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
ragcheck init
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Creates a `ragcheck.yaml` config file in your project.
|
|
91
|
+
|
|
92
|
+
### Run Analysis
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
ragcheck run --docs ./data --query "Your test query"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Generates `ragcheck_report.html` with:
|
|
99
|
+
- Scorecards (retrieval accuracy, faithfulness)
|
|
100
|
+
- Chunk boundary visualization
|
|
101
|
+
- Retrieval heatmap
|
|
102
|
+
- Failure mode classification
|
|
103
|
+
- Before/after score predictions
|
|
104
|
+
|
|
105
|
+
### CI Mode
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
ragcheck run --docs ./data --ci --min-score 0.80
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Returns exit code 0/1. Use in GitHub Actions to fail builds on quality regression.
|
|
112
|
+
|
|
113
|
+
## Example Report
|
|
114
|
+
|
|
115
|
+

|
|
116
|
+
|
|
117
|
+
## Architecture
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
ragcheck CLI
|
|
121
|
+
├── Chunk Analyzer (6 strategies + benchmark)
|
|
122
|
+
├── Retriever Tester (auto-QA + dense retrieval)
|
|
123
|
+
├── Failure Classifier (4 failure modes)
|
|
124
|
+
├── Recommendation Engine (decision tree)
|
|
125
|
+
└── Report Engine (Jinja2 + CSS/HTML)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Tech Stack
|
|
129
|
+
|
|
130
|
+
| Component | Tool |
|
|
131
|
+
|-----------|------|
|
|
132
|
+
| CLI | Typer + Rich |
|
|
133
|
+
| Config | Pydantic |
|
|
134
|
+
| Embeddings | sentence-transformers |
|
|
135
|
+
| Vector DB | ChromaDB |
|
|
136
|
+
| LLM Interface | LiteLLM |
|
|
137
|
+
| Reports | Jinja2 + CSS/HTML |
|
|
138
|
+
|
|
139
|
+
## Configuration
|
|
140
|
+
|
|
141
|
+
`ragcheck.yaml`:
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
project_name: ragcheck
|
|
145
|
+
docs_path: ./data
|
|
146
|
+
chunking:
|
|
147
|
+
strategy: recursive
|
|
148
|
+
chunk_size: 512
|
|
149
|
+
chunk_overlap: 128
|
|
150
|
+
llm:
|
|
151
|
+
provider: openai
|
|
152
|
+
model: gpt-3.5-turbo
|
|
153
|
+
retrieval:
|
|
154
|
+
top_k: 5
|
|
155
|
+
similarity_threshold: 0.7
|
|
156
|
+
report:
|
|
157
|
+
format: html
|
|
158
|
+
include_heatmap: true
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
git clone https://github.com/pranay7863/ragcheck.git
|
|
165
|
+
cd ragcheck
|
|
166
|
+
uv sync
|
|
167
|
+
uv run pytest
|
|
168
|
+
uv run ruff check .
|
|
169
|
+
uv run mypy ragcheck/
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Contributing
|
|
173
|
+
|
|
174
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT — see [LICENSE](LICENSE)
|
|
179
|
+
|
|
180
|
+
## Roadmap
|
|
181
|
+
|
|
182
|
+
- [x] v0.2.0 — Offline reports, NLI faithfulness, scaled auto-QA, chunk viz
|
|
183
|
+
- [ ] v0.3.0 — More vector DBs (Pinecone, Weaviate)
|
|
184
|
+
- [ ] v0.3.0 — SaaS API for teams
|
|
185
|
+
- [ ] v0.4.0 — Enterprise features (SSO, audit logs)
|
|
186
|
+
|
|
187
|
+
## Support
|
|
188
|
+
|
|
189
|
+
- [GitHub](https://github.com/pranay7863/ragcheck)
|
|
190
|
+
- Twitter: [@mane_pranay](https://twitter.com/mane_pranay)
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
**Built with discipline.** Read the [blueprint](docs/ARCHITECTURE.md) that started it all.
|