CoolFace
Apppublic

JanaAlzobidi/bioasq-rag

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
App README

๐Ÿงฌ BioASQ RAG Demo

A biomedical question-answering system built on Retrieval-Augmented Generation (RAG):

  • โ€”Corpus: 40,221 biomedical passages from the BioASQ benchmark
  • โ€”Retriever: `pritamdeka/S-PubMedBert-MS-MARCO` sentence encoder + FAISS index
  • โ€”Generator: LLaMA-3.3-70B-Versatile (hosted on Groq)
  • โ€”UI: Gradio with collapsible retrieved-evidence panel

The system retrieves the top 5 most semantically similar biomedical passages for each query, then generates an answer that is strictly grounded in those passages.

How it works

question โ†’ S-PubMedBert encoder โ†’ query vector
                                       โ†“
                              FAISS (40,221 vectors)
                                       โ†“
                          top-5 relevant passages
                                       โ†“
                       LLaMA-3.3-70B (Groq) + strict prompt
                                       โ†“
                            grounded biomedical answer

Disclaimer

This system is provided for informational and research purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare professional for clinical questions.

Setup notes for forks

If you fork this Space, you'll need to:

  1. 1.Provide your own GROQ_API_KEY under Settings โ†’ Repository secrets.
  2. 2.Ensure the data/ folder contains bioasq_passages.csv and bioasq_faiss.index (use Git LFS for files larger than 10 MB).
  3. 3.The first launch takes 1โ€“2 minutes to download the embedding model (~440 MB) and build the runtime. Subsequent launches are faster.

Evaluation summary

ComponentMetricScore
RetrieverRecall@50.94
RetrieverMRR@100.85
GeneratorBest on F1LLaMA-3.3-70B

See the accompanying project report for full evaluation details (RAGAS, LLM comparison, error analysis).