A production-grade Retrieval-Augmented Generation (RAG) chatbot designed for secure, context-aware banking customer service. Built with a decoupled architecture featuring a FastAPI backend and a premium Glassmorphism Streamlit frontend.
- Context-Aware RAG Pipeline: Utilizes FAISS vector database to retrieve strict, factual answers from banking policies without hallucinating.
- Conversational Memory: Maintains a sliding window of chat history to understand follow-up questions and pronouns naturally.
- Dynamic Document Ingestion: A "Secure Vault" allowing live uploads of PDFs and TXT files directly through the UI to instantly update the AI's knowledge base.
- Intent Guardrails: Evaluates incoming queries and blocks off-topic prompts (e.g., recipes, generic coding) to ensure focus on financial operations.
- Premium Corporate UI: Features customized CSS animations, glassmorphism chat bubbles, and a responsive metallic layout.
- Frontend: Streamlit, Custom CSS
- Backend: FastAPI, Uvicorn, Python
- AI / Embeddings: Hugging Face Inference API, SentenceTransformers (
all-MiniLM-L6-v2) - Vector Database: FAISS (Facebook AI Similarity Search)
- Document Parsing: PyPDF
- Clone the repository.
- Create a virtual environment:
python -m venv venv - Activate the environment and install dependencies:
pip install -r requirements.txt - Create a
.envfile in the root directory and add your Hugging Face token:HF_TOKEN=your_token_here - Run the backend:
uvicorn main:app --reload - Run the frontend (in a new terminal):
streamlit run app.py