Pith. sign in

REVIEW 5 cited by

Code Repair with LLMs gives an Exploration-Exploitation Tradeoff

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 2405.17503 v3 pith:4NADR33A submitted 2024-05-26 cs.SE cs.AIcs.CLcs.PL

classification cs.SEcs.AIcs.CLcs.PL
keywords programcasescodetestiterativelylanguagellmsproblems
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
read the original abstract

Iteratively improving and repairing source code with large language models (LLMs), known as refinement, has emerged as a popular way of generating programs that would be too complex to construct in one shot. Given a bank of test cases, together with a candidate program, an LLM can improve that program by being prompted with failed test cases. But it remains an open question how to best iteratively refine code, with prior work employing simple greedy or breadth-first strategies. We show here that refinement exposes an explore-exploit tradeoff: exploit by refining the program that passes the most test cases, or explore by refining a lesser considered program. We frame this as an arm-acquiring bandit problem, which we solve with Thompson Sampling. The resulting LLM-based program synthesis algorithm is broadly applicable: Across loop invariant synthesis, visual reasoning puzzles, and competition programming problems, we find that our new method can solve more problems using fewer language model calls.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 5 Pith papers

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

  1. Does Fixing Break Security? An Empirical Study of Security Degradation in Iterative LLM-Driven Infrastructure-as-Code Repair

    cs.SE 2026-08 conditional novelty 6.0 of 10

    Iterative LLM repair of Terraform code causes a security regression in about 3.3% of scenarios under strict counting, most often through resource restructuring, with iteration 3 as the recommended stopping point.

  2. Generating Diverse Hypotheses for Inductive Reasoning

    cs.AI 2024-12 conditional novelty 6.0 of 10

    MoC generates K diverse concepts, then conditions hypothesis generation on each concept, yielding more semantically diverse LLM hypotheses and higher inductive-reasoning accuracy than IID sampling at equal K.

  3. VeCoGen: Automating Generation of Formally Verified C Code with Large Language Models

    cs.SE 2024-11 conditional novelty 6.0 of 10

    VeCoGen automatically generates and formally verifies loop-free C functions from ACSL and natural language specifications, solving 13 of 15 Codeforces problems with its default model.

  4. VisualPatchWorld: Code World Models as Latent Structured Representations for Planning

    cs.CL 2026-07 conditional novelty 5.0 of 10

    A two-level induction procedure—active-probe sketch selection plus multi-step rollout fitting—recovers executable code world models that improve CEM planning over prior code baselines on four LeWM tasks.

  5. SVA-ICL: Improving LLM-based Software Vulnerability Assessment via In-Context Learning and Information Fusion

    cs.SE 2025-05 conditional novelty 5.0 of 10

    An in-context learning approach that retrieves similar vulnerability examples by fusing code and description similarities improves LLM-based severity assessment over prior baselines.

Pith tools