Search papers, labs, and topics across Lattice.
This paper introduces TipCoder, a novel approach for enhancing code generation by generating problem-specific auxiliary tips at test time, addressing common coding failures linked to incomplete constraints and misleading prompts. By leveraging reinforcement learning to optimize the instruction proposer with a marginal-utility reward, TipCoder effectively balances exploration and exploitation during code synthesis. Experimental results demonstrate that TipCoder outperforms traditional methods like stochastic sampling and generic prompt optimization, providing a robust instruction-level scaling strategy for code generation tasks.
TipCoder reveals that generating tailored auxiliary tips can significantly enhance code generation performance by addressing overlooked constraints and edge cases.
Test-time scaling for code generation typically explores the solution space by sampling multiple programs from a fixed instruction. We study a complementary direction: instance-level instruction-space exploration. Our observation is that many coding failures stem from missing constraints, overlooked edge cases, or misleading reasoning paths induced by the original prompt. To address this, we propose TipCoder, a test-time instruction proposer that generates problem-specific auxiliary tips before code synthesis. TipCoder distills multi-turn debugging trajectories into proactive guidance and further optimizes the Proposer with reinforcement learning using a marginal-utility reward. At inference time, it generates both a base solution and a tip-guided solution, and applies a Reward Model for post-hoc selection. This exploration-selection design allows tips to expose additional candidate potential while reducing regressions from unnecessary guidance. Across the evaluated code-generation benchmarks and target Code LLMs, TipCoder provides a consistent instruction-level test-time scaling strategy, comparing favorably with stochastic sampling and generic prompt optimization baselines under a shared reward-model-based selection protocol.