Skip to Content
AI for Mass-Scale Code Refactoring and Analysis
book

AI for Mass-Scale Code Refactoring and Analysis

by Justine Gehring, Olga Kundzich, Pat Johnson
September 2024
Intermediate to advanced
42 pages
55m
English
O'Reilly Media, Inc.
Content preview from AI for Mass-Scale Code Refactoring and Analysis

Chapter 2. Techniques for Scaling AI for Large Codebases

As we look at our AI world of infinite interns applied to mass-scale code refactoring and analysis, we must look at how to supervise our interns more effectively. How can we build guardrails for them to work faster with a higher accuracy rate? In addition, how can we ensure the most efficient, cost-effective AI implementations for working on massive codebases?

One thing to keep in mind is that AI models have knowledge gaps when it comes to large codebases. A model cannot code using a framework it has never been trained on. Additionally, they are not trained on private data, such as a company’s codebase, out of the box. Processing codebases with millions of lines of code would overwhelm the model, leading to increased latency and noise that affects accuracy, assuming the model is even capable of managing such a large volume. New and helpful data beyond the prompt must be provided as context to the model in real time for fully understanding and refactoring large codebases.

Tip

A long context window for an LLM creates a challenge for the model to find information. The model must sift through a large amount of data to locate relevant information, which can be akin to finding a needle in a haystack. In general, as the context length increases, the model’s ability to maintain coherence and relevance diminishes.1 This is due to the model managing more distractions and irrelevant information, which can cloud the focus on the primary ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Clean Code Cookbook

Clean Code Cookbook

Maximiliano Contieri
How AI Creates a Capability Mirage

How AI Creates a Capability Mirage

Melissa Swift, Teryluz Andreu, Dolores Hernandez

Publisher Resources

ISBN: 9781098175849