Artificial Intelligence, AI, as it is popularly known, is making a transformative change in literally everything and is providing us a peep into the future. There are lots of discussions on the fate of coders in the new AI landscape, how much AI will intrude into their existence. Will it wipe it off completely in the days to come? While this debate rages hugely tilted to the side of AI, there is another unheard of tech area so far, where AI has done wonders in a very known use case by now. Aptly put, the question and problem statement is; Is AI the future of large-scale code migration?
The answer as it stands now is in the affirmative and as we move ahead, the finality and exponential pace would happen for sure. Just give a serious thought to the headline that follows and you would get the hang of it. “How Airbnb Used AI to Finish an 18-Month Code Migration in Just 6 Weeks.” The fate of manual coding is now more than well accepted by now. Airbnb’s recent revelations clearly indicate how AI would increasingly be used to manage and migrate codebases. What has Airbnb achieved to make the world so confident of what AI can do in this area? And the tech world has to sit up and listen.
What has Airbnb been able to achieve? The company has completed its first large scale, LLM driven code migration, updating around 3,500 React component test files from Enzyme to React Testing Library (RTL). This is what has been achieved, commendable you might say. The real story is how much did it take and the process thereof. The original estimated engineering time for the task to be done by hand was estimated to be 1.5 years, as compared to that the whole exercise was completed in just 6 weeks. The task was fulfilled using a combination of frontier models and robust automation.
The company in mid 2023 the company validated the concept of using LLMs to successfully convert hundreds of enzyme files to RTL in just a few days. Scale was then the challenge. Subsequently, the company constructed a scalable pipeline for an “LLM-driven migration” last year. Through experimentation brute-force retry loop was found to be most effective. Prompt context was found to be critical besides increasing the retry attempts. Prompts had expanded to anywhere between 40,000 to 1,00,000 tokens. Though this successful use case is making waves, Airbnb’s success story isn’t a first for code migrations driven by AI. Google and Amazon have revealed something similar in the past.
FROM CODE TO CODE MIGRATION, AI IS BREAKING EVERY BARRIER.
Sanjay Sahay
Have a nice evening.