A collection of advanced Retrieval-Augmented Generation (RAG) implementations using LangGraph. This repository showcases different RAG architectures, each designed to handle various retrieval and generation scenarios.
Overview: Implements Recursive Abstractive Processing for Tree-Organized Retrieval, providing advanced document processing and hierarchical information retrieval.
Key Features:
- Hierarchical document clustering
- Multi-level summarization
- Efficient retrieval from large document collections
Overview: An enhanced RAG system that incorporates web search capabilities to handle out-of-distribution queries and correct potential inaccuracies in retrieved information.
Key Features:
- Web search fallback for unknown queries
- Automatic correction of retrieved information
- Dynamic query transformation
Overview: A Self-Reflective RAG system that enhances traditional RAG with self-assessment capabilities. It evaluates the quality of retrieved documents and generated responses, enabling iterative improvements.
Key Features:
- Self-assessment of document relevance
- Iterative response refinement
- Quality control for generated outputs
Overview: Combines LLM agents with RAG, enabling dynamic decision-making during the retrieval and generation process through an agent-based architecture.
Key Features:
- Autonomous decision-making for retrieval
- Dynamic tool usage
- Flexible response generation
Overview: Intelligently routes queries based on complexity, choosing between direct generation and a more sophisticated RAG approach.
Key Features:
- Automatic query complexity assessment
- Dynamic routing between generation strategies
- Optimized performance for different query types
This project includes an intuitive Streamlit-based frontend to streamline experimentation and enhance usability. Check out our demo here. (Note: You may encounter errors if the API rate limit is exceeded.).
# Install uv if you haven't already
pip install uv
# Create a virtual environment
uv venv
# Install the package with development dependencies
uv sync --extra dev
# Activate the virtual environment
source .venv/bin/activate
# Run the Streamlit app
streamlit run app.py
This project is heavily influenced by excelent RAG tutorials from LangGraph
This project is licensed under the MIT License - see the LICENSE file for details.