跳到正文
返回论文列表
cs.CL提交于 已译

HERO: 利用证据进行程序生成的测试时优化与提示词优化

HERO: Harnessing Evidence for Test-time Refinement and Prompt Optimization in Program Generation

Mingyu Lu · Timothy Ossowski · Tristan Naumann · Hoifung Poon · Peniel Argaw

中文摘要

Harness优化通过改进可复用的提示词和脚手架来提升大语言模型性能,但在文本转SQL等程序生成任务中需进一步适配。现有方法依赖LLM反思器提出更新,虽能修复错误但可能破坏原有正确行为。代码生成任务可通过执行输出直接验证更新效果。HERO结合离线与测试时优化:离线阶段从执行验证的成败中学习可复用提示词更新,并在采纳前验证候选修改;测试时将生成代码视为特定实例的Harness,利用执行反馈进行优化。在四个SQL、Cypher和Python基准测试中,HERO取得最佳离线性能,pass@1较初始提示词提升7.6分,测试时优化额外提升2.0分并提高执行效率。

关键要点

  1. 01针对程序生成任务中Harness更新可能破坏原有正确行为的问题,提出利用代码执行结果直接验证更新效果。
  2. 02提出HERO方法,结合离线阶段从执行验证中学习可复用提示词更新,以及测试时利用执行反馈优化特定实例代码。
  3. 03在四个SQL、Cypher和Python基准测试中,HERO离线pass@1较初始提示词提升7.6分,测试时优化额外提升2.0分并提高执行效率。

解读

尚无解读。

原始英文摘要

arXiv:2610.19184v1 Announce Type: new Abstract: Harness optimization improves LLMs by refining reusable prompts and scaffolding, yet requires further adaptation for program generation tasks such as text-to-SQL and text-to-Python. Existing methods often rely on LLM reflectors to propose harness updates, which can fix observed failures but also disrupt previously correct behavior. Text-to-code tasks offer a natural way to mitigate this issue: we can execute generated outputs, allowing us to evaluate and verify the effects of proposed updates directly. Building on this signal, we introduce \textsc{HERO} (\textbf{H}arnessing \textbf{E}vidence for \textbf{R}efinement and \textbf{O}ptimization), which combines offline and test-time harness optimization. At the first stage, \method{} learns reusable prompt updates from execution-verified successes and failures and validates candidate revisions before adoption. At test time, we treat the generated code as an instance-specific harness and refine it using execution feedback. Across four SQL, Cypher, and Python benchmarks, \method{} achieves the best offline performance, improving pass@1 by \(7.6\) points over the initial prompt, while test-time refinement adds another \(2.0\) points and improves execution efficiency.

同方向论文 · cs.CL

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联提示词 · 5

学习wangshuyi.substack.com·外部收录·

根据指定主题为儿童生成带互动模拟、练习和测验的单文件 HTML 教程。

首先明确定义角色:你是儿童互动教育内容开发专家。然后给明确的目标:根据用户指定主题,生成一个完整独立的互动学习 HTML 文件。背景是目标用户是青少年儿童,输出格式是单文件 HTML,CSS、JS 全都内联,最后就要这一个文件。设计原则要注重趣味性、互动性、视觉吸引力。输入参数一共有 3 个:学习主题(必选)、用户画像(可选,默认我们家老大 12 岁的男孩 Kevin)、卡通形象(可选,最近他和弟弟迷名侦探柯南,所以我就选用了名侦探柯南)。页面结构要求包括 HTML 框架、标…

学习github.com/f/awesome-chatgpt-prompts·外部收录·

Build an Interview Practice App

You will build your own Interview Preparation app. I would imagine that you have participated in several interviews at some point. You have been asked questions. You were given exercises or some personality tests to complete. Fortunately, A…

写作github.com/f/awesome-chatgpt-prompts·外部收录·

Prompt Writer for Specific Project

You are the "X App Architect," the lead technical project manager for the Pomodoro web application created by Y. You have full access to the project's file structure, code history, and design assets within this Google Antigravity environmen…