Introducing BestRAG! This Python library leverages a hybrid Retrieval-Augmented Generation (RAG) approach to efficiently store and retrieve embeddings. By combining dense, sparse, and late interaction embeddings, BestRAG offers a robust solution for managing large datasets.
✨ 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.
🚀 Installation
To install BestRAG, simply run:
pip install bestrag
📦 Usage
Here’s how you can use BestRAG in your projects:
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", "pdf_name")
# Search using a query
results = rag.search(query="your search query", limit=10)
print(results)
# Delete particular pdf embeddings
rag.delete_pdf_embeddings("home/notes.pdf")
Note: Qdrant offers a free tier with 4GB of storage. To generate your API key and endpoint, visit Qdrant.
🤝 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.
Created by samadpls 🎉
Metadata
Release files for bestrag 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bestrag-0.3.3.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bestrag-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / bestrag-0.3.3.tar.gz
| Download URL | bestrag-0.3.3.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04b65e09378146397e0b303e2b6c7be24767ed79c187e7b06c778f3a7b812e18
|
|
BLAKE2b-256 checksum How to use checksums |
83143c64a0cccf54c6ac93aa861a9ca258563b22376c7b2244b4e48ae775d99c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / bestrag-0.3.3-py3-none-any.whl
| Download URL | bestrag-0.3.3-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e13bac3eee1b97998b9279d2cc956ddd32bc7d7ab7f45a851f01627b4a320a3
|
|
BLAKE2b-256 checksum How to use checksums |
92fcf1d2601a8bec74ef18970681583a690caab5c5ffc9a048d05ae51fd494b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|