Metadata-Version: 2.4
Name: encourage-rag
Version: 0.3.1
Summary: ENCOURAGE
Author-email: dida Datenschmiede GmbH <info@dida.do>
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: jinja2
Requires-Dist: PyYAML
Requires-Dist: httpx>=0.26.0
Requires-Dist: httpcore>=0.15.0
Requires-Dist: tomlkit>=0.13.0
Requires-Dist: llama-index-vector-stores-qdrant
Requires-Dist: llama-index-vector-stores-chroma>=0.4.1
Requires-Dist: typer>=0.12.4
Requires-Dist: types-PyYAML
Requires-Dist: types-requests
Requires-Dist: tqdm==4.66.4
Requires-Dist: pre-commit
Requires-Dist: qdrant-client
Requires-Dist: uv==0.4.28
Requires-Dist: vllm>=0.8.4
Requires-Dist: pydantic>=2.9.2
Requires-Dist: sentence-transformers>=3.2.1
Requires-Dist: fastembed>=0.4.1
Requires-Dist: tornado>=6.4.1
Requires-Dist: evaluate>=0.4.3
Requires-Dist: ir-measures>=0.3.4
Requires-Dist: sacrebleu>=2.4.3
Requires-Dist: bert-score>=0.3.13
Requires-Dist: absl-py>=2.1.0
Requires-Dist: rouge-score>=0.1.2
Requires-Dist: nltk>=3.9.1
Requires-Dist: mlflow>=2.18.0
Requires-Dist: chromadb>=1.0.10
Requires-Dist: litellm>=1.53.3
Requires-Dist: outlines>=0.1.11
Requires-Dist: accelerate
Requires-Dist: datasets>=3.5.0
Requires-Dist: rank-bm25>=0.2.2
Requires-Dist: smolagents>=1.14.0
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc==1.26.0
Provides-Extra: dev
Requires-Dist: jupyterlab>=4.0; extra == "dev"
Requires-Dist: jupytext>=1.16.3; extra == "dev"
Requires-Dist: notebook>=7.4.2; extra == "dev"
Requires-Dist: matplotlib>=3.9.1; extra == "dev"
Requires-Dist: ipywidgets>=8.1.5; extra == "dev"
Provides-Extra: ci
Requires-Dist: ruff; extra == "ci"
Requires-Dist: isort; extra == "ci"
Requires-Dist: pytest; extra == "ci"
Requires-Dist: jsondiff; extra == "ci"
Requires-Dist: pytest-cov>=5.0.0; extra == "ci"
Requires-Dist: pytest-mock; extra == "ci"
Requires-Dist: faker; extra == "ci"
Dynamic: license-file

<p align="center">
  <img src="assets/encourage_logo.png" alt="Encourage Logo" width="120" /><br />
  <span style="font-size: 2em; font-weight: bold;">EncouRAGe</span>
</p>

<p align="center">
  <b>the all-in one solution for evaluate RAG methods</b>. <br /> <br />
  <img src="https://img.shields.io/github/license/uhh-hcds/encourage" />
  <img src="https://img.shields.io/github/last-commit/uhh-hcds/encourage" />
  <img src="https://img.shields.io/github/issues/uhh-hcds/encourage" />
  <img src="https://img.shields.io/github/issues-pr/uhh-hcds/encourage" />
  <br />
  <img src="https://img.shields.io/badge/python-3.12-blue" />
  <img src="https://img.shields.io/badge/python-3.13-blue" />
</p>




This repository provides a flexible library for running local inference with or without context, leveraging a variety of popular LLM libraries for enhanced functionality:


- ⚙️ **[jinja2](https://github.com/pallets/jinja)**
  - Offers a template engine for dynamic prompt generation.
- 📝 **[mlflow](https://github.com/mlflow/mlflow)**
  - Designed to ensure observability of the model performance and tracing.
- 🔄 **[chroma](https://github.com/chroma-core/chroma)**
  - Strong in-memory vector database for efficient data retrieval.
- 🧭 **[qdrant](https://github.com/qdrant/qdrant)**
  - Supports robust vector search for efficient data retrieval.

---

### 🚀 Getting Started

```python
pip install encourage
```

To initialize the environment using `uv`, run the following command:

```bash
uv sync
```

### ⚡ Usage Inference Runners

For understanding how to use the inference runners, refer to the following tutorials:

- [ChatInferenceRunner](./docs/conversation.md)
- [BatchInferenceRunner](./docs/batch_inference.md)

### 🔍 RAG Methods

Encourage provides several RAG (Retrieval-Augmented Generation) methods to enhance your LLM responses with relevant context:

- [Overview of RAG Methods](./docs/rag_methods.md)

### 📊 Evaluation Metrics

Encourage offers a comprehensive set of metrics for evaluating LLM and RAG performance:

- [Metrics Overview](./docs/metrics_overview.md) - Table of all available metrics
- [Metrics Explanation](./docs/metrics_explanation.md) - Detailed explanations and formulas
- [Metrics Tutorial](./docs/metrics_tutorial.md) - Step-by-step guide to using metrics

### ⚙️ Custom Templates

To use a custom template for the inference, follow the steps below:

- [Create a custom template](./docs/templates.md)

### 📈 Model Tracking

For tracking the model performance, use the following commands:

- [Track the model](./docs/mlflow.md)
