Pith. sign in

REVIEW 3 cited by

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

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2412.02906 v1 pith:AQKUEMAZ submitted 2024-12-03 cs.SE cs.AIcs.CLcs.LG

classification cs.SEcs.AIcs.CLcs.LG
keywords examplesfew-shotcodecodinggenerationimproveworkcapabilities
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generation

    cs.SE 2026-08 conditional novelty 6.0 of 10

    COMPAS jointly optimizes model, prompt, and decoding settings separately for easy, medium, and hard code tasks, lifting LiveCodeBench pass@1 from 45.9% to 52.8% at 7.4x lower cost.

  2. Hawk: Harnessing Hardware-Aware Knowledge for High-Performance NPU Kernel Generation

    cs.AI 2026-07 unverdicted novelty 6.0 of 10

    Hawk raises NPU kernel generation accuracy from 49.4% to 80% and yields up to 2.2× speedups by retrieving and distilling structured hardware-aware knowledge without any model training.

  3. Rethinking Technology Stack Selection with AI Coding Proficiency

    cs.SE 2025-09 conditional novelty 6.0 of 10

    AI coding proficiency, a new measure of how effectively LLMs use a given library, reveals large quality gaps between competing Python libraries, with winners varying by model.

Pith tools