ReaXpert: A Synthesis Condition Design Agent Built with Evolutionary Prompt Optimization
Abstract
Whether a target molecule or material can be made depends on identifying conditions under which its synthesis proceeds. ReaXpert is a condition-design agent for transition-metal-catalyzed couplings and nucleophilic aromatic substitution. Rather than update model weights, it specializes a frozen frontier model by evolving one instruction per reaction type with Genetic-Pareto (GEPA), a prompt optimizer that uses natural-language execution traces to attribute failures and propose revisions. This design is motivated by a measured failure mode: when asked directly for a low, mid, or high yield verdict, the model is systematically biased toward optimistic predictions and recovers only 7.9% of true-low reactions. GEPA-evolved prompts instead structure the prediction around six physically meaningful, precedent-grounded factors, making intermediate judgments inspectable and providing a surface for explicit calibration. Adding failure-attributed calibration raises true-low recall to 48.3% and narrows the per-class recall spread from 52.5 to 5.3 percentage points. The complete prompt pipeline comes within 0.4 percentage points of an open-weight low-rank adaptation (LoRA) fine-tune on exact accuracy, exceeds it on macro-averaged F1, and costs approximately USD 14 in model calls without weight training or accelerator hardware. On a structure-only production campaign that is 75.9% low-yielding, compared with 26.4% in the held-out literature split, the calibrated lineage retains the best macro-averaged F1 and class balance. Finally, its factor reasoning warm-starts Bayesian optimization (BO) over a five-variable condition space, reaching usable yields in fewer benchmark evaluations than standard BO or random search.