Answer Engineering: Local Trajectory Editing for Protocol-Constrained Decision Making in Large Language Models
Large language models often produce confident yet non-compliant responses in highly protocolized settings such as clinical decision-making. This work proposes Answer Engineering, a method that enables deterministic intervention during standard autoregressive generation by performing rule-based, local edits to the reasoning trajectory at runtime—without requiring model retraining or weight modifications. It is the first approach to support localized trajectory control without global search, significantly enhancing adherence to clinical protocols while preserving auditability. Evaluated on a benchmark for sudden sensorineural hearing loss, the method increases protocol compliance from 25.1% to 83.5% and improves balanced accuracy from 42.0% to 80.7%.