Spaces:
Sleeping
Sleeping
| title: RAG Capstone Project | |
| emoji: π€ | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: docker | |
| app_file: streamlit_app.py | |
| pinned: false | |
| license: mit | |
| # π€ RAG Capstone Project | |
| A comprehensive Retrieval-Augmented Generation (RAG) system with TRACE evaluation metrics for medical/clinical domains. | |
| ## Features | |
| - π **Multiple RAG Bench Datasets**: CovidQA, CUAD, FinQA, HotpotQA, PubMedQA, and more | |
| - π§© **Chunking Strategies**: Dense, Sparse, Hybrid, Re-ranking, Row-based, Entity-based | |
| - π€ **Medical Embedding Models**: | |
| - sentence-transformers/all-mpnet-base-v2 | |
| - emilyalsentzer/Bio_ClinicalBERT | |
| - microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract | |
| - πΎ **ChromaDB Vector Storage**: Persistent vector storage with efficient retrieval | |
| - βοΈ **Groq LLM Integration**: Cloud-based inference with rate limiting | |
| - π **TRACE Evaluation Metrics**: | |
| - **U**tilization: How well the system uses retrieved documents | |
| - **R**elevance: Relevance of retrieved documents to the query | |
| - **A**dherence: How well the response adheres to the retrieved context | |
| - **C**ompleteness: How complete the response is | |
| - π¬ **Chat Interface**: Streamlit-based interactive chat with history | |
| ## Usage | |
| 1. Enter your **Groq API Key** in the sidebar | |
| 2. Select a **dataset** from RAG Bench | |
| 3. Choose a **chunking strategy** (dense, sparse, hybrid, re-ranking) | |
| 4. Select an **embedding model** for document vectorization | |
| 5. Choose an **LLM model** for response generation | |
| 6. Click **"Load Data & Create Collection"** to initialize | |
| 7. Start **chatting** in the chat interface | |
| 8. View **retrieved documents** and evaluation metrics | |
| 9. Run **TRACE evaluation** on test data | |
| ## Environment Variables | |
| Set these in your Hugging Face Space secrets: | |
| - `GROQ_API_KEY`: Your Groq API key (required) | |
| - `GROQ_API_KEYS`: Comma-separated list of API keys for rotation (optional) | |
| ## License | |
| MIT License | |