How Google Uses LLMs to Migrate Code Across Its Monorepo
summary
Google builds a deterministic LLM pipeline that finds references via the Kite code index (tracing up to five hops), categorizes every hit, runs an internal Gemini model at temperature zero in three passes with parsers that reject whitespace or syntax-breaking edits, and auto-creates PRs with presubmit tests and owner notifications for staged rollout. The team migrates 39 IDs from int32 to int64 in 9 months, hits 35% AI-only, 38% AI+human, 25% human-only, and notes failures from golden files, preexisting test failures, and context-window limits.
AI-written summary · about
chapters (10)
- 0:00Introduction and background
- 1:52Google's monorepo challenges
- 10:06Problems with manual migrations
- 12:13AI-powered migration system overview
- 21:02Prompt engineering for code changes
- 23:31Validating AI-generated changes
- 32:27Measuring success and metrics
- 34:40Lessons learned from automation
- 39:58Other migration examples
- 43:52Conclusion and papers
related talks
01h 00mLarge-Scale Changes at Google: Lessons Learned From 5 Yrs of Mass Migrations
29mHow to roll your own LLM
40mTechniques to avoid common LLM pitfalls
51mGemini, Google's Large Language Model
28mAI Migration at SCALE: Make Complex Code Tasks 10X Faster (The Blueprint)
47mValidating LLMs – A True Story
26mReverse Engineering Using LLMs
32mRunning and Fine-tuning Open Source LLMs on Google Kubernetes Engine
