Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,19 +1,56 @@
|
|
| 1 |
---
|
| 2 |
title: RAG Chat Flow
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
- streamlit
|
| 10 |
pinned: false
|
| 11 |
-
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: RAG Chat Flow
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: 1.29.0
|
| 8 |
+
app_file: app.py
|
|
|
|
| 9 |
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# RAG Chat Flow π
|
| 14 |
|
| 15 |
+
An intelligent document Q&A chatbot powered by Retrieval-Augmented Generation (RAG). Upload your documents and ask questions to get accurate, context-aware answers.
|
| 16 |
|
| 17 |
+
## Features
|
| 18 |
+
|
| 19 |
+
- π **Smart Document Search**: Uses semantic search to find relevant information
|
| 20 |
+
- π€ **AI-Enhanced Answers**: Combines document retrieval with AI processing for natural responses
|
| 21 |
+
- π **Multi-Document Support**: Upload multiple text files for comprehensive knowledge base
|
| 22 |
+
- π¬ **Chat History**: Persistent chat sessions with automatic saving
|
| 23 |
+
- π₯ **Multi-User Support**: Real-time user tracking and session management
|
| 24 |
+
- π― **Confidence Scoring**: Shows how confident the system is in its answers
|
| 25 |
+
- π **Source Attribution**: Always shows which documents answers come from
|
| 26 |
+
|
| 27 |
+
## How to Use
|
| 28 |
+
|
| 29 |
+
1. **Upload Documents**: Use the sidebar to upload .txt files containing your knowledge base
|
| 30 |
+
2. **Index Documents**: Click "Re-index Documents" to process your files
|
| 31 |
+
3. **Ask Questions**: Start chatting! Ask specific questions about your uploaded documents
|
| 32 |
+
4. **Get Answers**: Receive both AI-enhanced and extracted answers with source citations
|
| 33 |
+
|
| 34 |
+
## Technical Details
|
| 35 |
+
|
| 36 |
+
- **Embedding Model**: all-mpnet-base-v2 for semantic understanding
|
| 37 |
+
- **Vector Database**: ChromaDB for efficient similarity search
|
| 38 |
+
- **Text Splitting**: Intelligent chunking that preserves context
|
| 39 |
+
- **AI Enhancement**: Optional OpenRouter API integration for natural language responses
|
| 40 |
+
|
| 41 |
+
## Environment Variables
|
| 42 |
+
|
| 43 |
+
Set `OPENROUTER_API_KEY` for AI-enhanced responses (optional - works without it too).
|
| 44 |
+
|
| 45 |
+
## Example Use Cases
|
| 46 |
+
|
| 47 |
+
- Corporate policy documents
|
| 48 |
+
- Technical documentation
|
| 49 |
+
- Research papers
|
| 50 |
+
- Product manuals
|
| 51 |
+
- Legal documents
|
| 52 |
+
- Knowledge bases
|
| 53 |
+
|
| 54 |
+
## Setup
|
| 55 |
+
|
| 56 |
+
The app automatically handles document processing and indexing. Simply upload your text files and start asking questions!
|