AIAI EngineerJun 28, 2026· 14:57

Research to Reality: Bringing Frontier ML Research to Production - Vaidas Razgaitis, Higharc

Vaidas Razgaitis, Senior Research Engineer at Higharc, presents three tactical focus areas to accelerate the handoff of frontier ML research into production features. First, he advocates for a Research Prototype Taxonomy Document—a technical design document tailored for ML that maps domain context, business goals, type safety, persistence, and system architecture. Second, he details Higharc's monorepo of cleanly isolated microservices with a layered API/business logic/data structure, enabling researchers to own individual services. Third, he explains using Graphite for stack diffs to decompose monolithic prototypes into small, reviewable PRs that tap subject matter experts asynchronously. The talk offers diagnostic questions to assess team velocity across these three levers.

Transcript

Intro0:00

Vaidas Razgaitis0:01

Hey, I'm Vaidas, and I'm a Senior Research Engineer at Higharc, on our labs team. So, at Higharc, our labs team is basically our research and development arm, where we have machine-learning researchers who kind of explore the frontier of AI ML, uh, and figure out ways to apply it to home building.

Now, because we're in home building and we're in spatial reasoning, we pretty much end up needing to use a lot of what's out there in AI. So, computer vision to scan hand-sketched floor plans and parse them into our internal data model, um, reasoning agents to kind of carry the user through these agentic experiences.

We have custom transformers, we use diffusion models for image gen, and basically a lot of kind of what's out there in AI ML we end up needing to use because of the kind of multidisciplinary nature of our product.

So, hopefully that video gives you some idea of the research areas that we focus on that I've mapped out here, and that kind of leads us to, uh, the problem, which is: in this challenge of getting frontier research into production, we need to start working with software engineers, let's say platform engineers, infrastructure engineers, backend engineers, who are very familiar with building robust and production-grade code, but are likely not familiar with the methodology and research in computer vision in training your own LLMs, uh, and even some top-secret, uh, topics that I can't reveal here.

Problem1:07

Vaidas Razgaitis1:50

Now, you kind of have the flip-side problem with our ML researchers, who are very up to date with the latest papers and can pull together these concepts in novel and creative ways to develop new features, but they have not really worked as software engineers typically, where they've been responsible for production-grade APIs.

So, that's kind of what I want to get into, is this handoff, this baton pass, of how do we facilitate that, and how do we do it productively. And we look at this basically as a systems and process problem, and I want to kind of zero in on three main focus areas that you can use to improve

Research Legibility2:38

Vaidas Razgaitis2:38

the velocity of teams that are bringing research into production. So, the first thing we'll look at is research legibility. So, let's say you have an ML researcher who's produced a prototype concept. How can they map that out and make it digestible and understandable for these different software engineers and product managers who are going to be jumping into the project?

The second is how to structure your code base. So, we use a monorepo. How do you arrange your code and modularize it so that it's ready to receive these new prototype concepts and turn them around and stand them up quickly?

And then the third thing we'll look at is basically, you know, making the jump from a mapped-out, proven-out research prototype that's going to be going into this repo. How do you decompose that prototype and stand it up on best practices in software engineering?

So, taking a look at the first step, there's a really good article that I want to link, a blog from The Pragmatic Engineer, where he talks about software engineering teams as they grow and start to scale, how important it is to write out technical design documents, requests for comment, whatever you want to call it, specifications before building software as a way to align teams.

So, we have a very analogous document that we require from all research prototypes that we call the Research Prototype Taxonomy Document. So, it's really just a technical design document from software engineering, with some specific twists that make it more digestible, given its nature in machine learning.

So, the first thing in that document, we use Notion for this, but obviously any written document will work, is that we start with the kind of domain context and, like, what are the domain-specific, you know, we're in the architectural domain in home building.

So, what are these kind of novel ways to represent data? Maybe it's a party diagram, maybe it's a graph to represent the kind of circulation graph through a home, maybe it's embedding models or latent space representations. I like to say, kind of, picture a software engineer who just, we just hired from JP Morgan.

What are the kind of specific lingos and data representations that they might need to know before jumping into this project? The second is kind of mapping out the business goal,right? What's the, why does solving this problem matter, and what's the value in this ML tool?

And then the four remaining parts of this document are pretty kind of conventional software engineering principles you might see in a TDD. So, the type safety. So, we'll see later what our machine learning repo looks like, but what is the type contract between our core product repository and this machine learning repo?

How are those types shared, and how do they stay in sync? Then, kind of mapping out the persistence layer. Is there a database? This is an area where we think it's probably best not to have our researchers spend too much time in the persistence layer, and just map out how far they got.

And this is a great first entry point once we start bringing in software engineering help on the project. Then, kind of mapping out the overall system architecture. Is this a workflow? Is this a chaining of workflows? Are there external LLM calls?

Like, what is the anatomy? What is the kind of taxonomy of this research prototype? And lastly, how are we going to merge this? How are we going to decompose it? And we'll get into that more later as well.

So, going back to these kind of three levers we can pull, the first is kind of that research project taxonomy document. The second I want to get into are how we structured our code and how we serve our existing features.

