---
id: 20261016-T0-14
title: "HERO：利用执行证据优化提示词，提升代码生成准确率"
title_en: "HERO Optimizes Prompts and Scaffolding to Improve Code Generation"
url: https://ai.daily.yangsir.net/daily/20261016-T0-14
issue_date: 2026-10-16
publish_date: 2026-10-15T04:00:00.000Z
category: research
source_name: "arXiv cs.CL (NLP)"
source_url: https://arxiv.org/abs/2610.19184
---

# HERO：利用执行证据优化提示词，提升代码生成准确率

arXiv发布论文HERO，提出一种利用证据进行测试时优化和提示词优化的方法，专门针对text-to-SQL和text-to-Python等程序生成任务。现有harness优化方法通常依赖LLM反思器提出更新，但在程序生成场景中效果有限。HERO通过收集执行证据来指导提示词和脚手架的迭代优化，提升生成代码的正确性。该方法适用于需要高准确率的代码自动化生成场景。

## English Version

**HERO Optimizes Prompts and Scaffolding to Improve Code Generation**

arXiv paper HERO proposes an evidence-driven approach for test-time refinement and prompt optimization in program generation tasks like text-to-SQL and text-to-Python. Existing harness optimization methods typically rely on LLM reflectors to propose updates, with limited effectiveness in program generation. HERO collects execution evidence to guide iterative refinement of prompts and scaffolding, improving generated code correctness. The method suits automation scenarios requiring high-accuracy code generation.

---

**来源**：[arXiv cs.CL (NLP)](https://arxiv.org/abs/2610.19184)

**详情页**：https://ai.daily.yangsir.net/daily/20261016-T0-14

---

*智语观潮 · Daily — https://ai.daily.yangsir.net/llms.txt*