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

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

Uploaded Source

Built Distribution

bestrag-0.1.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bestrag-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b5e70f71a95903df41979bf3601bbeea2cb72f1fc77c02e232c683518404c4bf
MD5 705dfaa5febf77aaaad56f7143564d6c
BLAKE2b-256 9a19ba1329f035ed1ebf9c84e8e4c98b1df766df95197d5983ed081b5442d049

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bestrag-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff908faed7265c3ac57b02b0e8a682a9401d7697868fb2f94093de2737a011a
MD5 9a141b21ad7f44c8ce1b6413b6498d31
BLAKE2b-256 164ea6a8755eb1f765e948041cac0bcd1b743beb87ae22a2dae24f028cf1ae43

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