Code Structure6:39

Vaidas Razgaitis6:58

So, we basically have a separate repository from our core product repo, and this is all Python-based,right? It's all AI ML stuff. And it's basically a monorepo of cleanly isolated and fully decoupled microservices. And so, let's say data-driven entity prediction is our custom transformer model.

So, that is able to opt to kind of grow and be iterated on and be fully decoupled from a different research initiative. And it's pretty much a one-to-one researcher-to-microservice ratio. So, we find that works really well. We have a kind of gateway that guards requests, and it's all in one Docker bridge network.

So, the core consumers, our clients in our web application, make kind of API calls to this gateway, which then routes them to the appropriate microservice. Now, looking a bit closer at these individual microservices, we tend to build them in a pretty simple layered architecture,right?

There's an API layer, the business logic, and the data layer. And then we tend to have, like, some really, really cleanly documented specs so that agents can navigate these repositories and help accelerate our ML researchers as much as possible.

So, yeah, kind of taking another way to look at this layered architecture, we have kind of the core business logic at the services layer. That might, you know, make external LLM calls to foundation models, or we might need to pull in our own machine learning model weights in CI/CD.

Then we wrap that business logic with controllers, then we put API routers around those and expose them in FastAPI applications. And each of those microservices is a standalone application. And like I said on the last slide, it's not really the client that makes a direct call to this microservice.

It kind of goes to that gateway first, which routes it to the appropriate microservice. And then, within each of those microservices, in the root directory, we have essentially metadata, build instructions, a Docker file on how to build this application, the kind of project dependencies, and then poetry or UV lock files as needed.

And then, so, I'd like to kind of map out this anatomical arrangement of our kind of three microservices that we have into production. And we can kind of see these trends and consistent skeletal backbones of these projects, and it's very easy to map them out and make sure that they're growing along best practices in software engineering.

So, that's basically it for our monorepo. We have these kind of microservices, and then sharing, basically, like, underneath all of that in the repository, we have some GitHub actions to build and deploy, our automated test suites, and kind of linting, formatting, and type checks, all the stuff you'd kind of expect.

We have some Jupyter notebooks that run on Modal for GPU compute, as well as some additional ML studies. But really, the way we look at it is we have this kind of tooling layer and even this kind of fun CLI, but these all just support our ML engineers in bundling up these microservices that we serve in production.

So, that's kind of the RPT, is the handoff document between an ML researcher and additional software engineering talent. The monorepo is where that research project is ultimately going. And then the only remaining step is, well, how do we get there,right?

Decomposition10:33

Vaidas Razgaitis10:52

How do we jump from one to two? And the third lever I want to talk about is the kind of decomposition and PR review plan. And we look at that really as a design problem, where we need to kind of figure out how to slice and dice a large research monolithic prototype.

So, here are just some images of a platform-wide agent feature where, you know, we really studied what axes to slice and dice these projects up on, what that dependency graph would look like. And then we use Graphite for kind of stack diffs to then decompose these large monolithic prototypes that have been proven out, and then get theright eyes on review to make sure that these are ready for production.

We really like Graphite because it allows for asynchronous review,right? I could be working on a PR all the way up here while a domain specialist is still reviewing a different PR. And once we've kind of decomposed these PRs thoughtfully, we can start tapping subject matter experts throughout the organization on the specific slices or smaller, tightly decomposed PRs that they need to look at.

And so, again, there's a lot of overlap between this initial research project taxonomy document, where once we've mapped out these layers, the architecture, what kind of persistence there is in the types, that tends to inform your decomposition strategy on how to bring it into the monorepo.

Wrap-Up12:31

Vaidas Razgaitis12:31

So, to wrap things up, I want to revisit these kind of three focus areas that you can use to evaluate how well your team is bringing research into production. And I want to talk about kind of some diagnostic frameworks to understand if you need to spend a bit more time and attention in any of these three.

So, in the first step, with your research legibility, as your team starts to staff research initiatives with product people, with software engineers, with AI engineers, is it obvious where they should concentrate their efforts? And is it clear what kind of tasks they need to pluck off to bring this prototype into production?

If there's ambiguity there, you may need to spend some time revisiting this process. In step two, your code repository, as you start getting ready to bring prototypes into your production-grade code base, is it clear where these buckets lie to put in new code?

Are there templates and existing frameworks and patterns that you can mimic? Or is it possible that maybe you've started to outgrow that code base and that system architecture, and every time you bring in new research concepts, you're fighting these old abstractions and having headaches from limitations of your repository?

And then lastly, in the decomposition phase, are you able to consistently estimate the timelines and delivery dates for moving research concepts into your repository? Is it clear which subject matter experts you should tap for review and for productionizing this research?

And if you're having issues here, it probably points to upstream issues, either in how this research is being coordinated and handing off, or perhaps the code base that's hosting it. Anyway, that's about all I've got. I hope this was helpful.

I love thinking about ways how our team can speed up, how quickly we can bring research concepts into production. And if you made it this whole way, you're probably interested in that stuff too. And I would love to compare notes and trade ideas anytime.

Thanks again.