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.
- 📚 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
You can install ColRAG using pip:
pip install colrag --upgrade
You can also install ColRAG using poetry (recommended):
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
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]}...")
For more detailed information about ColRAG's features and usage, please refer to our documentation.
We welcome contributions! Please see our Contributing Guide for more details.
ColRAG is released under the MIT License. See the LICENSE file for more details.
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}}
}
For any questions or feedback, please open an issue on our GitHub repository.
- ColBERT for the underlying retrieval model
- RAGatouille for the RAG implementation