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

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

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

🤝 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.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

bestrag-0.2.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bestrag-0.2.2.tar.gz
  • Upload date:
  • Size: 5.3 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.2.tar.gz
Algorithm Hash digest
SHA256 06f12e8247a6400c25848a6f0f68ac6c1578fc41bbd0570694a77eb0bcb4a456
MD5 b7b4b7a8c0e405fbde9e97e7f8ce500f
BLAKE2b-256 aba962e8851443ddec6d61017fc8faa730f011174dd2351cd136d447d2a32d06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bestrag-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d5f735a1592f339ce7bbdea0e428d49fac64f1d830e7c3e2169cfe3faf3505e
MD5 eab826fd0b957acea91dd0c2c1a5da15
BLAKE2b-256 3921c4ae361bad287f5d7191271036bad5eeec6e15b9706fdf6ddfd062da496d

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