AI-Powered Refactoring Assistant Case Study | Pi School of AI

AI-Powered Refactoring Assistant

Case Study | Pi School of AI

Accelerating the refactoring of 2M+ lines of code with AI

Pi School partnered with Tipico to prototype an AI-powered assistant that accelerates refactoring of a large, complex monolithic codebase—unlocking faster development, lower costs, and improved code quality.

album-art
00:00

Powered by

Contact Pi School

Our Challenge

Modern engineering teams are under pressure to move fast, while maintaining reliability and scalability. For Tipico, this challenge was amplified by a monolithic codebase of over two million lines of code.
The existing system:

  • was difficult to maintain and evolve
  • slowed down onboarding for new engineers
  • increased delivery costs and technical risk

Off-the-shelf AI tools, including commercial coding assistants, struggled to handle the scale and complexity of the codebase. Limitations in context size and inconsistent outputs made them unreliable for real-world refactoring tasks.
With a lean internal R&D team, Tipico needed a custom AI solution that could be integrated effectively into their development workflow.

Our Approach

Pi School designed and engineered a bespoke AI-powered refactoring assistant, tailored specifically to Tipico’s codebase and engineering needs.

The solution extended Amazon Q through three core innovations:

Advanced Retrieval-Augmented Generation (RAG)
We built a custom RAG system that significantly improved how the assistant indexed, retrieved, and reasoned over the codebase—reducing hallucinations and increasing the relevance and precision of outputs.

Multi-Agent Orchestration
To overcome context window limitations, we implemented a multi-agent architecture that distributed the analysis across specialised AI agents. This enabled longer, more coherent refactoring sessions without losing context.

Custom Evaluation Benchmark
A bespoke benchmark was introduced to rigorously measure performance over time, ensuring the assistant delivered consistent, trackable improvements aligned with engineering goals.

The Results

The prototype delivered measurable and meaningful impact:

  • 50% faster refactoring workflows
  • 27% improvement in cost efficiency
  • 12% improvement in code quality

Crucially, the solution enabled use cases that were previously out of reach with standard AI tooling—supporting deeper analysis, follow-up interactions, and sustained engineering productivity.

What the Client Says

“The additional agent layered on top of Amazon Q enabled use cases that were previously out of reach. It allowed longer, more coherent sessions where we could follow up on the initial result without losing context. The answers were more precise, consistent, and grounded—far superior to what we saw with standard Amazon Q.”

— Nava Krishna Thotapalli
Software Architect, Tipico

“This was a truly exciting initiative for us. The results were strong, the collaboration was highly engaging, and it has given us a clear direction going forward. It feels like a 20% effort that delivers 80% of the value—and that’s where the real ‘wow’ lies.”

— Sabato Leo
Director of AI & Data Science, Tipico

Custom AI systems that unlock value and accelerate engineering delivery, seamlessly integrated with quality at the core.

Build AI That Works in the Real World

At Pi School, we don’t deploy generic AI solutions.
We work with organisations to design, prototype, and validate AI systems that solve real, high-impact problems.


Interested in exploring how AI could accelerate your engineering workflows?
Contact us to start the conversation.

Tipico Case Study

Name(Required)
Email(Required)
Please let us know what's on your mind. Have a question for us? Ask away.