Multi-Target Few-Shot Prompting with Diffusion Language Models
Anton Xue, Alan Li, Rahul Saha
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.
Create a lesson
Related papers
OmniVerifier-C1: Decomposed Graded Verifier for Rule-Governed Generative World Modeling
Bowei Liu, Xinchen Zhang, Xuhuan Li et al.
Training Reasoning Models to Generate Diverse Scientific Ideas
Manya Wadhwa, Pranav Narayanan Venkit, Hiroaki Hayashi et al.
MindEval2: Clinically Grounded Patients and Rubrics for Evaluating Language Models in Mental Health Support
John Mendonça, Daniel Tschernutter, José Pombal et al.
Grid-Bench: Can LLMs Predict How Discrete Worlds Change?
Zixiang Xu, Zirui Song, Wanrong Zheng et al.
Knowledge That Is Linear Before Fine-Tuning Generalizes After It
Faridoun Mehri, Hinrich Schütze
AI Consilium: a Benchmark of LLM Clinical Multidisciplinary Second Opinions
Alexey A. Bokov, Ivan I. Panin, Nikolay B. Nechaev et al.