- Customer Support RAG Chatbot
Content
Customer Support RAG Chatbot
A Retrieval-Augmented Generation (RAG) chatbot trained on customer support documentation to assist users by answering queries and providing relevant support information.
Features
- Answers questions based on provided customer support documentation
- Responds with "I don't know" for questions outside the documentation scope
- User-friendly web interface
- Semantic search for relevant information
- Context-aware responses
- Web scraping support for AngelOne documentation
- PDF processing for insurance documents
Setup Instructions
- Clone the repository:
git clone <repository-url>
cd <repository-name>
- Create and activate a virtual environment:
python -m venv venv
# On Windows
.\venv\Scripts\activate
# On Unix/MacOS
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
Create a
.envfile in the root directory with:
HF_API_KEY=your_huggingface_api_key_here
-
Gather documentation:
- For AngelOne documentation:
python scrape_angelone.py - For insurance PDFs:
- Place all insurance PDFs in the
docs/insurancedirectory
- Place all insurance PDFs in the
- For AngelOne documentation:
-
Process the documentation:
python process_documents.py
- Start the backend server:
python mcp_server.py
- In a new terminal, start the frontend:
streamlit run app.py
Deployment
To deploy the application:
-
Backend (FastAPI):
- Deploy to a cloud platform (e.g., Heroku, AWS, DigitalOcean)
- Set environment variables in the cloud platform
- Use a process manager (e.g., Gunicorn) to run the FastAPI server
-
Frontend (Streamlit):
- Deploy to Streamlit Cloud or similar platform
- Configure the frontend to point to your deployed backend URL
- Set environment variables in the deployment platform
Usage
- Open your web browser and navigate to the deployed URL
- Type your question in the chat interface
- The chatbot will:
- Search the documentation for relevant information
- Generate a response based on the found information
- Respond with "I don't know" if the information is not in the documentation
Project Structure
.
├── app.py # Streamlit frontend
├── mcp_server.py # FastAPI backend
├── process_documents.py # Document processing script
├── scrape_angelone.py # Web scraper for AngelOne docs
├── requirements.txt # Python dependencies
├── .env # Environment variables
├── docs/ # Documentation directory
│ ├── angelone/ # Scraped AngelOne documentation
│ └── insurance/ # Insurance PDFs
└── chroma_db/ # Vector database storage
Dependencies
- FastAPI: Backend API
- Streamlit: Frontend interface
- Hugging Face: LLM for response generation
- ChromaDB: Vector database for document storage
- Sentence Transformers: Text embeddings
- PyPDF: PDF processing
- BeautifulSoup4: Web scraping
- Requests: HTTP client
Notes
- The chatbot only answers questions based on the provided documentation
- It will respond with "I don't know" for questions outside the documentation scope
- The system uses semantic search to find relevant information
- Responses are generated using the Hugging Face API
- Web scraping is rate-limited to be respectful to the source website
License
[Your License Here]
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors