ragmint 0.3.1__py3-none-any.whl
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.
Potentially problematic release.
This version of ragmint might be problematic. Click here for more details.
- ragmint/__init__.py +0 -0
- ragmint/__main__.py +28 -0
- ragmint/autotuner.py +138 -0
- ragmint/core/__init__.py +0 -0
- ragmint/core/chunking.py +86 -0
- ragmint/core/embeddings.py +55 -0
- ragmint/core/evaluation.py +38 -0
- ragmint/core/pipeline.py +62 -0
- ragmint/core/reranker.py +62 -0
- ragmint/core/retriever.py +165 -0
- ragmint/experiments/__init__.py +0 -0
- ragmint/experiments/validation_qa.json +14 -0
- ragmint/explainer.py +63 -0
- ragmint/integrations/__init__.py +0 -0
- ragmint/integrations/config_adapter.py +96 -0
- ragmint/integrations/langchain_prebuilder.py +99 -0
- ragmint/leaderboard.py +45 -0
- ragmint/optimization/__init__.py +0 -0
- ragmint/optimization/search.py +48 -0
- ragmint/tests/__init__.py +0 -0
- ragmint/tests/conftest.py +16 -0
- ragmint/tests/test_autotuner.py +51 -0
- ragmint/tests/test_config_adapter.py +39 -0
- ragmint/tests/test_embeddings.py +46 -0
- ragmint/tests/test_explainer.py +20 -0
- ragmint/tests/test_explainer_integration.py +18 -0
- ragmint/tests/test_integration_autotuner_ragmint.py +47 -0
- ragmint/tests/test_langchain_prebuilder.py +82 -0
- ragmint/tests/test_leaderboard.py +39 -0
- ragmint/tests/test_pipeline.py +20 -0
- ragmint/tests/test_retriever.py +15 -0
- ragmint/tests/test_search.py +17 -0
- ragmint/tests/test_tuner.py +71 -0
- ragmint/tuner.py +189 -0
- ragmint/utils/__init__.py +0 -0
- ragmint/utils/caching.py +37 -0
- ragmint/utils/data_loader.py +65 -0
- ragmint/utils/logger.py +36 -0
- ragmint/utils/metrics.py +27 -0
- ragmint-0.3.1.data/data/LICENSE +19 -0
- ragmint-0.3.1.data/data/README.md +397 -0
- ragmint-0.3.1.dist-info/METADATA +441 -0
- ragmint-0.3.1.dist-info/RECORD +46 -0
- ragmint-0.3.1.dist-info/WHEEL +5 -0
- ragmint-0.3.1.dist-info/licenses/LICENSE +19 -0
- ragmint-0.3.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ragmint
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: A modular framework for evaluating and optimizing RAG pipelines.
|
|
5
|
+
Author-email: Andre Oliveira <oandreoliveira@outlook.com>
|
|
6
|
+
License: Apache License 2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/andyolivers/ragmint
|
|
8
|
+
Project-URL: Documentation, https://andyolivers.com
|
|
9
|
+
Project-URL: Issues, https://github.com/andyolivers/ragmint/issues
|
|
10
|
+
Keywords: RAG,LLM,retrieval,optimization,AI,evaluation,chunking,autotuning
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: numpy<2.0.0
|
|
15
|
+
Requires-Dist: pandas>=2.0
|
|
16
|
+
Requires-Dist: scikit-learn>=1.3
|
|
17
|
+
Requires-Dist: sentence-transformers>=2.2.2
|
|
18
|
+
Requires-Dist: chromadb>=0.3.1
|
|
19
|
+
Requires-Dist: faiss-cpu; sys_platform != "darwin"
|
|
20
|
+
Requires-Dist: faiss-cpu==1.7.4; sys_platform == "darwin"
|
|
21
|
+
Requires-Dist: rank-bm25>=0.2.2
|
|
22
|
+
Requires-Dist: optuna>=3.0
|
|
23
|
+
Requires-Dist: tqdm
|
|
24
|
+
Requires-Dist: colorama
|
|
25
|
+
Requires-Dist: pyyaml
|
|
26
|
+
Requires-Dist: python-dotenv
|
|
27
|
+
Requires-Dist: openai>=1.0.0
|
|
28
|
+
Requires-Dist: google-generativeai>=0.8.0
|
|
29
|
+
Requires-Dist: anthropic>=0.25.0
|
|
30
|
+
Requires-Dist: supabase>=2.4.0
|
|
31
|
+
Requires-Dist: pytest
|
|
32
|
+
Requires-Dist: langchain>=0.2.5
|
|
33
|
+
Requires-Dist: langchain-community>=0.2.5
|
|
34
|
+
Requires-Dist: langchain-text-splitters>=0.2.1
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: black; extra == "dev"
|
|
37
|
+
Requires-Dist: flake8; extra == "dev"
|
|
38
|
+
Requires-Dist: isort; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
40
|
+
Provides-Extra: docs
|
|
41
|
+
Requires-Dist: mkdocs; extra == "docs"
|
|
42
|
+
Requires-Dist: mkdocs-material; extra == "docs"
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
|
|
45
|
+
# Ragmint
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+

