Text this: Beam-based Correction and Optimization for Accelerators