CapStoneRAG10 / README.md
Developer
Fix: Change SDK from streamlit to docker in README.md
4be482d
metadata
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:
    • Utilization: How well the system uses retrieved documents
    • Relevance: Relevance of retrieved documents to the query
    • Adherence: How well the response adheres to the retrieved context
    • Completeness: 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