--- title: RAG Chatbot Demo emoji: 🤖 colorFrom: blue colorTo: green sdk: gradio sdk_version: "3.0.0" python_version: "3.10" app_file: app.py pinned: false --- # Demo RAG Chatbot A Python demo chatbot that: - loads `config.yaml` with `sambanova_api_key` and `website` - scrapes the configured website - builds embeddings using HuggingFace models - retrieves relevant chunks (RAG) - generates answers using SambaNova API - returns formatted text output with citations ## Setup 1. Install dependencies: ```bash pip install -r requirements.txt ``` 2. Configure `config.yaml`: - `sambanova_api_key`: your SambaNova API key - `website`: the URL to scrape - `embedding_model`: HuggingFace model (default: `sentence-transformers/all-MiniLM-L6-v2`) - `system_prompt`: optional behavior prompt ## Run CLI Mode ```bash python chatbot.py ``` Type a question and press Enter. Type `exit` to quit. ## Run with Gradio UI ```bash python app.py ``` Interactive web interface with real-time answers and citations display.