Spaces:
Sleeping
Sleeping
File size: 1,893 Bytes
1d10b0a 4be482d 1d10b0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ---
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
|