Skip to main content

bestrag: Library for storing and searching document embeddings in a Qdrant vector database using hybrid embedding techniques.

Project description

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

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.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

bestrag-0.2.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bestrag-0.2.1.tar.gz
  • Upload date:
  • Size: 5.4 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.1.tar.gz
Algorithm Hash digest
SHA256 d516a42cec56094ff29cbf02b5557327d14a66560e9151f70d6aa934b4855358
MD5 b294804a0f237dbb91967ea04b150e42
BLAKE2b-256 06e544c4361fd59cb3e335876d5c8ff6095979f57a8b91dd5f0597c29594ae48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bestrag-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aeae8384954ad08644d78dab9819e8bf2d95dcb16c462a18e49e103d56152351
MD5 2cac9cd41d3919f37b13065517ab830e
BLAKE2b-256 1c8927cd9956d541c6ca7720f3e8fb1caf32577a3e5affdc1a7548a280d05814

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