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

通过示例预测符号程序和提示程序的性能

Predicting Performance of Symbolic and Prompt Programs with Examples

Nanayang Technological University, Singapore(南洋理工大学,新加坡);Massachusetts Institute of Technology, USA(麻省理工学院,美国);Cornell University, USA(康奈尔大学,美国)

Chengqi Zheng, Keya Hu, Shuzhi Liu, Tao Wu, Kevin Ellis, Yewen Pu

AI总结:

本文研究了通过示例预测程序性能的问题,提出了一种基于简单硬币翻转模型的方法,利用观察到的执行结果和性能先验知识来预测程序性能,并开发了RAP方法来构建代理先验以提高预测效果。

摘要:

LLM提示广泛用于自然陈述的任务,但其不可靠,可能在少数测试用例上成功但在部署时失败。我们研究了性能预测:给定一个程序(例如符号程序或在LLM上执行的提示程序)和少量领域内示例,预测其在未见任务上的性能。我们使用一个简单的硬币翻转模型,将每次通过/失败的程序执行视为伯努利随机变量,其成功概率是程序未知的性能。在该模型中,性能完全取决于:1)在测试用例上观察到的执行结果,以及2)性能的先验分布。我们从多样化的程序和任务语料库中编译了经验性能先验,并发现符号程序(例如Python)都是全或无的,而提示程序具有弥漫的先验,有许多几乎正确的程序。这种差异解释了为什么少数通过测试可以认证符号程序但不能认证提示程序。基于这一见解,我们开发了RAP(检索近似先验),通过从现有语料库中检索相似任务和提示程序来构建代理先验,然后用于预测性能。我们展示了RAP实现了稳健的性能。

英文摘要:

LLM prompting is widely used for naturally stated tasks, yet it is unreliable it may succeed on a few test cases but fail at deployment time. We study performance prediction: given a program, either symbolic (e.g. Python) or a prompt executed on an LLM, and a few in-domain examples, predict its performance on unseen tasks from the same domain. We use a simple coin-flip model, treating each pass/fail program execution as a Bernoulli random variable, whose success probability is the programs unknown performance. In this model, performance depends entirely on: 1) the observed execution outcomes on test cases, and 2) a prior over performances. We compile empirical performance priors from a corpus of diverse programs and tasks, and find that performance for symbolic programs (e.g., Python) are all or nothing, while prompt programs have a diffuse prior with many nearly-correct programs. This difference explains why a few passing tests can certify symbolic programs but not prompt programs. Building on this insight, we develop RAP (Retrieved Approximate Prior), which retrieves similar tasks and prompt programs from an existing corpus to construct a proxy prior, which is then used to predict performance. We show RAP achieves solid performances.

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

↑