Report-Generation Model Eval
The deterministic risk math (Framingham/REDISCOVER) needs no evaluation — it's a pure function checked by
unit tests. What does need evaluating is the LLM that drafts the narrative report: does it stay grounded in
the computed scores, keep the disclaimer, and avoid inventing findings. Below is the local-model bake-off
(eval_report_models.py) run over 4 fixed clinical scenarios, judged for
grounding, format, and hallucination.
Model comparison — latest run (2026-08-18)
Pass rate across the 4 scenarios. All 4 models scored "no hallucination" from the LLM judge — the gap here is grounding & format compliance, not fabrication.
qwen2.5:32b — pass rate across iterations
Same 4 scenarios, re-run as the prompt/report generator changed. Chosen model went from "usually right" to "always right" on this scenario set.
Scenario examples
Two of the 4 fixed eval scenarios, re-run live for this page via
report_generator.generate_report() on qwen2.5:14b
(the size available on this dev machine — the production baseline in the model-comparison chart above is
qwen2.5:32b), with real pgvector retrieval, not mocked. Patient data is a
synthetic test fixture; grounding/format checks are the harness's own, run against this real output.
This is the scenario the two-threshold design exists for: the model doesn't collapse the disagreement into a
single confident verdict, it surfaces it and reasons about the tradeoff — exactly what
report_generator.py's prompt asks for.