Multi-Target Few-Shot Prompting with Diffusion Language Models

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.

Link
https://www.semanticscholar.org/paper/256bd8ac630d4546c4d817b879669d933949a945
Found by
Semantic Scholar
Authors
Anton Xue, Alan Li, Rahul Saha
Categories
benchmark
Published
2026-10-15
Last seen by the radar
2026-10-17
Citations
0
Influential citations
0
Radar score
26.75 / 100 (how it is scored)
Why it scored so
Matched: benchmark; Primary record: Semantic Scholar
Related links
https://arxiv.org/abs/2610.22294
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Semantic Scholar