A RAG pipeline using ColBERT via RAGatouille
Project description
ColRAG
ColRAG is a powerful RAG (Retrieval-Augmented Generation) pipeline using ColBERT via RAGatouille. It provides an efficient and effective way to implement retrieval-augmented generation in your projects.
🌟 Features
- 📚 Efficient document indexing
- 🚀 Fast and accurate retrieval with reranking as an optional parameter
- 🔗 Seamless integration with ColBERT and RAGatouille
- 📄 Support for multiple file formats (PDF, CSV, XLSX, DOCX, HTML, JSON, JSONL, TXT)
- ⚙️ Customizable retrieval parameters
🛠️ Installation
You can install ColRAG using pip:
pip install colrag --upgrade
You can also install ColRAG using poetry (recommended):
Using Poetry
If you're using Poetry to manage your project dependencies, you can add ColRAG to your project with:
poetry add colrag
Or if you want to add it to your pyproject.toml
manually, you can add the following line under [tool.poetry.dependencies]
:
colrag = "^0.1.0" # Replace with the latest version
Then run:
poetry install
🚀 Quick Start
Here's a simple example to get you started:
from colrag import index_documents, retrieve_and_rerank_documents
# Index your documents
index_path = index_documents("/path/to/your/documents", "my_index")
# Retrieve documents
query = "What is the capital of France?"
results = retrieve_and_rerank_documents(index_path, query)
for result in results:
print(f"Score: {result['score']}, Content: {result['content'][:100]}...")
📖 Documentation
For more detailed information about ColRAG's features and usage, please refer to our documentation.
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for more details.
📄 License
ColRAG is released under the MIT License. See the LICENSE file for more details.
📚 Citation
If you use ColRAG in your research, please cite it as follows:
@software{colrag,
author = {Syed Asad},
title = {ColRAG: A RAG pipeline using ColBERT via RAGatouille},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/syedzaidi-kiwi/ColRAG.git}}
}
📬 Contact
For any questions or feedback, please open an issue on our GitHub repository.
🙏 Acknowledgements
- ColBERT for the underlying retrieval model
- RAGatouille for the RAG implementation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file colrag-0.1.8.tar.gz
.
File metadata
- Download URL: colrag-0.1.8.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.7 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 638d7bd1d13e4022000478458e1011dd3f03fb73be39f5435c572f4d1d83fc27 |
|
MD5 | cc117a83e37c36672db3ae47396b2862 |
|
BLAKE2b-256 | c1c32d4d8326a2c786dd8495d7430e4148f8a5af93d8bc8f9012aa9c4a63732e |
File details
Details for the file colrag-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: colrag-0.1.8-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.7 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be23036ab2681abe0d09a67f02131100b3eca0182a96f9c21b7f3c89797c91bf |
|
MD5 | 28bf11701ae1ce0696fdd30a0f3732a6 |
|
BLAKE2b-256 | 3ca2c164b307f17620911cebf8c8e716c9e4d19a4c644e16b20e1591e15b1744 |