ragmint 0.2.1__tar.gz → 0.4.2__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.

Potentially problematic release.


This version of ragmint might be problematic. Click here for more details.

Files changed (65) hide show
  1. ragmint-0.4.2/MANIFEST.in +3 -0
  2. ragmint-0.4.2/PKG-INFO +466 -0
  3. ragmint-0.4.2/README.md +423 -0
  4. {ragmint-0.2.1 → ragmint-0.4.2}/pyproject.toml +41 -14
  5. ragmint-0.4.2/src/ragmint/autotuner.py +217 -0
  6. ragmint-0.4.2/src/ragmint/core/chunking.py +86 -0
  7. ragmint-0.4.2/src/ragmint/core/embeddings.py +55 -0
  8. ragmint-0.4.2/src/ragmint/core/pipeline.py +62 -0
  9. ragmint-0.4.2/src/ragmint/core/retriever.py +165 -0
  10. ragmint-0.4.2/src/ragmint/explainer.py +88 -0
  11. ragmint-0.4.2/src/ragmint/integrations/config_adapter.py +96 -0
  12. ragmint-0.4.2/src/ragmint/integrations/langchain_prebuilder.py +99 -0
  13. ragmint-0.4.2/src/ragmint/leaderboard.py +51 -0
  14. ragmint-0.4.2/src/ragmint/tests/test_autotuner.py +64 -0
  15. ragmint-0.4.2/src/ragmint/tests/test_config_adapter.py +39 -0
  16. ragmint-0.4.2/src/ragmint/tests/test_embeddings.py +46 -0
  17. ragmint-0.4.2/src/ragmint/tests/test_explainer.py +36 -0
  18. ragmint-0.4.2/src/ragmint/tests/test_integration_autotuner_ragmint.py +47 -0
  19. ragmint-0.4.2/src/ragmint/tests/test_langchain_prebuilder.py +82 -0
  20. ragmint-0.4.2/src/ragmint/tests/test_leaderboard.py +92 -0
  21. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/tests/test_pipeline.py +3 -2
  22. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/tests/test_retriever.py +3 -2
  23. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/tests/test_tuner.py +1 -1
  24. ragmint-0.4.2/src/ragmint/tuner.py +210 -0
  25. ragmint-0.4.2/src/ragmint/utils/__init__.py +0 -0
  26. ragmint-0.4.2/src/ragmint.egg-info/PKG-INFO +466 -0
  27. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint.egg-info/SOURCES.txt +8 -1
  28. ragmint-0.4.2/src/ragmint.egg-info/requires.txt +34 -0
  29. ragmint-0.2.1/PKG-INFO +0 -27
  30. ragmint-0.2.1/src/ragmint/autotuner.py +0 -33
  31. ragmint-0.2.1/src/ragmint/core/chunking.py +0 -22
  32. ragmint-0.2.1/src/ragmint/core/embeddings.py +0 -19
  33. ragmint-0.2.1/src/ragmint/core/pipeline.py +0 -38
  34. ragmint-0.2.1/src/ragmint/core/retriever.py +0 -33
  35. ragmint-0.2.1/src/ragmint/explainer.py +0 -61
  36. ragmint-0.2.1/src/ragmint/leaderboard.py +0 -45
  37. ragmint-0.2.1/src/ragmint/tests/test_autotuner.py +0 -42
  38. ragmint-0.2.1/src/ragmint/tests/test_explainer.py +0 -20
  39. ragmint-0.2.1/src/ragmint/tests/test_explainer_integration.py +0 -18
  40. ragmint-0.2.1/src/ragmint/tests/test_integration_autotuner_ragmint.py +0 -60
  41. ragmint-0.2.1/src/ragmint/tests/test_leaderboard.py +0 -39
  42. ragmint-0.2.1/src/ragmint/tuner.py +0 -123
  43. ragmint-0.2.1/src/ragmint.egg-info/PKG-INFO +0 -27
  44. ragmint-0.2.1/src/ragmint.egg-info/requires.txt +0 -15
  45. {ragmint-0.2.1 → ragmint-0.4.2}/LICENSE +0 -0
  46. {ragmint-0.2.1 → ragmint-0.4.2}/setup.cfg +0 -0
  47. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/__init__.py +0 -0
  48. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/__main__.py +0 -0
  49. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/core/__init__.py +0 -0
  50. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/core/evaluation.py +0 -0
  51. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/core/reranker.py +0 -0
  52. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/experiments/__init__.py +0 -0
  53. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/experiments/validation_qa.json +0 -0
  54. {ragmint-0.2.1/src/ragmint/optimization → ragmint-0.4.2/src/ragmint/integrations}/__init__.py +0 -0
  55. {ragmint-0.2.1/src/ragmint/tests → ragmint-0.4.2/src/ragmint/optimization}/__init__.py +0 -0
  56. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/optimization/search.py +0 -0
  57. {ragmint-0.2.1/src/ragmint/utils → ragmint-0.4.2/src/ragmint/tests}/__init__.py +0 -0
  58. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/tests/conftest.py +0 -0
  59. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/tests/test_search.py +0 -0
  60. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/utils/caching.py +0 -0
  61. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/utils/data_loader.py +0 -0
  62. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/utils/logger.py +0 -0
  63. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint/utils/metrics.py +0 -0
  64. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint.egg-info/dependency_links.txt +0 -0
  65. {ragmint-0.2.1 → ragmint-0.4.2}/src/ragmint.egg-info/top_level.txt +0 -0
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include src/ragmint/experiments *.json
ragmint-0.4.2/PKG-INFO ADDED
@@ -0,0 +1,466 @@
1
+ Metadata-Version: 2.4
2
+ Name: ragmint
3
+ Version: 0.4.2
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: pytest
31
+ Requires-Dist: langchain>=0.2.5
32
+ Requires-Dist: langchain-community>=0.2.5
33
+ Requires-Dist: langchain-text-splitters>=0.2.1
34
+ Provides-Extra: dev
35
+ Requires-Dist: black; extra == "dev"
36
+ Requires-Dist: flake8; extra == "dev"
37
+ Requires-Dist: isort; extra == "dev"
38
+ Requires-Dist: pytest-cov; extra == "dev"
39
+ Provides-Extra: docs
40
+ Requires-Dist: mkdocs; extra == "docs"
41
+ Requires-Dist: mkdocs-material; extra == "docs"
42
+ Dynamic: license-file
43
+
44
+ # Ragmint
45
+
46
+ ![Python](https://img.shields.io/badge/python-3.9%2B-blue)
47
+ ![License](https://img.shields.io/badge/license-Apache%202.0-green)
48
+ ![Tests](https://github.com/andyolivers/ragmint/actions/workflows/tests.yml/badge.svg)
49
+ ![Optuna](https://img.shields.io/badge/Optuna-Integrated-orange)
50
+ ![Status](https://img.shields.io/badge/Status-Active-success)
51
+
52
+ ![](/assets/images/ragmint-banner.png)
53
+
54
+ **Ragmint** (Retrieval-Augmented Generation Model Inspection & Tuning) is a modular, developer-friendly Python library for **evaluating, optimizing, and tuning RAG (Retrieval-Augmented Generation) pipelines**.
55
+
56
+ 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.
57
+
58
+ ---
59
+
60
+ ## ✨ Features
61
+
62
+ - ✅ **Automated hyperparameter optimization** (Grid, Random, Bayesian via Optuna).
63
+ - 🤖 **Auto-RAG Tuner** — dynamically recommends retriever–embedding pairs based on corpus size and document statistics, **suggests multiple chunk sizes with overlaps**, and can **test configurations to identify the best-performing RAG setup**.
64
+ - 🧠 **Explainability Layer** — interprets RAG performance via Gemini or Claude APIs.
65
+ - 🏆 **Leaderboard Tracking** — stores and ranks experiment runs via JSON or external DB.
66
+ - 🔍 **Built-in RAG evaluation metrics** — faithfulness, recall, BLEU, ROUGE, latency.
67
+ - 📦 **Chunking system** — automatic or configurable `chunk_size` and `overlap` for documents with multiple suggested pairs.
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
+ - 🏗️ **Langchain Prebuilder** — prepares pipelines, applies chunking, embeddings, and vector store creation automatically.
73
+ - ⚙️ **Config Adapter (LangchainConfigAdapter)** — normalizes configuration, fills defaults, validates retrievers.
74
+
75
+ ---
76
+
77
+ ## 🚀 Quick Start
78
+
79
+ ### 1️⃣ Installation
80
+
81
+ ```bash
82
+ git clone https://github.com/andyolivers/ragmint.git
83
+ cd ragmint
84
+ pip install -e .
85
+ ```
86
+
87
+ > The `-e` flag installs Ragmint in editable (development) mode.
88
+ > Requires **Python ≥ 3.9**.
89
+
90
+ ---
91
+
92
+ ### 2️⃣ Run a RAG Optimization Experiment
93
+
94
+ ```bash
95
+ python ragmint/main.py --config configs/default.yaml --search bayesian
96
+ ```
97
+
98
+ Example `configs/default.yaml`:
99
+ ```yaml
100
+ retriever: faiss
101
+ embedding_model: text-embedding-3-small
102
+ chunk_size: 500
103
+ overlap: 100
104
+ reranker:
105
+ mode: mmr
106
+ lambda_param: 0.5
107
+ optimization:
108
+ search_method: bayesian
109
+ n_trials: 20
110
+ ```
111
+
112
+ ---
113
+
114
+ ### 3️⃣ Manual Pipeline Usage
115
+
116
+ ```python
117
+ from ragmint.prebuilder import PreBuilder
118
+ from ragmint.tuner import RAGMint
119
+
120
+ # Prebuild pipeline (chunking, embeddings, vector store)
121
+ prebuilder = PreBuilder(
122
+ docs_path="data/docs/",
123
+ config_path="configs/default.yaml"
124
+ )
125
+ pipeline = prebuilder.build_pipeline()
126
+
127
+ # Initialize RAGMint with prebuilt components
128
+ rag = RAGMint(pipeline=pipeline)
129
+
130
+ # Run optimization
131
+ best, results = rag.optimize(validation_set=None, metric="faithfulness", trials=3)
132
+ print("Best configuration:", best)
133
+
134
+ ```
135
+ ---
136
+ # 🧩 Embeddings and Retrievers
137
+
138
+ **Ragmint** supports a flexible set of embeddings and retrievers, allowing you to adapt easily to various **RAG architectures**.
139
+
140
+ ---
141
+ ## 🧩 Chunking System
142
+
143
+ * **Automatically splits documents** into chunks with `chunk_size` and `overlap` parameters.
144
+ * **Supports default values** if not provided in configuration.
145
+ * **Optimized** for downstream **retrieval and embeddings**.
146
+ * **Enables adaptive chunking strategies** in future releases.
147
+
148
+ ---
149
+ ## 🧩 Langchain Config Adapter
150
+
151
+ * **Ensures consistent configuration** across pipeline components.
152
+ * **Normalizes retriever and embedding names** (e.g., `faiss`, `sentence-transformers/...`).
153
+ * **Adds default chunk parameters** when missing.
154
+ * **Validates retriever backends** and **raises clear errors** for unsupported options.
155
+
156
+ ---
157
+ ## 🧩 Langchain Prebuilder
158
+
159
+ **Automates pipeline preparation:**
160
+ 1. Reads documents
161
+ 2. Applies chunking
162
+ 3. Creates embeddings
163
+ 4. Initializes retriever / vector store
164
+ 5. Returns ready-to-use pipeline** for RAGMint or custom usage.
165
+
166
+ ---
167
+
168
+ ## 🔤 Available Embeddings (Hugging Face)
169
+
170
+ You can select from the following models:
171
+
172
+ * `sentence-transformers/all-MiniLM-L6-v2` — **lightweight**, general-purpose
173
+ * `sentence-transformers/all-mpnet-base-v2` — **higher accuracy**, slower
174
+ * `BAAI/bge-base-en-v1.5` — **multilingual**, dense embeddings
175
+ * `intfloat/multilingual-e5-base` — ideal for **multilingual corpora**
176
+
177
+
178
+
179
+ ### Configuration Example
180
+
181
+ Use the following format in your config file to specify the embedding model:
182
+
183
+ ```yaml
184
+ embedding_model: sentence-transformers/all-MiniLM-L6-v2
185
+ ```
186
+ ---
187
+
188
+ ## 🔍 Available Retrievers
189
+
190
+ **Ragmint** integrates multiple **retrieval backends** to suit different needs:
191
+
192
+ | Retriever | Description |
193
+ | :--- | :--- |
194
+ | **FAISS** | Fast vector similarity search; efficient for dense embeddings |
195
+ | **Chroma** | Persistent vector DB; works well for incremental updates |
196
+ | **scikit-learn (NearestNeighbors)** | Lightweight, zero-dependency local retriever |
197
+
198
+
199
+ ### Configuration Example
200
+
201
+ To specify the retriever in your configuration file, use the following format:
202
+
203
+ ```yaml
204
+ retriever: faiss
205
+ ```
206
+
207
+ ---
208
+
209
+ ## 🧪 Dataset Options
210
+
211
+ Ragmint can automatically load evaluation datasets for your RAG pipeline:
212
+
213
+ | Mode | Example | Description |
214
+ |------|----------|-------------|
215
+ | 🧱 **Default** | `validation_set=None` | Uses built-in `experiments/validation_qa.json` |
216
+ | 📁 **Custom File** | `validation_set="data/my_eval.json"` | Load your own QA dataset (JSON or CSV) |
217
+ | 🌐 **Hugging Face Dataset** | `validation_set="squad"` | Automatically downloads benchmark datasets (requires `pip install datasets`) |
218
+
219
+ ### Example
220
+
221
+ ```python
222
+ from ragmint.tuner import RAGMint
223
+
224
+ ragmint = RAGMint(
225
+ docs_path="data/docs/",
226
+ retrievers=["faiss", "chroma"],
227
+ embeddings=["text-embedding-3-small"],
228
+ rerankers=["mmr"],
229
+ )
230
+
231
+ # Use built-in default
232
+ ragmint.optimize(validation_set=None)
233
+
234
+ # Use Hugging Face benchmark
235
+ ragmint.optimize(validation_set="squad")
236
+
237
+ # Use your own dataset
238
+ ragmint.optimize(validation_set="data/custom_qa.json")
239
+ ```
240
+
241
+ ---
242
+
243
+ ## 🧠 Auto-RAG Tuner
244
+
245
+ The **AutoRAGTuner** automatically analyzes your corpus and recommends retriever–embedding combinations based on corpus statistics (size and average document length). It also **suggests multiple chunk sizes with overlaps** to improve retrieval performance.
246
+
247
+ Beyond recommendations, it can **run full end-to-end testing** of the suggested configurations and **identify the best-performing RAG setup** for your dataset.
248
+
249
+
250
+ ```python
251
+ from ragmint.autotuner import AutoRAGTuner
252
+
253
+ # Initialize with your documents
254
+ tuner = AutoRAGTuner(docs_path="data/docs/")
255
+
256
+ # Recommend configurations and suggest chunk sizes
257
+ recommendation = tuner.recommend(num_chunk_pairs=5)
258
+ print("Initial recommendation:", recommendation)
259
+
260
+ # Run full auto-tuning on validation set
261
+ best_config, results = tuner.auto_tune(validation_set="data/validation.json", trials=5)
262
+ print("Best configuration after testing:", best_config)
263
+ print("All trial results:", results)
264
+ ```
265
+
266
+ ---
267
+
268
+ ## 🏆 Leaderboard Tracking
269
+
270
+ Track and visualize your best experiments across runs.
271
+
272
+ ```python
273
+ from ragmint.leaderboard import Leaderboard
274
+
275
+ # Initialize local leaderboard
276
+ leaderboard = Leaderboard(storage_path="leaderboard.jsonl")
277
+
278
+ # Retrieve top 5 runs
279
+ print("\n🏅 Top 5 Experiments:")
280
+ for result in leaderboard.top_results(limit=5):
281
+ print(f"{result['run_id']} | Score: {result['best_score']:.2f} | Model: {result['model']}")
282
+ ```
283
+
284
+ ---
285
+
286
+ ## 🧠 Explainability with Gemini / Claude
287
+
288
+ Compare RAG configurations and receive **natural language insights** on why one performs better.
289
+
290
+ ```python
291
+ from ragmint.autotuner import AutoRAGTuner
292
+ from ragmint.explainer import explain_results
293
+
294
+ tuner = AutoRAGTuner(docs_path="data/docs/")
295
+ best, results = tuner.auto_tune(
296
+ validation_set='data/docs/validation_qa.json',
297
+ metric="faithfulness",
298
+ trials=5,
299
+ search_type='bayesian'
300
+ )
301
+
302
+ analysis = explain_results(best, results, corpus_stats=tuner.corpus_stats)
303
+ print(analysis)
304
+ ```
305
+
306
+ > Set your API keys in a `.env` file or via environment variables:
307
+ > ```
308
+ > export GEMINI_API_KEY="your_gemini_key"
309
+ > export ANTHROPIC_API_KEY="your_claude_key"
310
+ > ```
311
+
312
+ ---
313
+
314
+ ## 🧩 Folder Structure
315
+
316
+ ```
317
+ ragmint/
318
+ ├── core/
319
+ │ ├── pipeline.py
320
+ │ ├── retriever.py
321
+ │ ├── reranker.py
322
+ │ ├── embeddings.py
323
+ │ ├── chunking.py
324
+ │ └── evaluation.py
325
+ ├── integration/
326
+ │ ├── config_adapter.py
327
+ │ └── langchain_prebuilder.py
328
+ ├── autotuner.py
329
+ ├── explainer.py
330
+ ├── leaderboard.py
331
+ ├── tuner.py
332
+ ├── utils/
333
+ ├── configs/
334
+ ├── experiments/
335
+ ├── tests/
336
+ └── main.py
337
+ ```
338
+
339
+ ---
340
+
341
+ ## 🧪 Running Tests
342
+
343
+ ```bash
344
+ pytest -v
345
+ ```
346
+
347
+ To include integration tests with Gemini or Claude APIs:
348
+ ```bash
349
+ pytest -m integration
350
+ ```
351
+
352
+ ---
353
+
354
+ ## ⚙️ Configuration via `pyproject.toml`
355
+
356
+ Your `pyproject.toml` includes all required dependencies:
357
+
358
+ ```toml
359
+ [project]
360
+ name = "ragmint"
361
+ version = "0.1.0"
362
+ dependencies = [
363
+ # Core ML + Embeddings
364
+ "numpy<2.0.0",
365
+ "pandas>=2.0",
366
+ "scikit-learn>=1.3",
367
+ "sentence-transformers>=2.2.2",
368
+
369
+ # Retrieval backends
370
+ "chromadb>=0.4",
371
+ "faiss-cpu; sys_platform != 'darwin'", # For Linux/Windows
372
+ "faiss-cpu==1.7.4; sys_platform == 'darwin'", # Optional fix for macOS MPS
373
+ "rank-bm25>=0.2.2", # For BM25 retriever
374
+
375
+ # Optimization & evaluation
376
+ "optuna>=3.0",
377
+ "tqdm",
378
+ "colorama",
379
+
380
+ # RAG evaluation and data utils
381
+ "pyyaml",
382
+ "python-dotenv",
383
+
384
+ # Explainability and LLM APIs
385
+ "openai>=1.0.0",
386
+ "google-generativeai>=0.8.0",
387
+ "anthropic>=0.25.0",
388
+
389
+ # Integration / storage
390
+ "supabase>=2.4.0",
391
+
392
+ # Testing
393
+ "pytest",
394
+
395
+ # LangChain integration layer
396
+ "langchain>=0.2.5",
397
+ "langchain-community>=0.2.5",
398
+ "langchain-text-splitters>=0.2.1"
399
+ ]
400
+ ```
401
+
402
+ ---
403
+
404
+ ## 📊 Example Experiment Workflow
405
+
406
+ 1. Define your retriever, embedding, and reranker setup
407
+ 2. Launch optimization (Grid, Random, Bayesian) or AutoTune
408
+ 3. Compare performance with explainability
409
+ 4. Persist results to leaderboard for later inspection
410
+
411
+ ---
412
+
413
+ ## 🧬 Architecture Overview
414
+
415
+ ```mermaid
416
+ flowchart TD
417
+ A[Query] --> B[Chunking / Preprocessing]
418
+ B --> C[Embedder]
419
+ C --> D[Retriever]
420
+ D --> E[Reranker]
421
+ E --> F[Generator]
422
+ F --> G[Evaluation]
423
+ G --> H[AutoRAGTuner / Optuna]
424
+ H --> I[Suggested Configs & Chunk Sizes]
425
+ I --> J[Best Configuration]
426
+ J -->|Update Params| C
427
+
428
+ ```
429
+
430
+ ---
431
+
432
+ ## 📘 Example Output
433
+
434
+ ```
435
+ [INFO] Starting Auto-RAG Tuning
436
+ [INFO] Suggested retriever=Chroma, embedding_model=sentence-transformers/all-MiniLM-L6-v2
437
+ [INFO] Suggested chunk-size candidates: [(380, 80), (420, 100), (350, 70), (400, 90), (360, 75)]
438
+ [INFO] Running full evaluation on validation set with 5 trials
439
+ [INFO] Trial 1 finished: faithfulness=0.82, latency=0.40s
440
+ [INFO] Trial 2 finished: faithfulness=0.85, latency=0.44s
441
+ ...
442
+ [INFO] Best configuration after testing: {'retriever': 'Chroma', 'embedding_model': 'sentence-transformers/all-MiniLM-L6-v2', 'chunk_size': 400, 'overlap': 90, 'strategy': 'sentence'}
443
+ ```
444
+
445
+ ---
446
+
447
+ ## 🧠 Why Ragmint?
448
+
449
+ - Built for **RAG researchers**, **AI engineers**, and **LLM ops**
450
+ - Works with **LangChain**, **LlamaIndex**, or standalone setups
451
+ - Designed for **extensibility** — plug in your own retrievers, models, or metrics
452
+ - Integrated **explainability and leaderboard** modules for research and production
453
+
454
+ ---
455
+
456
+ ## ⚖️ License
457
+
458
+ Licensed under the **Apache License 2.0** — free for personal, research, and commercial use.
459
+
460
+ ---
461
+
462
+ ## 👤 Author
463
+
464
+ **André Oliveira**
465
+ [andyolivers.com](https://andyolivers.com)
466
+ Data Scientist | AI Engineer