编码智能体是强大的提示优化器 Coding Agents are Strong Prompt Optimizers 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-08-13
👁️ 预览文献
💡 AI 中文简介
这项研究提出了一种叫CASD的新方法,让编码智能体直接分析大量智能体运行轨迹,自动总结出更好的提示词。传统方法需要反复试错、跑环境、看分数,而CASD只需一次离线分析,不用环境访问和验证数据。在四个智能体基准测试中,CASD平均比原始提示提升16.6个百分点,超过GEPA和SkillOpt,且成本仅约1.6美元,比传统搜索便宜22倍以上。
领域人工智能/智能体与提示工程
适合谁读需要一定专业背景(了解智能体、提示优化和基准测试)
核心贡献1. 提出CASD方法,证明无需迭代搜索和环境交互,仅靠静态轨迹语料即可合成优化提示;2. 揭示语料级统计反思比小批量反思更有效,且成本极低。
关键数据在ALFWorld、τ²-bench零售和电信、SpreadsheetBench-Verified四个基准上,CASD平均提升16.6个百分点,GEPA为10.9,SkillOpt为5.3;单次优化成本约1.6美元,比验证门控搜索便宜22倍以上;在四个基准中的三个上超过GEPA,全部超过SkillOpt。
推荐理由如果你关心如何低成本、高效地优化智能体提示,这篇论文给出了一个简单却强大的新思路,值得一读。
关键词["提示优化", "编码智能体", "智能体轨迹", "反思学习", "技能蒸馏", "离线分析"]

原文摘要

查看英文原文摘要

Search-based prompt optimizers improve prompts through iterative search: they propose edits, execute fresh rollouts, score the resulting trajectories, and retain only edits that improve a validation metric. We show that this optimization loop is unnecessary. Given only a static corpus of agent trajectories, an off-the-shelf coding agent can directly synthesize an optimized prompt, requiring neither environment access nor validation data. We call this approach \textit{Coding-Agent Skill Distillation} (CASD). The key insight is reflection scope. Rather than reasoning over a small batch of trajectories at each optimization step, the coding agent writes and executes analysis code to compute corpus-wide statistics, identifies systematic failure modes, inspects representative episodes, and distills the resulting insights into behavioral rules. Across four agentic benchmarks (ALFWorld, $τ^2$-bench retail and telecom, and SpreadsheetBench-Verified), under matched data access, a single CASD pass outperforms GEPA, a state-of-the-art reflective prompt optimizer, on three of four benchmarks and outperforms validation-gated reflective search (SkillOpt) on all four, improving the unoptimized baseline by 16.6 percentage points on average versus 10.9 for GEPA and 5.3 for SkillOpt. Because CASD performs a single offline analysis pass rather than iterative search, producing an optimized prompt costs approximately \$1.60---over $22\times$ cheaper than validation-gated search. Even when competing methods are granted additional validation data and unrestricted environment access, CASD remains ahead on two of four benchmarks. These results suggest that corpus-scale statistical reflection is a viable alternative to iterative search for prompt optimization.