A Retrieval-Augmented Generation (RAG) system with a ReAct agent implementation for intelligent document querying.
This project implements a RAG system that can answer questions based on a collection of PDF documents. It uses FAISS for vector storage and retrieval, combined with a React (Reasoning and Acting) agent for intelligent query processing.
- PDF document ingestion and vector embedding
- FAISS-based vector database for efficient similarity search
- React agent for multi-step reasoning and retrieval
- Interactive chat interface
RAG_Project/
├── src/
│ ├── react_agent.py # React agent implementation
│ └── utils.py # Utility functions
├── data/
│ ├── pdfs/ # Source PDF documents
│ └── vector_db/ # FAISS vector database
├── chat_react.py # Main chat interface
└── requirements.txt # Python dependencies
- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your API key:
OPENAI_API_KEY=your_api_key_here
- Run the chat interface:
python chat_react.pyThe system allows you to ask questions about the documents in the PDF collection. The React agent will retrieve relevant information and provide informed answers.
- Python 3.11+
- OpenAI API key
- See
requirements.txtfor package dependencies