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

基于扩散语言模型的多目标少样本提示

Multi-Target Few-Shot Prompting with Diffusion Language Models

Anton Xue · Alan Li · Rahul Saha

中文摘要

少样本提示在指令与奖励难以明确时极具价值,例如通过示例进行代码编辑,需将格式变更或 API 迁移应用到多个位置。此类编辑常依赖左右上下文,导致因果自回归模型生成困难。为此,引入基于扩散语言模型的多目标少样本提示,利用示例引导共享画布中多个掩码区域的填充。针对少样本提示中可靠遵循示例的挑战,利用画布选择性掩码推导似然比奖励,优先选择有示例支持的填充。在少样本提示基准测试及软件重构案例研究中,示例提升了填充准确率,且在多种设置下,示例引导带来了进一步的性能增益。

关键要点

  1. 01解决因果自回归模型在处理依赖左右上下文的代码编辑任务时的生成困难问题。
  2. 02提出基于扩散语言模型的多目标少样本提示,通过示例引导共享画布中多区域填充。
  3. 03利用画布选择性掩码推导似然比奖励,以增强模型对少样本示例的遵循能力。
  4. 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.

同方向论文 · 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…