This project is a multilingual, RAG-powered chatbot application built with a React frontend and a Flask backend. It allows users to chat with a bot that retrieves information from documents and generates responses intelligently. It supports different document types and languages, and stores embeddings using the Chroma vector database.
Key Features
- Interactive chatbot that responds to user queries
- Language selector enabling multilingual support
- Predefined suggestions to guide the conversation
- RAG (Retrieval-Augmented Generation) pipeline for accurate and contextual answers
- Extracts and displays reference links used in responses
- Enforces rate limiting to prevent abuse of the API
Tech Stack
Frontend
- Built with React for UI
- Supports modern JavaScript workflows
- Runs on a local development server
Backend
- Built with Flask to handle API requests
- Integrates with LangChain for the RAG pipeline
- Uses NLTK for NLP tasks
- Communicates with Google Generative AI for response generation
Storage and Processing
- Vector storage with Chroma for document embeddings
- Supports ingestion of PDFs, CSVs, and plain text files
Deployment
- Docker-compatible architecture for containerized deployment
Installation Summary
- Requires Node.js and npm for the frontend
- Requires Python 3.7+ and virtual environment setup for the backend
- Uses pip to install backend dependencies
- Requires a Google API key for access to generative AI
Usage Instructions
- Launch frontend and backend locally
- Access the application via browser
- Select a language from the dropdown
- Enter a query in the input field and submit
- View chatbot's response along with relevant context and links
API Overview
Main Endpoints
- GET / serves the main frontend
- POST / predict accepts a user message and returns a generated response
Rate Limiting
- The / predict endpoint allows up to 10 requests per minute per user
Example Use
- A user inputs a message with an optional language tag
- The server processes the query using document context and returns an appropriate response
Contribution Guide
- Contributions are encouraged
- Submit issues or pull requests for improvements or bug fixes
License
- Licensed under the MIT License
Acknowledgments
- LangChain for enabling document-based retrieval and embedding
- NLTK for language processing tools
- React and Flask for frontend and backend frameworks