Multi-Target Few-Shot Prompting with Diffusion Language Models
Anton Xue, Alan Li, Rahul Saha
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Diffusion Meta-Prompting and Steering for Generalizable Foundation Model AdaptationarXiv · 2026
- Beyond Replacement: Levenshtein Editing for Diffusion Language ModelsarXiv · 2026
- Closing Performance Gap for Diffusion Language Models under Low Inference BudgetsarXiv · 2026
- Fork-dLLM: Avoiding the Flexibility Trap in Diffusion Language ModelsarXiv · 2026
- AutoIndexer: Flexible-Order Decoding by Training Causal Models on Chains of EditsarXiv · 2026
- Learn the Effects, Not the Examples: Implicit ICL via Attention PatchingarXiv · 2026