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 Distribution

bestrag-0.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file bestrag-0.2.0.tar.gz.

File metadata

  • Download URL: bestrag-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for bestrag-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e66917a3f1aaf0d6cf270716647f52f2c59fc98da337b748cdbd195994c4203f
MD5 e84e4a965af72124a6e08a41890e2f21
BLAKE2b-256 20e21686e17298dd1cf3e91450e4c154aa541c4c7a2341e2c094df8259efee8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bestrag-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 266e74e37d3a6b637cd4eb7f1ab66314f368f8d70606845e55b6567db8f985b1
MD5 d1192a1c838d47f10527e0d45ac5f794
BLAKE2b-256 0f06544d6e22b640150a2c7d78f3b9d6e8f657d2904549f6888279ca091ae4d0

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