LiveCoder: Optimizing Repository-Level Code Generation

Date:

Persistent Cross-Attempt State Optimization for Repository-Level Code Generation

Summary: arXiv:2604.03632v1 Announce Type: cross

Abstract

Large language models (LLMs) have achieved substantial progress in repository-level code generation. However, solving the same repository-level task often requires multiple attempts, while existing methods still optimize each attempt in isolation and do not preserve or reuse task-specific state across attempts. In this paper, we propose LiveCoder, a novel framework for repository-level code generation based on cross-attempt knowledge optimization.

Introduction

LiveCoder maintains persistent task-specific state from prior attempts to guide subsequent generation. This state includes:

  • Success Knowledge: Captures reusable signals from previously strong repositories.
  • Failure Knowledge: Records unsuccessful outcomes and their diagnostic signals.
  • Historical-Best Repository: Preserves the strongest result found so far and prevents regression.

Methodology

These components collectively transform repeated repository generation into a persistent, knowledge-driven optimization process. By leveraging insights gained from previous attempts, LiveCoder enhances the efficiency of code generation tasks.

Evaluation

We evaluate LiveCoder using four frontier LLMs on two representative repository-level code generation benchmarks. The performance metrics are designed to assess both functional and non-functional qualities of the generated repositories.

Results

Extensive experimental results demonstrate the effectiveness and efficiency of LiveCoder. Key findings include:

  • Improvement in functional score by up to 22.94 percentage points.
  • Increased repository reuse to 81.58%.
  • Reduction in cost by up to 53.63% on RAL-Bench.
  • Maintaining broadly stable non-functional quality throughout the evaluation.

Conclusion

LiveCoder represents a significant advancement in the field of repository-level code generation by introducing a framework that optimizes across multiple attempts. By preserving and utilizing knowledge from prior attempts, it not only improves the efficiency and effectiveness of code generation but also sets a new standard for future research in this domain.

Future Work

Future research may explore the integration of additional data types and learning strategies to further enhance the capabilities of LiveCoder. Furthermore, refining the mechanisms for knowledge preservation and reuse could lead to even more robust performance in various coding tasks.


Related AI Insights

Lazarus Omolua
Lazarus Omoluahttps://richlyai.com/blog
My mission is to make sure that people in Africa are not left behind in the global AI revolution. RichlyAI exists to give everyone — students, founders, creators, and businesses — the tools to compete globally.

Subscribe

Popular

More like this
Related

How Business Ops Teams Boost Productivity with Codex

Discover how business operations teams use Codex to streamline documentation, enhance collaboration, and improve decision-making with AI-powered automation...

OpenAI Partners with Malta to Offer ChatGPT Plus Nationwide

OpenAI and Malta team up to provide free ChatGPT Plus access and AI training to all citizens, promoting digital literacy and responsible AI use.

Critical Linux Kernel Flaw Risks SSH Host Key Theft

A critical Linux kernel flaw risks stolen SSH host keys. Learn how to protect your systems and stay secure until patches are widely available.

Top External Hard Drives 2026: Expert Reviews & Buying Guide

Discover the best external hard drives of 2026 with expert reviews. Find top picks for speed, durability, and security to suit all storage needs.