bRAG-langchain
Everything you need to know to build your own RAG application
What is bRAG-langchain?
Everything you need to know to build your own RAG application
Overview of bRAG-langchain
What it is
bRAG-langchain is a repository that provides a comprehensive exploration of Retrieval-Augmented Generation (RAG) for various applications. It contains a series of Jupyter notebooks that guide users from introductory to advanced RAG implementations, including multi-querying, routing, indexing, and reranking. The project also includes a boilerplate starter code file (full_basic_rag.ipynb) for building a customizable RAG chatbot.
Key features
- Five notebooks covering RAG setup, multi-query, routing and query construction, indexing and advanced retrieval, and retrieval with reranking.
- Hands-on guides for environment setup, data loading, embedding generation, vector store configuration (ChromaDB/Pinecone), and basic RAG pipeline creation.
- Multi-query techniques to diversify retrieval and improve relevance.
- Logical and semantic routing for directing queries to appropriate data sources.
- Advanced indexing methods including multi-representation indexing, RAPTOR, and ColBERT integration.
- Re-ranking methods such as Reciprocal Rank Fusion (RRF) and Cohere re-ranking, plus exploration of CRAG and Self-RAG.
Use cases
- Learning the fundamentals of RAG architecture and building a basic RAG pipeline.
- Experimenting with multi-query retrieval to enhance response quality.
- Implementing query routing for domain-specific or multi-source applications.
- Applying advanced indexing and retrieval strategies for large or complex document collections.
- Optimizing retrieval results through re-ranking and fusion techniques.
Getting started
Prerequisites: Python 3.11.11. Clone the repository and set up a virtual environment: bash git clone https://github.com/bRAGAI/bRAG-langchain.git cd bRAG-langchain python3.11 -m venv venv source venv/bin/activate # On Windows: venv/Scripts/activate pip install -r requirements.txt After installing dependencies, duplicate .env.example to .env and add your API keys (OpenAI, LangSmith, Pinecone). Then run the notebooks in order starting with [1]_rag_setup_overview.ipynb.
License and pricing
The license is not stated (SPDX identifier: NOASSERTION). The project is listed as open source and free to use.
Based on the project's public README and repository metadata.