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.
🚀 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.
To install BestRAG, simply run:
pip install bestrag
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")
# Search using a query
results = rag.search(query="your search query", limit=10)
print(results)
Note: Qdrant offers a free tier with 1GB of storage. To generate your API key and endpoint, visit Qdrant.
Feel free to contribute to BestRAG! Whether it’s reporting bugs, suggesting features, or submitting pull requests, your contributions are welcome.
This project is licensed under the MIT License.
Created by samadpls 🎉