Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supported python versions PEP8 License Run Pytest GitHub stars PyPI - Downloads

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.

🤗 Try it on Hugging Face Spaces

You can explore and interact with BestRAG directly on Hugging Face Spaces: BestRAG on Hugging Face

🤝 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 🎉

About

BestRAG: A library for hybrid RAG, combining dense, sparse, and late interaction methods for efficient document storage and search.

Topics

Resources

Contributing

Stars

Watchers

Forks

Used by

Contributors

Languages