| Metric | Score |
|---|---|
| Safety F1 (REDFLAG ∪ BLOCK) | 92.3% |
| Multi-label EM | 87.4% |
| Joint acc (intent + all types) | 81.5% |
| Single-label acc (v11-compatible projection) | 88.7% |
| Intent acc | 91.0% |
| Coexist recall (REDFLAG + BLOCK) | 76.2% |
| Parse err | 0.16% (of which ~half are eval-side bugs — model output is valid) |
| REDFLAG reason_code acc | 98.3% |
1{
2 "intent": "HA|HCN|MT|PI|OTHER",
3 "redflag": true|false,
4 "redflag_code": "RF-1_GENERAL|RF-2_PEDIATRIC|RF-3_OBSTETRIC|RF-4_ELDERLY|RF-5_IMMUNOCOMP|\"\"",
5 "block": "BLOCK_HARD|STEER_SOFT|PASS|NONE",
6 "block_code": "OOS_H_*|OOS_S_*|PASS_*|\"\"",
7 "entities": {
8 "drugs": ["<verbatim from user text>"],
9 "diseases": ["..."],
10 "symptoms": ["..."]
11 }
12}| State | redflag | block | Use case |
|---|---|---|---|
| PASS | false | PASS | Normal health knowledge Q |
| REDFLAG only | true | NONE | Emergency without personal-dose Q |
| BLOCK only | false | BLOCK_HARD | Personal action / off-topic |
| STEER only | false | STEER_SOFT | Personal clinical judgment |
| COEXIST | true | BLOCK_HARD | Emergency + personal-dose |
1python -m vllm.entrypoints.openai.api_server \
2 --model ningpy/intent-detection-V2.0 \
3 --served-model-name intent \
4 --dtype float16 \
5 --port 8001temperature: 0.0max_tokens: 200stop: [] (rely on model's natural <|im_end|>)| Model output | Action |
|---|---|
redflag=true, block="BLOCK_HARD" | Emergency guidance + refuse dose advice |
redflag=true, block="NONE" | Emergency guidance |
redflag=false, block="BLOCK_HARD" | Refuse + refer to doctor |
redflag=false, block="STEER_SOFT" | Soft guide to consultation |
redflag=false, block="PASS" | Normal RAG/LLM answer |