arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.30840cs.AI
收藏

对比反思:迭代提示优化

Contrastive Reflection for Iterative Prompt Optimization

LinkedIn(领英)

Derek Koh, Jinghui Mo, Benjamin H. Le, Jiening Zhan, Baofen Zheng, Kevin Bevis, Nathaniel C. Owen, Lauren Elizabeth Charney, Wenqiong Liu, Jingwei Wu

AI总结:

提出对比反思框架,通过对比失败与成功行为,迭代优化检索增强生成代理的提示,在HotpotQA上准确率从51.4%提升至60.4%。

摘要:

LLM代理正成为信息检索的核心:它们发出检索查询、综合答案,并越来越多地作为IR评估的评判者。改进控制这些代理的提示是一个优化问题,但在应用IR环境中,它往往更像调试而非盲目搜索。工程师需要知道哪个行为失败了,哪个附近的行为仍然有效,两者之间的区别是什么,以及提示编辑是否在不引入回归的情况下提高了保留集的质量。我们提出了对比反思,一种用于代理IR工作流的迭代提示优化框架。该框架从以任务为中心的质量定义开始:QA代理暴露检索或推理轨迹,评分代理暴露维度级分数和理由。这些结构化轨迹用于识别以错误为中心的行为切片,添加来自同一区域的附近成功示例,并要求教师LLM提出有针对性的提示编辑。仅当验证性能提高时,候选编辑才被接受,并可选择进行回归检查。我们用基于树的切片选择器实例化了该框架,但贡献在于对比反思循环而非树本身。在公开的HotpotQA检索增强QA设置上,一次树选择的对比修复将保留集的精确匹配准确率从51.4%提高到60.4%。仅失败和随机证据的变体改进较少,且破坏了更多先前正确的示例。一个轻量级的仅指令比较将该方法置于现代提示优化器附近:MIPROv2达到59.4%,GEPA达到57.0%。结果是一个可解释的IR代理优化循环,旨在使提示修复更具可检查性和验证驱动性。

英文摘要:

LLM agents are becoming central to information retrieval: they issue retrieval queries, synthesize answers, and increasingly serve as judges for IR evaluation. Improving the prompts that control these agents is an optimization problem, but in applied IR settings it often looks less like blind search and more like debugging. Engineers need to know which behavior failed, which nearby behavior still worked, what distinguishes the two, and whether a prompt edit improves held-out quality without introducing regressions. We present Contrastive Reflection, an iterative prompt-optimization framework for agentic IR workflows. The framework starts from a task-centric quality definition: QA agents expose retrieval or reasoning traces, and grading agents expose dimension-level scores and rationales. These structured traces are used to identify error-anchored behavioral slices, add nearby successful examples from the same region, and ask a Teacher LLM to propose a targeted prompt edit. Candidate edits are accepted only when validation performance improves, optionally subject to regression checks. We instantiate the framework with a tree-based slice selector, but the contribution is the contrastive reflection loop rather than the tree itself. On a public HotpotQA retrieval-augmented QA setup, one tree-selected contrastive repair improves held-out exact-match accuracy from 51.4% to 60.4%. Failure-only and random-evidence variants improve less and break more previously correct examples. A light instruction-only comparison places the method near modern prompt optimizers: MIPROv2 reaches 59.4% and GEPA 57.0%. The result is an interpretable optimization loop for IR agents, aimed at making prompt repair more inspectable and validation-driven.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