Customizing an LLM for Enterprise Software Engineering

Aditya Kini, Satish Chandra, Milad Hashemi, Saksham Thakur, Aditya Pandey, Vincent Nguyen, Marc Brockschmidt, Franjo Ivančić, Danny Tarlow, Parthasarathy Ranganathan, Petros Maniatis, Ahmed Omran, Zaheer Abbas, Anita Gergely, Martin Sevenich, Gufeng Zhang, Amy Hua, Alexander FrömmgenarXiv 2026

TL;DR

The paper introduces Gemini for Google (GfG), a specialized version of the Gemini model tailored for Google’s massive internal software engineering ecosystem. By training on a trillion-token proprietary dataset using a novel mid-training intervention strategy, GfG significantly boosts developer productivity—reducing conversational iterations by 23% and increasing code survival rates by 17% in a live study of 29,000 developers.

What Problem Does This Paper Address?

While frontier large language models (LLMs) excel at generating standalone, "greenfield" code for algorithmic puzzles (like those in standard HumanEval benchmarks), they struggle in complex enterprise environments. In the real world, developers spend most of their time maintaining, refactoring, and navigating massive legacy codebases filled with proprietary libraries, custom APIs, and unique internal workflows.

General-purpose models lack exposure to these internal data distributions. To bridge this gap, organizations often turn to Retrieval-Augmented Generation (RAG) or low-rank adaptation (LoRA), but these methods can yield mixed results or lack the representational capacity needed to master a trillion-token ecosystem. This paper provides a comprehensive blueprint for deep domain adaptation via full-parameter tuning.

Methods

Instead of training a model from scratch—which is computationally prohibitive—or applying standard fine-tuning at the very end, the authors use a Mid-Training Intervention Strategy.

  • Torso-Patching: They branch off from an earlier foundational checkpoint of Gemini (before its final convergence phase) and inject the enterprise data mixture.
  • Data Replay: To prevent catastrophic forgetting (where the model loses its general reasoning and language skills due to a massive shift in data distribution), they mix a portion of the original pre-training data back into the enterprise dataset.
  • Custom MoE Routing: Google observed that standard Mixture-of-Experts (MoE) load-balancing failed on highly homogenous internal data, leading to "expert collapse" (where the router disproportionately favors only a few experts). They customized the routing technique to ensure stable training.

Datasets

The authors curated a trillion-token scale internal dataset categorized into six primary domains:

  1. Change-Generation: Code review comments and their corresponding code resolutions (the "critique-and-refine" dialogue).
  2. Knowledge: Internal technical documentation, API references, design docs, and Q&A repositories.
  3. Issues and Fixes: Bug tracking data, test failures, and build error resolutions.
  4. Code Generation: Code written by Google developers, formatted for Context-Aware Infilling (Fill-in-the-Middle).
  5. Logs and Performance: Production metadata, efficiency edits, and distributed computation traces (Dapper).
  6. Activity Timelines: Coarse-grained workflow data mapping tool usage and search queries.

For example, the build-fixing dataset leverages fine-grained IDE instrumentation to capture exact code edits that transition a project from a "Failure" to a "Success" state.

Figure 3: A developer’s IDE editing session is visualized as a series of snapshots, numbered sequentially. Fine-grained logging within the IDE captures each editing action. In this example, a build failure occurred at snapshot 2, and the build was successful at snapshot 5. Consequently, the changes made between snapshot 2 and snapshot 5 represent the edits that resolved the build issue.

Key Insights and Ideas

  • "More Data" Isn't Always Better: The authors initially included a ReAct-style dataset (reasoning traces) in pre-training to boost logic. However, this caused negative transfer, interacting poorly with the post-training phase and degrading the model's precise function-calling behaviors.
  • Minimize "Syntax Shock": Restructuring internal data into highly customized formats caused regressions. The winning strategy was aligning internal data schemas to match the base model's original pre-training format.
  • The Evaluation Gap: Standard static benchmarks (like pass@k on unit tests) fail to capture developer satisfaction or the nuances of maintaining legacy code. Real utility must be measured via live production telemetry and LLM-as-a-judge frameworks.

Key Results

The model was evaluated in a massive, blind A/B study across 29,000 active Google developers.

Quantitative Improvements:

  • Efficiency: GfG achieved a 23.1% reduction in conversational iterations per turn, meaning developers got the right answer much faster. Turn latency also dropped by 8.9%.
  • Code Acceptance: The "hunk acceptance rate" (contiguous blocks of code accepted by developers) increased by 4.5%.
  • Impact: Code generated by GfG stuck around longer, showing a 16.8% increase in code survival rate in final submissions compared to the baseline model.

Industrial Case Studies:

  • Infrastructure Modernization: GfG automated 80% of code changes for a massive migration from 32-bit to 64-bit IDs in Google's Ads infrastructure, cutting total project time by 50%.
  • Code Efficiency (ECO): An automated pipeline using GfG to optimize code performance saved an estimated 500,000 normalized CPU cores per quarter.

Limitations and Future Work

Because the datasets, codebases, and telemetry used in this study are strictly confidential and proprietary to Google, the exact training mixtures cannot be publicly released. Additionally, the authors note that evaluating generative models in enterprise environments remains an open challenge. Future work will focus on exploring synthetic or agent-generated data trajectories to further refine model capabilities.

Summary updated

BibTeX
@misc{kini2026customizing,
  author = {Aditya Kini and Satish Chandra and Milad Hashemi and Saksham Thakur and Aditya Pandey and Vincent Nguyen and Marc Brockschmidt and Franjo Ivančić and Danny Tarlow and Parthasarathy Ranganathan and Petros Maniatis and Ahmed Omran and Zaheer Abbas and Anita Gergely and Martin Sevenich and Gufeng Zhang and Amy Hua and Alexander Frömmgen},
  title = {{Customizing an LLM for Enterprise Software Engineering}},
  year = {2026},
  eprint = {2605.16517},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.16517},
}
Figure