arXiv

FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement

Title: FLARE: Providing Fine-Grained Diagnostic Feedback to Enhance LLM Code Refinement

Large language models (LLMs) frequently produce code containing errors. Current approaches typically depend on feedback mechanisms—such as test failures and self-generated critiques—to iteratively improve the code. However, these signals are often either too broad or too abstract to effectively pinpoint the specific locations requiring correction. To address this limitation, we introduce Flare, an iterative framework that utilizes a lightweight diagnostic model to generate line-level suspiciousness metrics for precise bug localization and code refinement.

Acknowledging the inherent uncertainty in diagnostic predictions, Flare explores the top-k most suspicious code regions and identifies the optimal candidate based on execution results. Our experiments, conducted on LiveCodeBench and BigCodeBench using five base LLMs, demonstrate that Flare surpasses the strongest existing baseline by an absolute margin of 1.72% to 7.42%, even when operating without candidate search (k=1). Moreover, expanding the search to include 10 candidates results in an average performance gain of 8.50% compared to scenarios with no candidate search. When assessed independently, our lightweight diagnostic model outperforms recent fault localization techniques, confirming its capability to deliver dependable, fine-grained guidance for code improvement.


Source: arXiv Generated at: 2026-06-03 00:00:00 UTC

Related Articles

TikTok Billionaire Tops Ambani as Asia’s Second-Richest
Bloomberg

TikTok Billionaire Tops Ambani as Asia’s Second-Richest

TikTok founder surpasses Mukesh Ambani to become Asia’s second-richest person, marking a significant shift in the region...

Publishers in UK can opt out of Google AI search results
BBC News

Publishers in UK can opt out of Google AI search results

UK publishers can now opt out of Google’s AI search summaries, a CMA ruling designed to boost their bargaining power and...

Kioxia Edges Nearer Toyota’s Market Cap in Shakeup to Japan Inc.
Bloomberg

Kioxia Edges Nearer Toyota’s Market Cap in Shakeup to Japan Inc.

Kioxia’s market cap nears Toyota’s, signaling a major shift in Japan’s corporate hierarchy. This narrowing gap highlight...

Reuters

Morning Bid: Marvell, a fitting name for the latest AI darling

Reuters highlights Marvell as a top AI stock, noting its name perfectly suits its status as the newest market darling.

Financial Times

Tim Hayward: I built the Jaguar E-Type of computer keyboards

Tim Hayward compares his bespoke keyboard designs to the Jaguar E-Type. He explores high-end customization for personal ...

Financial Times

AI Labs: Zuckerberg’s $100bn gamble

Meta’s $100 billion AI investment aims to secure AI dominance, but questions remain whether sheer spending can outpace c...