|
|
49
|
+

|
|
50
|
+

|
|
51
|
+

|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
**Ragmint** (Retrieval-Augmented Generation Model Inspection & Tuning) is a modular, developer-friendly Python library for **evaluating, optimizing, and tuning RAG (Retrieval-Augmented Generation) pipelines**.
|
|
56
|
+
|
|
57
|
+
It provides a complete toolkit for **retriever selection**, **embedding model tuning**, **automated RAG evaluation**, and **config-driven prebuilding** of pipelines with support for **Optuna-based Bayesian optimization**, **Auto-RAG tuning**, **chunking**, and **explainability** through Gemini or Claude.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## ✨ Features
|
|
62
|
+
|
|
63
|
+
- ✅ **Automated hyperparameter optimization** (Grid, Random, Bayesian via Optuna)
|
|
64
|
+
- 🤖 **Auto-RAG Tuner** — dynamically recommends retriever–embedding pairs based on corpus size
|
|
65
|
+
- 🧠 **Explainability Layer** — interprets RAG performance via Gemini or Claude APIs
|
|
66
|
+
- 🏆 **Leaderboard Tracking** — stores and ranks experiment runs via JSON or external DB
|
|
67
|
+
- 🔍 **Built-in RAG evaluation metrics** — faithfulness, recall, BLEU, ROUGE, latency
|
|
68
|
+
- ⚙️ **Retrievers** — FAISS, Chroma, scikit-learn
|
|
69
|
+
- 🧩 **Embeddings** — Hugging Face
|
|
70
|
+
- 💾 **Caching, experiment tracking, and reproducibility** out of the box
|
|
71
|
+
- 🧰 **Clean modular structure** for easy integration in research and production setups
|
|
72
|
+
- 📦 **Chunking system** — automatic or configurable chunk_size and overlap for documents
|
|
73
|
+
- 🏗️ **Langchain Prebuilder** — prepares pipelines, applies chunking, embeddings, and vector store creation automatically
|
|
74
|
+
- ⚙️ **Config Adapter (LangchainConfigAdapter)** — normalizes configuration, fills defaults, validates retrievers
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 🚀 Quick Start
|
|
79
|
+
|
|
80
|
+
### 1️⃣ Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/andyolivers/ragmint.git
|
|
84
|
+
cd ragmint
|
|
85
|
+
pip install -e .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> The `-e` flag installs Ragmint in editable (development) mode.
|
|
89
|
+
> Requires **Python ≥ 3.9**.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### 2️⃣ Run a RAG Optimization Experiment
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python ragmint/main.py --config configs/default.yaml --search bayesian
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Example `configs/default.yaml`:
|
|
100
|
+
```yaml
|
|
101
|
+
retriever: faiss
|
|
102
|
+
embedding_model: text-embedding-3-small
|
|
103
|
+
chunk_size: 500
|
|
104
|
+
overlap: 100
|
|
105
|
+
reranker:
|
|
106
|
+
mode: mmr
|
|
107
|
+
lambda_param: 0.5
|
|
108
|
+
optimization:
|
|
109
|
+
search_method: bayesian
|
|
110
|
+
n_trials: 20
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### 3️⃣ Manual Pipeline Usage
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
from ragmint.prebuilder import PreBuilder
|
|
119
|
+
from ragmint.tuner import RAGMint
|
|
120
|
+
|
|
121
|
+
# Prebuild pipeline (chunking, embeddings, vector store)
|
|
122
|
+
prebuilder = PreBuilder(
|
|
123
|
+
docs_path="data/docs/",
|
|
124
|
+
config_path="configs/default.yaml"
|
|
125
|
+
)
|
|
126
|
+
pipeline = prebuilder.build_pipeline()
|
|
127
|
+
|
|
128
|
+
# Initialize RAGMint with prebuilt components
|
|
129
|
+
rag = RAGMint(pipeline=pipeline)
|
|
130
|
+
|
|
131
|
+
# Run optimization
|
|
132
|
+
best, results = rag.optimize(validation_set=None, metric="faithfulness", trials=3)
|
|
133
|
+
print("Best configuration:", best)
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
---
|
|
137
|
+
# 🧩 Embeddings and Retrievers
|
|
138
|
+
|
|
139
|
+
**Ragmint** supports a flexible set of embeddings and retrievers, allowing you to adapt easily to various **RAG architectures**.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
## 🧩 Chunking System
|
|
143
|
+
|
|
144
|
+
* **Automatically splits documents** into chunks with `chunk_size` and `overlap` parameters.
|
|
145
|
+
* **Supports default values** if not provided in configuration.
|
|
146
|
+
* **Optimized** for downstream **retrieval and embeddings**.
|
|
147
|
+
* **Enables adaptive chunking strategies** in future releases.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
## 🧩 Langchain Config Adapter
|
|
151
|
+
|
|
152
|
+
* **Ensures consistent configuration** across pipeline components.
|
|
153
|
+
* **Normalizes retriever and embedding names** (e.g., `faiss`, `sentence-transformers/...`).
|
|
154
|
+
* **Adds default chunk parameters** when missing.
|
|
155
|
+
* **Validates retriever backends** and **raises clear errors** for unsupported options.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
## 🧩 Langchain Prebuilder
|
|
159
|
+
|
|
160
|
+
**Automates pipeline preparation:**
|
|
161
|
+
1. Reads documents
|
|
162
|
+
2. Applies chunking
|
|
163
|
+
3. Creates embeddings
|
|
164
|
+
4. Initializes retriever / vector store
|
|
165
|
+
5. Returns ready-to-use pipeline** for RAGMint or custom usage.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 🔤 Available Embeddings (Hugging Face)
|
|
170
|
+
|
|
171
|
+
You can select from the following models:
|
|
172
|
+
|
|
173
|
+
* `sentence-transformers/all-MiniLM-L6-v2` — **lightweight**, general-purpose
|
|
174
|
+
* `sentence-transformers/all-mpnet-base-v2` — **higher accuracy**, slower
|
|
175
|
+
* `BAAI/bge-base-en-v1.5` — **multilingual**, dense embeddings
|
|
176
|
+
* `intfloat/multilingual-e5-base` — ideal for **multilingual corpora**
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Configuration Example
|
|
181
|
+
|
|
182
|
+
Use the following format in your config file to specify the embedding model:
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
embedding_model: sentence-transformers/all-MiniLM-L6-v2
|
|
186
|
+
```
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## 🔍 Available Retrievers
|
|
190
|
+
|
|
191
|
+
**Ragmint** integrates multiple **retrieval backends** to suit different needs:
|
|
192
|
+
|
|
193
|
+
| Retriever | Description |
|
|
194
|
+
| :--- | :--- |
|
|
195
|
+
| **FAISS** | Fast vector similarity search; efficient for dense embeddings |
|
|
196
|
+
| **Chroma** | Persistent vector DB; works well for incremental updates |
|
|
197
|
+
| **scikit-learn (NearestNeighbors)** | Lightweight, zero-dependency local retriever |
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
### Configuration Example
|
|
201
|
+
|
|
202
|
+
To specify the retriever in your configuration file, use the following format:
|
|
203
|
+
|
|
204
|
+
```yaml
|
|
205
|
+
retriever: faiss
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 🧪 Dataset Options
|
|
211
|
+
|
|
212
|
+
Ragmint can automatically load evaluation datasets for your RAG pipeline:
|
|
213
|
+
|
|
214
|
+
| Mode | Example | Description |
|
|
215
|
+
|------|----------|-------------|
|
|
216
|
+
| 🧱 **Default** | `validation_set=None` | Uses built-in `experiments/validation_qa.json` |
|
|
217
|
+
| 📁 **Custom File** | `validation_set="data/my_eval.json"` | Load your own QA dataset (JSON or CSV) |
|
|
218
|
+
| 🌐 **Hugging Face Dataset** | `validation_set="squad"` | Automatically downloads benchmark datasets (requires `pip install datasets`) |
|
|
219
|
+
|
|
220
|
+
### Example
|
|
221
|
+
|
|
222
|
+
```python
|
|
223
|
+
from ragmint.tuner import RAGMint
|
|
224
|
+
|
|
225
|
+
ragmint = RAGMint(
|
|
226
|
+
docs_path="data/docs/",
|
|
227
|
+
retrievers=["faiss", "chroma"],
|
|
228
|
+
embeddings=["text-embedding-3-small"],
|
|
229
|
+
rerankers=["mmr"],
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
# Use built-in default
|
|
233
|
+
ragmint.optimize(validation_set=None)
|
|
234
|
+
|
|
235
|
+
# Use Hugging Face benchmark
|
|
236
|
+
ragmint.optimize(validation_set="squad")
|
|
237
|
+
|
|
238
|
+
# Use your own dataset
|
|
239
|
+
ragmint.optimize(validation_set="data/custom_qa.json")
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## 🧠 Auto-RAG Tuner
|
|
245
|
+
|
|
246
|
+
The **AutoRAGTuner** automatically recommends retriever–embedding combinations
|
|
247
|
+
based on corpus size and average document length.
|
|
248
|
+
|
|
249
|
+
```python
|
|
250
|
+
from ragmint.autotuner import AutoRAGTuner
|
|
251
|
+
|
|
252
|
+
corpus_stats = {"size": 5000, "avg_len": 250}
|
|
253
|
+
tuner = AutoRAGTuner(corpus_stats)
|
|
254
|
+
recommendation = tuner.recommend()
|
|
255
|
+
print(recommendation)
|
|
256
|
+
# Example output: {"retriever": "Chroma", "embedding_model": "SentenceTransformers"}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 🏆 Leaderboard Tracking
|
|
262
|
+
|
|
263
|
+
Track and visualize your best experiments across runs.
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
from ragmint.leaderboard import Leaderboard
|
|
267
|
+
|
|
268
|
+
lb = Leaderboard("experiments/leaderboard.json")
|
|
269
|
+
lb.add_entry({"trial": 1, "faithfulness": 0.87, "latency": 0.12})
|
|
270
|
+
lb.show_top(3)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 🧠 Explainability with Gemini / Claude
|
|
276
|
+
|
|
277
|
+
Compare two RAG configurations and receive **natural language insights** on why one performs better.
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
from ragmint.explainer import explain_results
|
|
281
|
+
|
|
282
|
+
config_a = {"retriever": "FAISS", "embedding_model": "OpenAI"}
|
|
283
|
+
config_b = {"retriever": "Chroma", "embedding_model": "SentenceTransformers"}
|
|
284
|
+
|
|
285
|
+
explanation = explain_results(config_a, config_b, model="gemini")
|
|
286
|
+
print(explanation)
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
> Set your API keys in a `.env` file or via environment variables:
|
|
290
|
+
> ```
|
|
291
|
+
> export GEMINI_API_KEY="your_gemini_key"
|
|
292
|
+
> export ANTHROPIC_API_KEY="your_claude_key"
|
|
293
|
+
> ```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 🧩 Folder Structure
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
ragmint/
|
|
301
|
+
├── core/
|
|
302
|
+
│ ├── pipeline.py
|
|
303
|
+
│ ├── retriever.py
|
|
304
|
+
│ ├── reranker.py
|
|
305
|
+
│ ├── embeddings.py
|
|
306
|
+
│ ├── chunking.py
|
|
307
|
+
│ └── evaluation.py
|
|
308
|
+
├── integration/
|
|
309
|
+
│ ├── config_adapter.py
|
|
310
|
+
│ └── langchain_prebuilder.py
|
|
311
|
+
├── autotuner.py
|
|
312
|
+
├── explainer.py
|
|
313
|
+
├── leaderboard.py
|
|
314
|
+
├── tuner.py
|
|
315
|
+
├── utils/
|
|
316
|
+
├── configs/
|
|
317
|
+
├── experiments/
|
|
318
|
+
├── tests/
|
|
319
|
+
└── main.py
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 🧪 Running Tests
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
pytest -v
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
To include integration tests with Gemini or Claude APIs:
|
|
331
|
+
```bash
|
|
332
|
+
pytest -m integration
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## ⚙️ Configuration via `pyproject.toml`
|
|
338
|
+
|
|
339
|
+
Your `pyproject.toml` includes all required dependencies:
|
|
340
|
+
|
|
341
|
+
```toml
|
|
342
|
+
[project]
|
|
343
|
+
name = "ragmint"
|
|
344
|
+
version = "0.1.0"
|
|
345
|
+
dependencies = [
|
|
346
|
+
# Core ML + Embeddings
|
|
347
|
+
"numpy<2.0.0",
|
|
348
|
+
"pandas>=2.0",
|
|
349
|
+
"scikit-learn>=1.3",
|
|
350
|
+
"sentence-transformers>=2.2.2",
|
|
351
|
+
|
|
352
|
+
# Retrieval backends
|
|
353
|
+
"chromadb>=0.4",
|
|
354
|
+
"faiss-cpu; sys_platform != 'darwin'", # For Linux/Windows
|
|
355
|
+
"faiss-cpu==1.7.4; sys_platform == 'darwin'", # Optional fix for macOS MPS
|
|
356
|
+
"rank-bm25>=0.2.2", # For BM25 retriever
|
|
357
|
+
|
|
358
|
+
# Optimization & evaluation
|
|
359
|
+
"optuna>=3.0",
|
|
360
|
+
"tqdm",
|
|
361
|
+
"colorama",
|
|
362
|
+
|
|
363
|
+
# RAG evaluation and data utils
|
|
364
|
+
"pyyaml",
|
|
365
|
+
"python-dotenv",
|
|
366
|
+
|
|
367
|
+
# Explainability and LLM APIs
|
|
368
|
+
"openai>=1.0.0",
|
|
369
|
+
"google-generativeai>=0.8.0",
|
|
370
|
+
"anthropic>=0.25.0",
|
|
371
|
+
|
|
372
|
+
# Integration / storage
|
|
373
|
+
"supabase>=2.4.0",
|
|
374
|
+
|
|
375
|
+
# Testing
|
|
376
|
+
"pytest",
|
|
377
|
+
|
|
378
|
+
# LangChain integration layer
|
|
379
|
+
"langchain>=0.2.5",
|
|
380
|
+
"langchain-community>=0.2.5",
|
|
381
|
+
"langchain-text-splitters>=0.2.1"
|
|
382
|
+
]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## 📊 Example Experiment Workflow
|
|
388
|
+
|
|
389
|
+
1. Define your retriever, embedding, and reranker setup
|
|
390
|
+
2. Launch optimization (Grid, Random, Bayesian) or AutoTune
|
|
391
|
+
3. Compare performance with explainability
|
|
392
|
+
4. Persist results to leaderboard for later inspection
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## 🧬 Architecture Overview
|
|
397
|
+
|
|
398
|
+
```mermaid
|
|
399
|
+
flowchart TD
|
|
400
|
+
A[Query] --> B[Embedder]
|
|
401
|
+
B --> C[Retriever]
|
|
402
|
+
C --> D[Reranker]
|
|
403
|
+
D --> E[Generator]
|
|
404
|
+
E --> F[Evaluation]
|
|
405
|
+
F --> G[Optuna / AutoRAGTuner]
|
|
406
|
+
G -->|Best Params| B
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## 📘 Example Output
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
[INFO] Starting Bayesian optimization with Optuna
|
|
415
|
+
[INFO] Trial 7 finished: faithfulness=0.83, latency=0.42s
|
|
416
|
+
[INFO] Best parameters: {'lambda_param': 0.6, 'retriever': 'faiss'}
|
|
417
|
+
[INFO] AutoRAGTuner: Suggested retriever=Chroma for medium corpus
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## 🧠 Why Ragmint?
|
|
423
|
+
|
|
424
|
+
- Built for **RAG researchers**, **AI engineers**, and **LLM ops**
|
|
425
|
+
- Works with **LangChain**, **LlamaIndex**, or standalone setups
|
|
426
|
+
- Designed for **extensibility** — plug in your own retrievers, models, or metrics
|
|
427
|
+
- Integrated **explainability and leaderboard** modules for research and production
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## ⚖️ License
|
|
432
|
+
|
|
433
|
+
Licensed under the **Apache License 2.0** — free for personal, research, and commercial use.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## 👤 Author
|
|
438
|
+
|
|
439
|
+
**André Oliveira**
|
|
440
|
+
[andyolivers.com](https://andyolivers.com)
|
|
441
|
+
Data Scientist | AI Engineer
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
ragmint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
ragmint/__main__.py,sha256=q7hBn56Z1xAckbs03i8ynsuOzJVUXmod2qHddX7gkpc,729
|
|
3
|
+
ragmint/autotuner.py,sha256=0YGQP8TYMDJT64hxz08kJXyFu5Sf8S79lgNoViC_vB8,4653
|
|
4
|
+
ragmint/explainer.py,sha256=KT9ef4xUcHXPh2JaWhqzoxc64y7AB1LeyIDJz_ZXH_s,2203
|
|
5
|
+
ragmint/leaderboard.py,sha256=nILQ5QR63RpZtCrZ__RFfwHXy4bkUIMUcSfH92OQ93Y,1628
|
|
6
|
+
ragmint/tuner.py,sha256=Un5hWijEO-YtoJsgqUVn6SQwn5O-tSjpqtpC-gOVSms,6574
|
|
7
|
+
ragmint/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
ragmint/core/chunking.py,sha256=cwxRUTs1u8Pe4xQso0G5doA_9AFCMyxB5Hxe8GJUoE4,2711
|
|
9
|
+
ragmint/core/embeddings.py,sha256=WOd58_Z-xir66Q7tLAldfDO_x-wAieMKKXsMfhw7OF4,1875
|
|
10
|
+
ragmint/core/evaluation.py,sha256=3OFcZU2zZyaP53d9S2zdpknV0CYfTq0KoRB3a_dtjM4,1022
|
|
11
|
+
ragmint/core/pipeline.py,sha256=xqLE-NiMDoC5NYCP0O984-eoyQOD4nnCsu6nq4DQEdI,2058
|
|
12
|
+
ragmint/core/reranker.py,sha256=B2-NDExqpd9jdXHkEHOXC0B_6-FMJm5vdi-_ZbxC3Os,2303
|
|
13
|
+
ragmint/core/retriever.py,sha256=bKaJr9vfGPEMAjLBfRhCpAH1bzlJgjDKx0r6ZRWfyuY,6010
|
|
14
|
+
ragmint/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
ragmint/experiments/validation_qa.json,sha256=mQyGeMyvyAqN5yGjpjqW42JJ7FfhFYNki__paKVhQss,520
|
|
16
|
+
ragmint/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
ragmint/integrations/config_adapter.py,sha256=gE6M4abT1cREDd648XaKR3qS11Nz-ULdtNgx9uCrjl4,3405
|
|
18
|
+
ragmint/integrations/langchain_prebuilder.py,sha256=B0_ht1f3cWZ5NStRLypIGs0G2eUDs1tEZPAXtwBvGVM,3495
|
|
19
|
+
ragmint/optimization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
ragmint/optimization/search.py,sha256=uiLJeoO_jaLCQEw99L6uI1rnqHHx_rTY81WxfMmlALs,1623
|
|
21
|
+
ragmint/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
ragmint/tests/conftest.py,sha256=QhYPp5nrQ_DbZlsVH3nLjDgjPATAnLwzJkwl-Y-xrmM,488
|
|
23
|
+
ragmint/tests/test_autotuner.py,sha256=mxtV2pS4bSTWZ27Z1wpPMbj3s3WutlF7vSarfUc2rUM,1803
|
|
24
|
+
ragmint/tests/test_config_adapter.py,sha256=GlLlvVLQb2jMKTrLQgqzPiTsYvTGZZ8XOxCM9fdZhJI,1358
|
|
25
|
+
ragmint/tests/test_embeddings.py,sha256=KSqxdMy8e8Ekjh_JID5-Eb9gVDXDjOwZUIh36DoWBTw,1354
|
|
26
|
+
ragmint/tests/test_explainer.py,sha256=K_DRnGGl34WcTA2yaQGmfzWkVi1uEkzjpsTPeZxXeIg,802
|
|
27
|
+
ragmint/tests/test_explainer_integration.py,sha256=tmd61DBbSHDzdkXB6ccCmPcISBr6P-2fY7tc-3dXr-4,620
|
|
28
|
+
ragmint/tests/test_integration_autotuner_ragmint.py,sha256=_WQRl7rvd_4GXSiqp0Virz-3f5YqS8X550u0613RMlM,1678
|
|
29
|
+
ragmint/tests/test_langchain_prebuilder.py,sha256=5jjitN3muReqbdaD01sNl1h5GH8tfNjpj1UEq3XD5fo,3240
|
|
30
|
+
ragmint/tests/test_leaderboard.py,sha256=ay81YK6KxAUU6mcG6n1_xV8GPYkBgjzJj9iAIyAzIzA,1163
|
|
31
|
+
ragmint/tests/test_pipeline.py,sha256=wj7dEuqz6vnoMc-V05j0DifWsXfmO5xGzD5i24V8aQI,667
|
|
32
|
+
ragmint/tests/test_retriever.py,sha256=eMXtnH7T5Sgf439iCF0zg_DSNxly9cGJuLFzjaiuGIA,473
|
|
33
|
+
ragmint/tests/test_search.py,sha256=FcC-DEnw9veAEyMnFoRw9DAwzqJC9F6-r63Nqo2nO58,598
|
|
34
|
+
ragmint/tests/test_tuner.py,sha256=CylYlE7yC-wCCZo5P_tqFDtjfIiAz-LOW4ZmWDYT0Z8,2316
|
|
35
|
+
ragmint/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
+
ragmint/utils/caching.py,sha256=LPE2JorOQ90BgVf6NUiS0-bdt-FGpNxDy7FnuwEHzy0,1060
|
|
37
|
+
ragmint/utils/data_loader.py,sha256=GXU9Nc3o0UWxtBeRwiskD1aCjSiNNuRoAokIUODn7q8,2024
|
|
38
|
+
ragmint/utils/logger.py,sha256=X7hTNb3st3fUeQIzSghuoV5B8FWXzm_O3DRkSfJvhmI,1033
|
|
39
|
+
ragmint/utils/metrics.py,sha256=DR8mrdumHtQerK0VrugwYKIG1oNptEcsFqodXq3i2kY,717
|
|
40
|
+
ragmint-0.3.1.data/data/LICENSE,sha256=ahkhYfFLI8tGrdxdO2_GaT6OJW2eNwyFT3kYi85QQhc,692
|
|
41
|
+
ragmint-0.3.1.data/data/README.md,sha256=byLE6WSh8BaUoEt4j4ZEKHcsT52UqsCDhKEBidxhX3E,10615
|
|
42
|
+
ragmint-0.3.1.dist-info/licenses/LICENSE,sha256=ahkhYfFLI8tGrdxdO2_GaT6OJW2eNwyFT3kYi85QQhc,692
|
|
43
|
+
ragmint-0.3.1.dist-info/METADATA,sha256=-KIWu0HPayKR7EXmn7Y9HMw-FEBSMtgs78Oh9tC7DB0,12176
|
|
44
|
+
ragmint-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
45
|
+
ragmint-0.3.1.dist-info/top_level.txt,sha256=K2ulzMHuvFm6xayvvJdGABeRJAvKDBn6M3EI-3SbYLw,8
|
|
46
|
+
ragmint-0.3.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
Copyright 2025 André Oliveira
|
|
8
|
+
|
|
9
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
you may not use this file except in compliance with the License.
|
|
11
|
+
You may obtain a copy of the License at
|
|
12
|
+
|
|
13
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
|
|
15
|
+
Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
See the License for the specific language governing permissions and
|
|
19
|
+
limitations under the License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ragmint
|