

Like many massive enterprises, we should navigate the wonder and chaos of legacy code. In our case, many years of SQL procedures and enterprise logic that underpin a platform able to dealing with over 3 million concurrent customers and a whole lot of micro code deployments per week. It’s a posh machine. Contact one half, and also you danger breaking 10 others. That’s why modernizing the codebase is each a technical problem and a human one. It requires empathy, belief, and the power to make knowledgeable guesses.
Contained in the Innovation Engine
At bet365, the platform innovation perform was established to impress chance. We’re a small, specialised crew charged with exploring rising and future applied sciences. Our goal is to determine the place they will have the best affect, and assist the broader group perceive find out how to use them meaningfully.
We’re enablers and ambassadors for change. Our work spans every part from product growth and cybersecurity to the way forward for the workforce. Our guiding mannequin is McKinsey’s Three Horizons of Development reimagined for innovation. Horizon 1 focuses on what we will implement right this moment. Horizon 2 explores what’s coming subsequent. Horizon 3 dares us to think about the longer term nobody is speaking about but.
This framework helps us steadiness ambition with pragmatism. It creates house to experiment with out shedding sight of operational worth, and it ensures our builders, architects, and stakeholders are all a part of the identical dialog.
When GenAI Met Builders
When GPT-4 dropped in 2023, every part modified. Like most within the tech world, we had been fascinated. Generative AI supplied a tantalizing imaginative and prescient of the longer term stuffed with sooner insights, prompt summaries, and automatic refactoring. However the pleasure rapidly gave solution to doubt. We handed very succesful builders a strong LLM and stated, “Go for it.” The outcomes had been blended at finest.
They inserted code into the immediate home windows, stripped out context to avoid wasting house, and hoped the AI would perceive. It didn’t. Builders had been confused, annoyed, and, understandably, skeptical. They noticed the AI as a shortcut, not a accomplice, and when the output didn’t match expectations, frustration adopted. Many requested the identical query: “Why am I asking a machine to write down code I might simply write myself?”
What we realized was profound. The issue wasn’t the AI. It was the connection between the AI and the individual utilizing it. We had assumed that ability in software program engineering would mechanically translate to ability in immediate engineering. It didn’t. Did we miss one thing? The purpose we couldn’t overlook was in the course of the train, our builders had been finishing the duties constantly round 80% of estimated time. There was undoubtedly one thing right here. We simply weren’t certain what it was. So, we went again to fundamentals.
Vibe Coding and the Limits of Belief
There’s a brand new time period in developer tradition: “vibe coding.” It’s the place you throw a piece of code at an LLM, get a response, tweak it, throw it again. Iterate quick. Ship sooner. It’s fashionable. It’s seductive. But it surely isn’t danger free.
With out a clear understanding of intention or context, vibe coding can rapidly turn into a recreation of trial and error. And when your system is as complicated as ours – many databases processing 500,000 transactions a second – “trial and error” isn’t ok. We wanted greater than vibes. We wanted imaginative and prescient.
Context Over Content material
The turning level got here after we realized the true job wasn’t educating AI find out how to write higher code. It was educating people find out how to talk with AI. We realized a brand new mantra: intention + context + element. That’s what the AI wants. Not simply content material. Not simply “repair this perform.” However: “Right here’s what this code does, right here’s why it issues, and right here’s what I want it to turn into.” This perception is vital.
Our builders, particularly these tackling probably the most complicated, interdependent issues, tailored rapidly. They had been used to considering deeply, offering rationale, and navigating ambiguity. They received it. They fed the AI what it wanted. They flourished. The distinction was mindset. We got here to name this phenomenon “the unreliable narrator.” Not simply the AI, however the developer. As a result of typically, the issue wasn’t that the machine received it mistaken. It was at instances that we weren’t clear on what we had been asking.
RAG, GraphRAG, and the Energy of Grounded Context
To construct dependable, human-aligned AI assist we would have liked a solution to floor what the AI was seeing the truth is. That’s the place we noticed the ability of Retrieval-Augmented Technology (RAG). RAG permits an AI mannequin to retrieve related context from an exterior supply – like documentation, system metadata, or a information base – earlier than producing a response. It’s sooner to implement and extra versatile than fine-tuning, making it splendid for dynamic, domain-intensive environments like ours. Builders can replace the information base with out retraining the mannequin, retaining outputs present and grounded.
However RAG has its limits. When a query spans a number of programs or requires reasoning throughout disconnected items of knowledge, conventional RAG, which is predicated on textual content similarity, begins to falter. That’s why we turned to GraphRAG, a extra superior method that makes use of a information graph to boost LLM outputs.
A information graph doesn’t simply maintain information, it encodes relationships. It captures how elements work together, the place dependencies lie, and what might break if you happen to change one thing. GraphRAG makes use of this construction to reinforce prompts at question time, giving the AI the relational context it must reply with precision. That is very true in environments the place accuracy is important, and hallucinations are unacceptable.
As a real-world train, we checked out our SQL server property. We needed to construct a system that we might use to realize invaluable perception on how the system works.
To construct it, we began by parsing all our database objects together with tables, views, procedures, features, and so forth. into summary syntax bushes (ASTs). Utilizing Microsoft’s ScriptDOM, we extracted key information and used them to assemble the preliminary information graph. We overlaid this with pure language descriptions to additional clarify what every ingredient did, and added runtime statistics like execution frequency, CPU time, and skim volumes.
The consequence was a wealthy, relational illustration of our SQL property, full with contextual insights about how objects are consumed and the way they work together. Then we surfaced this intelligence to builders by three core instruments:
- A chatbot that lets customers question the system in plain language
- A visualiser that renders a 3D map of dependencies and relationships
- A Cypher executor for superior graph querying and evaluation
What’s necessary to notice is that many of the system’s worth lies within the graph, not the mannequin. The AI doesn’t must know every part. It simply must know the place to look, and find out how to ask the proper questions. That’s the ability of grounding.
For us, GraphRAG wasn’t only a nice-to-have, it grew to become important. It helped us transfer from generic code help to one thing way more invaluable: a system that understands what our code means, the way it behaves, and what it impacts.
We’re not simply writing code anymore. We’re curating it. We’re shaping the intentions behind it. Our builders now have tooling to realize additional perception to turn into code reviewers, system designers, and transformation brokers at an skilled degree throughout enormous division spanning architectures. All from a easy interface permitting pure language inquiries That’s the true shift. The longer term isn’t about AI doing our jobs. It’s about reimagining what the job is.
The success of our code modernization program has little to do with algorithms and every part to do with perspective. We needed to unlearn previous habits, rethink our relationship with code, and embrace a tradition of curiosity. We needed to cease asking AI for solutions and begin giving it the proper questions. The know-how was the straightforward half. The individuals half, now that was the true breakthrough.