Finally, we also used a tool, AIDAR, which was also AI-based. This tool helped us in automating the git commits and it also helped in creating a nice commit message and description so that the user who is going to review the pull request, they know what has been done and it makes the request reviews easier for them. For the tool, we also had a regression testing framework in place. What we had was a golden set of migration examples before and after and whenever we made changes to the prompts, we tried to run the tool again on the before examples and then compare it with the after examples. We compared it manually or either through LLM and this was used to see if there was any regression or decrease in accuracy of the tool. It was also very helpful if we wanted to test out a new model and see how that model was behaving.
Another thing we had to do to maintain the accuracy of the LLM output was to manage the context size of the prompts that we sent to the tool. First, we wanted to try to run the tool with as many components as possible. However, what we noticed is that if the context size becomes very large, the accuracy of the output started degrading quite a bit. So what we, after a bit of trial and error, figured out is that around 40,000 token size was a good size for the prompt and that's what we used for our tool. So we migrated a small set of components, ensuring that the token size was under 40,000 token.
Now, let's talk a little bit about what was the outcome. We were able to migrate 11 plus complex B2B applications. These applications were quite complex applications. Each of these applications migration was expected to take between one to four months and LLM assisted in this migration by performing the most repetitive and the common transformation or migration tasks, setting up our design product and engineering team to focus on more challenging task, polishing the UI, refining bugs, testing, and then deploying and merging. LLM also carried out the transformations or migration with a very high accuracy of 90 percent and above. And many of these, and there were no specific issues here. It was few bugs here and there, but most of the things were just unused input. So this ensured that our engineers did not need to spend a lot of time fixing issues caused by LLMs. The cost per repository for us was 40 USD. If you look at how much effort the LLM saved us during this migration, this was a very good return on investment. On the other hand, we also faced one incident here. This incident was due to the fact that when LLM migrated the data expected by a component, the LLM made a mistake in that migration. However, this issue was very hard to catch and it also got missed during the review, resulting in the code being deployed to production and the users saw a broken page. Two learnings from this incident for us were, first, LLMs can generate a bit plausible code, which looks plausible, but it can be incorrect. And that's why it's very important that whenever you have something like this, some code generated by LLM, you should review it very carefully. Another issue was that when LLMs migrate the code, it can create a knowledge gap because the users have not migrated it themselves. So they may lack a little bit of familiarity with the library. So, and this actually may cause an incident or it may cause debugging difficult and so on.
Comments