Skip to main content

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.

Project description

Supported python versions PEP8 License Run Pytest GitHub stars

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:

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")

# 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.

✨ 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.


Created by samadpls 🎉

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

bestrag-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file bestrag-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bestrag-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for bestrag-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2755a36b7b63032fa1da8d982dd5667b20fa7bbb253e310f1576fb2d6ad7c63
MD5 73f6a48e2270645dd0dd9df3fd5556d2
BLAKE2b-256 fc7668d40440d382becb31d67d315316ffebcda28ac4e766b5d6fee462906b97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page