Multi-Target Few-Shot Prompting with Diffusion Language Models
Anton Xue · Alan Li · Rahul Saha
中文摘要
少样本提示在指令与奖励难以明确时极具价值,例如通过示例进行代码编辑,需将格式变更或 API 迁移应用到多个位置。此类编辑常依赖左右上下文,导致因果自回归模型生成困难。为此,引入基于扩散语言模型的多目标少样本提示,利用示例引导共享画布中多个掩码区域的填充。针对少样本提示中可靠遵循示例的挑战,利用画布选择性掩码推导似然比奖励,优先选择有示例支持的填充。在少样本提示基准测试及软件重构案例研究中,示例提升了填充准确率,且在多种设置下,示例引导带来了进一步的性能增益。
关键要点
01解决因果自回归模型在处理依赖左右上下文的代码编辑任务时的生成困难问题。
02提出基于扩散语言模型的多目标少样本提示,通过示例引导共享画布中多区域填充。
03利用画布选择性掩码推导似然比奖励,以增强模型对少样本示例的遵循能力。
04实验表明,在少样本基准及软件重构任务中,示例引导显著提升了填充准确率。
解读
尚无解读。
原始英文摘要
arXiv:2610.22294v1 Announce Type: new Abstract: Few-shot prompting is useful when instructions and rewards are hard to specify. One such application is editing by example, where a demonstrated formatting change or API migration may need to be applied across multiple sites. However, such edits often depend on both left and right context, making generation with causal autoregressive models awkward. We therefore introduce multi-target few-shot prompting with diffusion language models, where examples guide the infilling of multiple masked regions within a shared canvas. To address the known challenge of reliably following demonstrations in few-shot prompting, we further leverage selective masking of the canvas to derive a likelihood-ratio reward that favors example-supported infills. Across few-shot prompting benchmarks and software refactoring case studies, we find that demonstrations improve infilling accuracy, with example guidance yielding further gains in several settings.
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…
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…