A Retrieval-Augmented Generation (RAG) chatbot for the Ahmedabad Municipal Corporation’s sanitation services, built using Streamlit, LangChain, and Mixtral-8x7B.
This project implements an AI-powered chatbot that answers questions about sanitation policies for the Ahmedabad Municipal Corporation (AMC). The bot uses RAG architecture to provide accurate, context-aware responses based on official documentation.
- Interactive chat interface using Streamlit
- RAG implementation using LangChain
- Document processing with PyMuPDF
- Vector storage using Pinecone
- Mixtral-8x7B language model integration
- Automatic bullet-point formatting for long responses
- Frontend: Streamlit
- Language Model: Mixtral-8x7B-Instruct-v0.1
- Vector Database: Pinecone
- Embeddings: HuggingFace Embeddings
- Document Processing: PyMuPDF
- Framework: LangChain
- Clone the repository:
git clone https://github.com/sleeky-glitch/sanitationbotamc.git
cd sanitationbotamc
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
Create a.env
file with the following:
HUGGINGFACE_API_KEY=your_huggingface_api_key
PINECONE_API_KEY=your_pinecone_api_key
-
Add your sanitation policy document:
Place yoursanitation.pdf
in the root directory. -
Run the application:
streamlit run streamlit.py
main.py
: Core chatbot implementation with RAG architecturestreamlit.py
: Streamlit interface implementationrequirements.txt
: Project dependenciessanitation.pdf
: Source document (not included in repo)
- Real-time chat interface
- Context-aware responses based on official documentation
- Automatic formatting of long responses into bullet points
- Persistent chat history during session
- Responsive UI with loading indicators
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License – see the LICENSE file for details.
- Ahmedabad Municipal Corporation
- Mistral AI for the language model
- Pinecone for vector database services
- HuggingFace for model hosting
Leave a Reply