Spaces:
Running
Running
title: RAG Chat Flow | |
emoji: π | |
colorFrom: gray | |
colorTo: gray | |
sdk: streamlit | |
sdk_version: 1.29.0 | |
app_file: app.py | |
pinned: false | |
license: mit | |
short_description: 'RAG-powered document intelligence with vector search and AI ' | |
# RAG Chat Flow π | |
An intelligent document Q&A chatbot powered by Retrieval-Augmented Generation (RAG). Upload your documents and ask questions to get accurate, context-aware answers. | |
## Features | |
- π **Smart Document Search**: Uses semantic search to find relevant information | |
- π€ **AI-Enhanced Answers**: Combines document retrieval with AI processing for natural responses | |
- π **Multi-Document Support**: Upload multiple text files for comprehensive knowledge base | |
- π¬ **Chat History**: Persistent chat sessions with automatic saving | |
- π₯ **Multi-User Support**: Real-time user tracking and session management | |
- π― **Confidence Scoring**: Shows how confident the system is in its answers | |
- π **Source Attribution**: Always shows which documents answers come from | |
## How to Use | |
1. **Upload Documents**: Use the sidebar to upload .txt files containing your knowledge base | |
2. **Index Documents**: Click "Re-index Documents" to process your files | |
3. **Ask Questions**: Start chatting! Ask specific questions about your uploaded documents | |
4. **Get Answers**: Receive both AI-enhanced and extracted answers with source citations | |
## Technical Details | |
- **Embedding Model**: all-mpnet-base-v2 for semantic understanding | |
- **Vector Database**: ChromaDB for efficient similarity search | |
- **Text Splitting**: Intelligent chunking that preserves context | |
- **AI Enhancement**: Optional OpenRouter API integration for natural language responses | |
## Environment Variables | |
Set `OPENROUTER_API_KEY` for AI-enhanced responses (optional - works without it too). | |
## Example Use Cases | |
- Corporate policy documents | |
- Technical documentation | |
- Research papers | |
- Product manuals | |
- Legal documents | |
- Knowledge bases | |
## Setup | |
The app automatically handles document processing and indexing. Simply upload your text files and start asking questions! |