inou/api/prompts/triage.md

70 lines
3.0 KiB
Markdown

# Triage Prompt
Your most important task is to first determine if the user input is a valid health entry or an invalid query.
**DO NOT categorize requests for medical advice as 'symptom' or 'question'. They are invalid queries.**
- If the input is not health-related, respond with: `{"error": "not_health_related"}`
- If the input asks for medical advice (e.g., contains "what should I do?", "how do I treat?"), respond with: `{"error": "no_medical_advice"}`
---
User said: "{{INPUT}}"
If, and only if, the input is a valid health entry, classify it into a category and extract basic metadata.
IMPORTANT: Respond with ONLY the JSON object below. No explanations, no markdown, no text before or after.
```json
{
"category": "one of the categories below",
"language": "en|nl|de|hi|...",
"has_data": true/false,
"summary": "brief normalized summary"
}
```
## Invalid Query Examples
Input: "What is the capital of Mexico?"
```json
{"error": "not_health_related"}
```
Input: "I have a headache, what should I do?"
```json
{"error": "no_medical_advice"}
```
## Categories
| Category | Use when | Examples |
|----------|----------|----------|
| vital | Measurements: weight, blood pressure, temperature, heart rate | "I weigh 80kg", "BP 120/80" |
| exercise | Physical activity, workouts, steps | "walked 30 min", "did yoga" |
| medication | Taking/tracking medicines | "took ibuprofen", "started metformin" |
| supplement | Vitamins, supplements | "taking omega-3", "vitamin D" |
| nutrition | Food, drink, dietary habits, abstinence | "stopped coffee", "no alcohol", "ate breakfast" |
| fertility | Menstrual cycle, period, ovulation, pregnancy | "period started", "ovulating", "I'm pregnant" |
| symptom | Current symptoms, pain, discomfort | "headache today", "knee hurts" |
| note | General health notes | "feeling good", "stressed" |
| history | YOUR past medical events (no documentation) | "appendectomy at 12", "had chickenpox", "broke arm 2015" |
| family_history | Relatives' health conditions | "mother: breast cancer", "father: diabetes" |
| surgery | Documented surgical procedures | "scheduled for knee surgery" |
| hospitalization | Hospital stays | "admitted for pneumonia" |
| consultation | Doctor visits, appointments | "saw cardiologist today" |
| diagnosis | Active conditions being managed | "diagnosed with epilepsy" |
| device | Medical devices, implants | "VP shunt placed", "pacemaker settings" |
| therapy | Therapeutic treatments | "started physical therapy" |
| assessment | Evaluations, tests | "developmental assessment scheduled" |
| birth | Birth-related data | "born at 32 weeks" |
| imaging_finding | Imaging results | "MRI showed..." |
| eeg_finding | EEG results | "EEG normal" |
| provider | Doctors, hospitals, clinics | "Dr. Smith is my neurologist" |
| question | Open questions | "should I worry about..." |
## Rules
- `has_data`: true if user provided actual values/facts, false if just describing intent
- `summary`: normalize to third person, e.g. "walked 30 minutes" → "30 min walk"