The aim of this project is to build a RAG chatbot in Langchain powered by Google Generative AI APIs. You can upload documents in txt, pdf, docx or html formats and chat with your data. Relevant documents will be retrieved and sent to the LLM along with your follow-up questions for accurate answers. Also, developed a user interface using streamlit application to host the chatbot.
This project requires latest Python 3 and the Python libraries which can be found in requirements.txt
To run the app locally:
- Clone the github repo:
- Migrate to the folder where repo is cloned
- Create a virtual environment:
conda create -n myenv python=3.12.4
- Activate the virtual environment :
conda activate myenv
- Install the required dependencies
pip install -r requirements.txt
- Start the app:
streamlit run streamlit_app.py
- In the sidebar, select the LLM provider (Google Generative AI (default and can be extended to other providers like OpenAI or other free models hosted on Hugging Face)), choose an LLM (Gemini-pro or Gemini-1.5-Flash), adjust its parameters, insert your API key and choose your retriever(Cohere reranker (requires Cohere API key) or Contextual compression or Vectorstore backed retriever).
- Create a Chroma vectorstore.
- Chat with your documents: ask questions and get LLM generated answers.
- Code Repository: All the relevant python files with relevant comments are added in the repository.
- Documentation: Information covering system architecture, data ingestion process, rag orchestration and other important aspects can be found at documentation.pdf
- Video Demonstration: Video showcasing the system's capabilities, specifically highlighting the handling of follow-up questions and quality of question answering. (video_demonstration.webm)