A Retrieval-Augmented Generation (RAG) chatbot that combines document retrieval with language generation to provide accurate, context-aware responses.
- Document Processing: Upload and process PDF documents
- Vector Database: Uses ChromaDB for efficient document storage and retrieval
- Intelligent Retrieval: Finds relevant document chunks based on user queries
- Response Generation: Generates contextual responses using retrieved information
- Interactive Interface: Easy-to-use chat interface
- Python: Core programming language
- LangChain: Framework for building LLM applications
- ChromaDB: Vector database for document storage
- PDF Processing: Document parsing and text extraction
- Vector Embeddings: For semantic search and retrieval
- Clone the repository:
git clone https://github.com/aayushyatiwari/RAGfinal.git
cd RAGfinal- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys and configurations- Start the application:
python transcipt_1_agent.py-
Upload documents: Add PDF file location of transcipt_1
-
Ask questions: Query the chatbot about the uploaded documents
-
Get responses: Receive accurate, context-aware answers based on your documents
RAG-chatbot/
├── generation.py # Response generation logic
├── chroma_langchain_db/ # ChromaDB vector database
├── transcipt_1.pdf # Sample document
├── transcipt_1_agent.py # Agent processing script
├── BFS_Share_Price.csv # Sample data file
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .env # Environment variables (not tracked)
Edit the .env file to configure:
- API keys for language models
- Database connection settings
- Model parameters
- Other application settings
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Author: Aayush Yatiwari
- GitHub: @aayushyatiwari
- Repository: RAG-chatbot
- LangChain community for the excellent framework
- ChromaDB for the vector database solution
- OpenAI for language model capabilities