Skip to main content

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.

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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bestrag-0.3.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bestrag-0.3.3.tar.gz
Algorithm Hash digest
SHA256 04b65e09378146397e0b303e2b6c7be24767ed79c187e7b06c778f3a7b812e18
MD5 3a69870166016899ee157242f6e60237
BLAKE2b-256 83143c64a0cccf54c6ac93aa861a9ca258563b22376c7b2244b4e48ae775d99c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bestrag-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4e13bac3eee1b97998b9279d2cc956ddd32bc7d7ab7f45a851f01627b4a320a3
MD5 caaeae51b36012e182e99431b2a4c331
BLAKE2b-256 92fcf1d2601a8bec74ef18970681583a690caab5c5ffc9a048d05ae51fd494b7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page