Metadata-Version: 2.1
Name: bestrag
Version: 0.1.3
Summary: BestRAG (Best Retrieval Augmented) is a library for storing and searching document embeddings in a Qdrant vector database. It uses a hybrid embedding technique combining dense, late interaction and sparse representations for better performance.
Home-page: https://github.com/samadpls/bestrag
Author: samadpls
Author-email: abdulsamadsid1@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastembed==0.4.1
Requires-Dist: streamlit
Requires-Dist: pytest
Requires-Dist: flake8
Requires-Dist: PyPDF2
Requires-Dist: qdrant-client
Requires-Dist: onnxruntime==1.19.2


![Supported python versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
[![PEP8](https://img.shields.io/badge/code%20style-pep8-black.svg)](https://www.python.org/dev/peps/pep-0008/)
[![License](https://img.shields.io/badge/License-MIT%202.0-blue.svg)](LICENSE)
[![Run Pytest](https://github.com/samadpls/BestRAG/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/samadpls/BestRAG/actions/workflows/pytest.yml)
<img src='https://img.shields.io/github/stars/samadpls/BestRAG?color=red&label=stars&logoColor=black&style=social'>

Welcome to **BestRAG**! This Python library enables you to efficiently store and retrieve embeddings using a hybrid Retrieval-Augmented Generation (RAG) approach. It combines dense, sparse, and late interaction embeddings to provide a robust solution for handling large datasets.

## 🚀 Installation

To install **BestRAG**, simply run:

```bash
pip install bestrag
```

## 📦 Usage

Here’s how you can use **BestRAG** in your projects:

```python
from bestrag import BestRAG

rag = BestRAG(
    url="https://YOUR_QDRANT_URL", 
    api_key="YOUR_API_KEY", 
    collection_name="YOUR_COLLECTION_NAME"
)

# Store embeddings from a PDF
rag.store_pdf_embeddings("your_pdf_file.pdf")

# Search using a query
results = rag.search(query="your search query", limit=10)
print(results)
```

> **Note**: To generate your API key and endpoint, visit [Qdrant](https://qdrant.tech/).

## ✨ Features

- **Hybrid RAG**: Utilizes dense, sparse, and late interaction embeddings for enhanced performance.
- **Easy Integration**: Simple API for storing and searching embeddings.
- **PDF Support**: Directly store embeddings from PDF documents.

## 🤝 Contributing

Feel free to contribute to **BestRAG**! Whether it’s reporting bugs, suggesting features, or submitting pull requests, your contributions are welcome. 

## 📝 License

This project is licensed under the [MIT License](LICENSE).

---

Created by [samadpls](https://github.com/samadpls) 🎉
