paper-with-me

홈 › Papers

Does Few-Shot Learning Help LLM Performance in Code Synthesis?

2024-12-03 · Derek Xu, Tong Xie, Botao Xia, Haoyu Li, Yunsheng Bai, Yizhou Sun, Wei Wang

Large language models (LLMs) have made significant strides at code generation through improved model design, training, and chain-of-thought. However, prompt-level optimizations remain an important yet under-explored aspect of LLMs for coding. This work focuses on the few-shot examples present in most code generation prompts, offering a systematic study on whether few-shot examples improve LLM's coding capabilities, which few-shot examples have the largest impact, and how to select impactful examples. Our work offers 2 approaches for selecting few-shot examples, a model-free method, CODEEXEMPLAR-FREE, and a model-based method, CODEEXEMPLAR-BASED. The 2 methods offer a trade-off between improved performance and reliance on training data and interpretability. Both methods significantly improve CodeLlama's coding ability across the popular HumanEval+ coding benchmark. In summary, our work provides valuable insights into how to pick few-shot examples in code generation prompts to improve LLM code generation capabilities.

📄 PDF Abstract BibTeX arXiv:2412.02906

Code (0)

등록된 구현이 없습니다.

Tasks

Code GenerationFew-Shot LearningHumanEval

Similar Papers 제목 키워드 기반

DeepCalliFont: Few-shot Chinese Calligraphy Font Synthesis by Integrating Dual-modality Generative Models

2023-12-16 · Yitian Liu, Zhouhui Lian

Few-shot font generation, especially for Chinese calligraphy fonts, is a challenging and ongoing problem. With the help of prior knowledge that is mainly based on glyph consistency assumptions, some recently proposed met…

Font GenerationImage GenerationRepresentation Learning

Less is More: Summary of Long Instructions is Better for Program Synthesis

2022-03-16 · Kirby Kuznia, Swaroop Mishra, Mihir Parmar, Chitta Baral

Despite the success of large pre-trained language models (LMs) such as Codex, they show below-par performance on the larger and more complicated programming related questions. We show that LMs benefit from the summarized…

Program Synthesis

Exploring Sparse MoE in GANs for Text-conditioned Image Synthesis

2023-09-07 · CVPR 2025 1 · Jiapeng Zhu, Ceyuan Yang, Kecheng Zheng, Yinghao Xu 외

Due to the difficulty in scaling up, generative adversarial networks (GANs) seem to be falling from grace on the task of text-conditioned image synthesis. Sparsely-activated mixture-of-experts (MoE) has recently been dem…

Image GenerationMixture-of-ExpertsPhilosophyvalid

FrameNeRF: A Simple and Efficient Framework for Few-shot Novel View Synthesis

2024-02-22 · Yan Xing, Pan Wang, Ligang Liu, Daolun Li 외

We present a novel framework, called FrameNeRF, designed to apply off-the-shelf fast high-fidelity NeRF models with fast training speed and high rendering quality for few-shot novel view synthesis tasks. The training sta…

NeRFNovel View Synthesis

More Context, Larger Models, or Moral Knowledge? A Systematic Study of Schwartz Value Detection in Political Texts

2026-05-21 · Víctor Yeste, Paolo Rosso arxiv

Detecting Schwartz values in political text is difficult because implicit cues often depend on surrounding arguments and fine-grained distinctions between neighboring values. We study when context and explicit moral know…