Clinical RAG with Source Citations & Alerts
Outcome
A patient-facing guidance tool that turns a described concern into the clinic's own relevant procedures, with citations to the source document and contraindication alerts. It sets expectations before the visit — the final diagnosis always came from the clinic's professionals.
Overview
A Retrieval-Augmented Generation pipeline that reads a visitor's description of their own concern and returns the procedures the clinic actually offers for it, every answer cited back to the document it came from. The data was provided by the client in the form of supporting PDFs and EXCEL files for details of procedures that can be performed in their aesthetic clinic for the specific issue that the users pre-diagnose. This app was just to give users an idea of what they can expect to be performed in the clinic. A final diagnosis was always provided by professionals.
Screens & Demos

Architecture & Pipeline
01
Procedure PDFs & Excel
Procedure catalogue
- Excel
02
Document Parser
Python · procedure extraction
- Python
03
Vector Index
BioBERT embeddings
- BioBERT
04
Visitor's Concern
Free text · self pre-diagnosis
05
Hybrid Search
LangChain · matched to catalogue
- LangChain
06
LLM
Llama / Mistral
- LLM
- Llama
- Mistral
07
Safety Filters
Contraindication alerts
08
Cited Response
FastAPI · links to source document
- FastAPI
End-to-end flow, in order. Scroll sideways on a narrow screen.
Key Features
- Query processor that maps a visitor's described concern to procedure categories
- Vector index built from the client's own procedure PDFs and Excel sheets
- Hybrid search RAG pipeline over the clinic's catalogue
- Every answer cited back to the source document it came from
- Secure API with safety filters and contraindication alerts
- Optional demo interface