Grades a patient’s urgency with the Manchester triage protocol (C1–C5) from what they say, by text or voice: an LLM extracts and explains the symptoms and a machine learning model predicts the priority.
- Discipline
- LLM · machine learning
- Year
- 2026
- Stack
- Python
- FastAPI
- Pydantic
- LLM
- Whisper
- scikit-learn
- pandas
- Apache Airflow
- n8n
- PostgreSQL
- Neon
- MinIO
- Docker
- Next.js
- React
- TypeScript
- Tailwind CSS
- Vercel
- 13FastAPI microservices
- 272real clinical interviews in the dataset
- C1–C5Manchester urgency levels

The problem
In an emergency room, the first classification depends on a quick conversation under pressure. Anything that helps avoid underrating a serious case matters, especially when the patient is very distressed.
How I solved it
Transcription
WhisperA full clinical pipeline: transcription, symptom extraction with an LLM, normalization to a closed dictionary of Manchester terms, explained labelling, anxiety score, ML prediction and ethics audit.
Symptoms
LLM · Groq · OpenRouterA TF-IDF and logistic regression classifier, checked with stratified cross-validation and measured on what matters in an ER: recall on the critical levels and the under-triage rate.
Classification
TF-IDF · logistic regressionA dataset built by labelling 272 real clinical transcripts with an LLM, extended with synthetic cases to balance the minority classes.
Orchestration
Airflow · n8n13 FastAPI microservices orchestrated with Apache Airflow (7 DAGs) and n8n for alerts, with PostgreSQL and MinIO, all on Docker Compose.
A serverless version on Vercel: services ported to Next.js API routes, the model exported to JSON and run in TypeScript with the same probabilities as in Python, Postgres on Neon, and automatic LLM fallback when one runs out of quota.
A closer look

Text or voice input, with sample cases and the four pipeline steps explained. 
Interview history with the model’s prediction, the anxiety score and the audit for each case.
Result
A public demo that proposes an explained triage level in seconds and warns when a patient’s anxiety may be lowering their urgency. Meant to support medical staff, not replace them. Built together with a classmate.
Need something similar?