Synapse: Optimizing Natural-Language Agent Skills through Program Repair
Lijuan Li (Nanjing University), Zhenpeng Chen (Tsinghua University), Chenxi Zhang (Xidian University), Yihao Huang (East China Normal University), Yang Liu (Nanyang Technological University), Chong Wang (Nanyang Technological University)
Key points
From the paper's conclusion- We propose Synapse, which casts skill optimization as generate-and-validate repair over a partial program view.
Abstract
Large language model (LLM) agents can improve task performance by optimizing reusable natural-language skills without updating model parameters. Execution feedback reveals failures but does not directly identify which instructions to edit, which related instructions matter, or which tasks an edit may break. We propose Synapse, which casts skill optimization as generate-and-validate repair over a partial program view. A deterministic compiler translates recognized skill constructs into SkIR, a source-linked intermediate representation, while retaining other requirements in the text. Synapse combines execution traces with control-flow and dependence relations to localize faults, propose typed mutations, and select related repair tests, including previously passing ones. Each mutation is written back to its mapped source span and recompiled; validation determines acceptance. Every accepted patch yields a well-formed skill and preserves untargeted instruction spans. Under a one-hop-local execution assumption, selected tests include every test an edit can affect. On DocVQA and LiveMath with three execution models, Synapse improves task success rates over SkillOpt by 3.74-4.54 and 2.40-4.00 percentage points, respectively, and outperforms Trace2Skill and SkillBoost in all six settings. Replacing SkIR-based repair and its test screening with constrained text editing screened only on failing tests lowers DocVQA success rates by 2.40 and 2.67 percentage points for two models. In two recorded repair runs, structural relations add tests for 23 of 37 patches; in one repair, a test added through a control-flow relation exposes a regression missed by coverage of the edited instruction.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- AtomSearch: Evidence-Grounded Tree Search for Agent Skill OptimizationarXiv · 2026
- Trajectory-Guided Fault Localization for Agent Skill EvolutionarXiv · 2026
- Write, Execute, Refine: From Skill Followers to Skill Optimizers via Reinforcement Learning from Execution FeedbackarXiv · 2026
- MemScope: Evolving Agent Memory Architectures through Localized Code RepairarXiv · 2026
- Skill Transfer: Adapting Agent Skills from Strong to Weak AgentsarXiv · 2026
- MetaSkill: Reusable Problem-Solving Methods for Adaptive Skill Orchestration in LLM AgentsarXiv · 2026