V4.2 vs V4.1
V4.1 (V20d) included 6 "extension" rules (Row 60-65) and 7 symptoms not in
the official 59-rule spec (testicular_torsion, pyelonephritis, PID,
angle-closure glaucoma, cauda equina, PPH). These were removed in V4.2
to comply with Medical Advisory scope.
- Closed symptom set: 96 → 89 items (dropped 7 orphaned)
- Rule engine: 65 → 59 rules
- Prompt v11 (was v10)
- Training data: sanitized (dropped 81 samples of orphan-only cases + 160
orphan symptom mentions from labels) + 31 negative reinforcement samples
- Fix:
is_male schema hallucination remains 0
Table with columns: V4.0 (V20c), V4.1 (V20d), V4.2 (V20g) | V4.0 (V20c) | V4.1 (V20d) | V4.2 (V20g) |
|---|
| Exact Match | 89.2% | 87.0% | 89.6% |
| Precision | 0.918 | 0.901 | 0.921 |
| Recall | 0.749 | 0.786 | 0.779 |
| F1 | 0.825 | 0.839 | 0.844 |
Clinical-fair (SUSPECTED = TP for recall)
- Precision: 0.771
- Recall: 0.865
- F1: 0.815
Notes
- Orphan symptom residual: 7/269 model outputs mention removed symptoms.
Engine ignores them (0 flag impact). Downstream systems can safely
strip them or ignore.
- V4.2 covers exactly what's in the official spec. Coverage gaps for
testicular torsion, angle-closure glaucoma, cauda equina, PPH require
Medical Advisory spec expansion (see git history commit b61a4e9/cd5b628
for the extension logic that was removed).
Usage
python3 -m vllm.entrypoints.openai.api_server \
--model ningpy/redflag-detection-V4.2 \
--served-model-name redflag \
--dtype float16
Pair with the 59-rule V20 engine (redflag_scripts/v20/rule_engine_v20.py).
Training
- 3766 samples (V20f 3735 + patch20e_neg 31)
- LoRA r=32 alpha=64, 7 target projections
- 3 epochs @ 2e-5, seq len 1900, 8×V100 DDP