Grecil / Corrective-RAG

Implementation of Corrective RAG using LangChain and LangGraph.

Home Page:https://corrective-rag.streamlit.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Corrective-RAG

An Implementation of this paper - https://arxiv.org/pdf/2401.15884 using LangChain and LangGraph

Requirements

  • Large Language Model (Change it in models/LLM. By default it uses gemini-1.5-flash by Google. You can use any model supported by langchain.)
  • Embeddings Model (Change it in models/EM. By default it uses text-embeddings-004 by Google. You can use any model supported by langchain.)
  • Python 3.10 (use other versions at your own risk) (skip if using docker)
  • Python libraries mentioned in requirements.txt (skip if using docker)

Setup

  • Copy the repository
  • Change LLM and EM in models.
  • Use indexer.ipynb to create FAISS index of your files.
  • Run the app
    • Locally
      streamlit run streamlit_app.py
      
    • Docker
      docker build -t corrective-rag .
      docker run -p 8501:8501 corrective-rag
      

You can check this app out here - https://corrective-rag.streamlit.app

About

Implementation of Corrective RAG using LangChain and LangGraph.

https://corrective-rag.streamlit.app


Languages

Language:Python 99.3%Language:Dockerfile 0.7%