A sophisticated Retrieval-Augmented Generation (RAG) system that implements a corrective multi-stage workflow using LangGraph. This system combines document retrieval, relevance grading, query transformation, and web search to provide comprehensive and accurate responses.
Sign in to save downloads to your library and vote.
Preview
๐ Corrective RAG Agent
A sophisticated Retrieval-Augmented Generation (RAG) system that implements a corrective multi-stage workflow using LangGraph. This system combines document retrieval, relevance grading, query transformation, and web search to provide comprehensive and accurate responses.
Features
- Smart Document Retrieval: Uses Qdrant vector store for efficient document retrieval
- Document Relevance Grading: Employs Claude 4.5 sonnet to assess document relevance
- Query Transformation: Improves search results by optimizing queries when needed
- Web Search Fallback: Uses Tavily API for web search when local documents aren't sufficient
- Multi-Model Approach: Combines OpenAI embeddings and Claude 4.5 sonnet for different tasks
- Interactive UI: Built with Streamlit for easy document upload and querying
How to Run?
-
Clone the Repository:
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git cd rag_tutorials/corrective_rag -
Install Dependencies:
pip install -r requirements.txt -
Set Up API Keys: You'll need to obtain the following API keys:
- OpenAI API key (for embeddings)
- Anthropic API key (for Claude 4.5 sonnet as LLM)
- Tavily API key (for web search)
- Qdrant Cloud Setup
- Visit Qdrant Cloud
- Create an account or sign in
- Create a new cluster
- Get your credentials:
- Qdrant API Key: Found in API Keys section
- Qdrant URL: Your cluster URL (format:
https://xxx-xxx.aws.cloud.qdrant.io)
-
Run the Application:
streamlit run corrective_rag.py -
Use the Application:
- Upload documents or provide URLs
- Enter your questions in the query box
- View the step-by-step Corrective RAG process
- Get comprehensive answers
Tech Stack
- LangChain: For RAG orchestration and chains
- LangGraph: For workflow management
- Qdrant: Vector database for document storage
- Claude 4.5 sonnet: Main language model for analysis and generation
- OpenAI: For document embeddings
- Tavily: For web search capabilities
- Streamlit: For the user interface
Ingestion metadata
- Source catalog
- awesome-llm-apps
- Repository
- Shubhamsaboo/awesome-llm-apps ยท main
- File path
- rag_tutorials/corrective_rag/README.md
- Last refreshed
- 7/23/2026, 10:39:09 PM (4h ago)
- Refresh schedule
- Daily ยท 03:00 UTC
- Dedupe status
- Unique ยท deduped by (source, url)