Public case study

Medical Q&A RAG Assistant

Source-grounded GenAI - citations, safety fallback, RAGAS, Gradio

Public portfolio project with live Hugging Face demo, GitHub repository, and RAGAS evaluation reported in the README.

PythonGradioLangChainChromaDBRAGASOpenAI
RAGAS across 20 questions: answer relevancy 0.9644; context precision 0.9278; context recall 0.6067; faithfulness 0.5735.

Business problem

Medical-question assistants need to ground answers in source text, provide citations, and refuse or qualify answers when context is insufficient.

Dataset and context

The app is inference-only on Hugging Face. Heavy indexing and RAGAS evaluation are handled outside the Space. The README includes a medical disclaimer and notes source-document rights considerations.

Methodology

  • -Chunked source material with overlap, embedded it, and stored vectors in ChromaDB.
  • -Retrieved top-k context passages for each question and generated answers with citations.
  • -Added fallback behavior for insufficient context instead of forcing unsupported medical answers.
  • -Evaluated 20 questions with RAGAS metrics for answer relevancy, context precision, context recall, and faithfulness.
  • -Kept the deployed Space lightweight by separating inference from index-building and evaluation workflows.

Technical approach

The system uses a retrieval-first architecture: user question, vector search, context assembly, answer generation, citations, and safety fallback. The project is framed as an educational decision-support demo, not medical advice or a clinical tool.

Key insights

  • -Answer relevancy is 0.9644 across the 20-question RAGAS sample.
  • -Context precision is 0.9278, showing retrieved context is usually relevant.
  • -Context recall is 0.6067, which points to retrieval coverage as a production-improvement area.
  • -Faithfulness is 0.5735, so stronger grounding checks would be needed before any high-stakes use.

Business recommendations

  • -Use the demo to show applied AI workflow skill, not as a medical product claim.
  • -For production, prioritize source governance, evaluation traces, safety review, and human oversight.
  • -Improve retrieval coverage before expanding the answer scope.
  • -Track unanswered or fallback questions because they reveal corpus gaps.

Results and impact

RAGAS answer relevancy 0.9644.
RAGAS context precision 0.9278.
RAGAS context recall 0.6067.
RAGAS faithfulness 0.5735.

This is an educational source-grounded RAG portfolio project. It is not medical advice, not a diagnostic tool, and not intended for clinical deployment.

What I would improve in production

  • -Add stricter citation verification and answer-grounding checks.
  • -Expand the evaluation set and keep per-question traces for auditability.
  • -Add source-document versioning and rights review.
  • -Monitor latency, cost, fallback rate, and hallucination-risk examples.

Recruiter takeaway

This project is useful for applied AI roles because it shows retrieval, citations, safety fallback, evaluation, and deployment restraint rather than just a chatbot wrapper.