Nemotron-CORTEXA: Enhancing LLM Agents for Software Engineering Tasks via Improved Localization and Solution Diversity

Atefeh Sohrabizadeh, Jialin Song, Mingjie Liu, Rajarshi Roy, Chankyu Lee, Jonathan Raiman, Bryan Catanzaro

Large Language Models (LLMs) have proven remarkably adept at generating small code snippets from natural language instructions. However, real-world software engineering—such as debugging across multiple files or implementing features in massive, unfamiliar codebases—remains a significant challenge.

To bridge this gap, researchers have introduced Nemotron-CORTEXA, an agentic framework designed to tackle complex, repository-level software engineering tasks. By combining a specialized code embedding model with an ensemble of localization agents and a novel strategy for diverse solution generation, Nemotron-CORTEXA achieves state-of-the-art results on the SWE-bench benchmark while remaining highly cost-effective.

The Challenge of Repository-Level Engineering

When applied to enterprise-scale repositories, standard LLMs encounter three primary hurdles:

  1. Context Limits: Real-world repositories vastly exceed standard LLM context windows, making it difficult to isolate the specific files requiring modification.
  2. Brittle Reasoning: Standard autoregressive decoding often breaks down when navigating complex, multi-step logic.
  3. Inefficient Navigation: Existing autonomous agents tend to either wander aimlessly through a repository—incurring high API costs—or operate too rigidly to locate the specific functions causing a bug.

The Nemotron-CORTEXA Framework

To address these bottlenecks, Nemotron-CORTEXA employs a structured, two-stage pipeline: Localization and Repair.

Stage 1: Precision Localization

Finding the exact location of a bug is often harder than fixing it. Nemotron-CORTEXA overhauls the retrieval process using several key innovations:

  • NV-EmbedCode: The researchers developed a specialized embedding model fine-tuned to map natural language bug reports to relevant "oracle" files. They discovered that using an LLM to summarize a noisy GitHub issue into core technical details (like stack traces and filenames) prior to embedding significantly improved retrieval accuracy.
  • The Localization Agent: Once top candidate files are retrieved, an agent explores the codebase using a Code Graph built via Abstract Syntax Trees (AST) and Language Server Protocols (LSP). It utilizes tools like get_definition and get_incoming_dependency to trace data flow.
  • Model Ensembling: Rather than relying on a single model, the framework ensembles DeepSeek-v3, GPT-4o, Llama-3.3, and Qwen2.5. Because different models have different blind spots, combining their outputs boosted the recall of buggy entities by over 20%.

Stage 2: Diverse Patch Generation

Traditionally, systems generate multiple candidate fixes by increasing the LLM's "temperature" (randomness). Nemotron-CORTEXA instead induces diversity structurally:

  • Context Variation: The model is prompted with different scopes of information, such as the entire file versus only the specific buggy functions.
  • Prompt Format Variation: The system asks for fixes using different formats, such as a "search/replace" block versus a structured edit_file API.

Researchers found that LLMs are highly sensitive to how they are asked to edit code. Varying the format triggers different reasoning paths, uncovering correct solutions that a single prompting style would have missed.

Key Results and Performance

Nemotron-CORTEXA sets a new standard for both efficiency and accuracy in autonomous software engineering. Evaluated on real-world GitHub issues, the framework demonstrated impressive metrics:

  • Resolution Rate: It successfully resolved 42.00% of issues on SWE-bench Lite and 52.60% on SWE-bench Verified.
  • Cost Efficiency: The system achieved these results at an average cost of just $0.51 per issue. By comparison, the popular Agentless framework costs $0.70 per issue, and OpenHands costs $1.10, both with lower resolution rates.
  • Retrieval Accuracy: The NV-EmbedCode model achieved a 70.33% recall@k on SWE-bench Lite, vastly outperforming standard lexical search (BM25) and general-purpose embedding models.

Limitations and Future Directions

While Nemotron-CORTEXA represents a major step forward, the authors note areas for future refinement. Currently, the system uses majority voting to select the final patch from its diverse generated candidates. However, because the solutions are intentionally diverse, the "correct" fix might only appear once, causing majority voting to discard it. Additionally, LLM-generated reproduction tests can sometimes be flaky, leading the agent to reject valid fixes.

Looking ahead, the researchers suggest that integrating advanced reasoning models (such as OpenAI's o1) during the patch generation stage, combined with more robust LLM-based scoring for patch selection, could theoretically push the resolution rate as high as 68.4%.

Summary updated

BibTeX
@inproceedings{sohrabizadeh2025nemotron,
  author = {Atefeh Sohrabizadeh and Jialin Song and Mingjie Liu and Rajarshi Roy and Chankyu Lee and Jonathan Raiman and Bryan Catanzaro},
  title = {{Nemotron-CORTEXA: Enhancing LLM Agents for Software Engineering Tasks via Improved Localization and Solution Diversity}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=k6p8UKRdH7},
}
Figure