Engineering solutions for reuse

Alloy from QuantumBlack, AI by McKinsey

--

Organizations face significant challenges when scaling their AI efforts beyond experiments and proof-of-concept models. This article examines how QB Labs developed Alloy with the goal of enabling code reuse across an enterprise — by assetizing domain knowledge into code components, managing them at scale (testing, versioning, publishing), and assembling them into a variety of AI use cases. It describes Alloy’s three core units of management: code components (pipelines/packages), use case templates, and assembled AI use case applications that are ready to be installed, run & deployed.

Engineer using Alloy to construct an AI application from modular components.

QuantumBlack Labs is the R&D and software development hub within QuantumBlack, AI by McKinsey. QuantumBlack Labs has more than 250 technologists dedicated to driving AI innovation and supporting and accelerating the work of its more than 1400 data scientists across over 100 locations.

We use our colleagues’ collective experience to develop suites of tools and assets that ensure AI/ML models reach production and achieve sustained impact. In the coming months, we will publish a series about the technology challenges behind digital and AI transformations, and the solutions required.

Projects using artificial intelligence and machine learning (AI/ML) are a key driver of business value, and companies have shifted from exploring what the technology can do to exploiting it at scale to gain market share. However, many businesses are struggling to scale their AI projects.

In a recent survey, only 3 percent of companies had embedded AI in at least five business functions. Organizations were finding it took as long to develop the 15th model as it did the first. Many reported struggling to repurpose their models efficiently to reinvent existing solutions across different customer segments, markets, or organizational units.

Reusable AI

As our recent book, Rewired: The McKinsey Guide to Outcompeting in the Age of Digital and AI (Wiley, June 2023) describes, scaling effectively relies on streamlined reuse of assets, insights, and resources. Some of the benefits are as follows:

  • Speed: development time is saved when solutions are reused.
  • Cost: efficiency savings are only unlocked when use cases are deployed across multiple business units.
  • Risk: code that has been tried and tested already has an established quality so is less likely to fail.

The benefits of asset reuse are established, so why are organizations still struggling to accelerate models into production after their initial successes? Some of the reasons include:

  • Building for reuse requires distinct skills, processes, and tools, which are different from building for one-off usage.
  • Within any domain, use cases need a combination of some bespoke code alongside the reusable component. The code to recombine assets can become complex and difficult to maintain.
  • Use case code becomes highly coupled, and changes in one use case cause a negative impact or risk to other use cases.

Alloy by QuantumBlack Labs

At QuantumBlack, AI by McKinsey, we develop use cases for our clients. Teams often need to reuse those use cases across different scenarios, such as audience segments, regional markets, or environments. Having built and shared pipelines with Kedro and Brix, our teams needed a development framework for reusable AI.

Alloy by QB Labs was developed as a framework for reusable software component development, testing, dependency management, assembly, and publishing. It empowers AI teams to productize their knowledge in code and create a ‘factory’ for AI use cases.

Using Alloy, development teams can create hundreds of modular AI components, manage them (test, version, or refactor at scale), and combine them consistently into enterprise-grade products spanning multiple AI use cases. Like assembling parts on a car assembly line into different vehicles, Alloy organizes reusable code assets for recombination into different, application-specific use cases.

Engineer using Alloy to construct an AI application from modular components.

Within QuantumBlack, Alloy is the standard for developing modular machine learning products and use cases. Alloy aggregates code, such as reusable assets taken from Brix, into an organized whole with a logical structure that makes it reproducible, sharable, and maintainable. In effect, Alloy enables teams to assemble, build, and test modular code components into enterprise-grade products and use cases.

There are three core elements to an Alloy project:

  • Components (assets) such as Kedro pipelines or Python packages.
  • Use case templates to configure components into use cases using metadata that lists which are needed. Teams can customize and create new use cases from existing components with simple modifications to the configuration.
  • Assembled use cases, which are built groups of components that form an AI application ready to be installed, run, and deployed to infrastructure
Engineer exploring an assembled AI application in Alloy to discover component packages and their respective requirements.

Alloy provides a library of tools such as a testing framework, plus requirements management and versioning features, and automatic code generation. With usability in mind, once components are assembled into use cases, Alloy can also generate documentation for a use case so adopters can easily understand, use, and maintain it.

The business impact through faster time-to-value for AI is two-fold in terms of increased developer productivity and collaboration.

Our clients have unlocked similar benefits by focusing on assetization and reuse. In one example, a client transformed a monolithic project of approximately 100K lines of code into a scalable, manageable AI product consisting of six distinct AI use cases and 35 reusable components.

Alloy helps clients reduce mean time to recovery (MTTR) by up to 500 percent and reduces the reliance on DevOps resources. For example, one client team reported an 85 percent reduction in continuous integration run times.

Does my team need Alloy?

The following are all clear signals:

  • Teams are developing multiple projects but wrestle with code organization and management.
  • Domain-focused AI teams spend an increasingly large amount of time doing ‘horizontal’, domain-agnostic engineering activities, such as DevOps.
  • New team members find it slow to get up-to-speed with a project’s structure and understand how to extend it to create new use cases.
  • There are disappointing productivity analytics and low operational performance.

Summary

At QuantumBlack, AI by McKinsey, we have seen first-hand that moving AI solutions from idea to implementation can be challenging. We recognize that scaling an AI/ML project relies on being able to reuse as much of the solution, but that this comes with its own complexity. Alloy enables teams to manage and recombine their reusable AI and gen AI code assets into different use cases to meet the specific requirements of a domain or industry sector.

Designing for reuse from the outset is a strategic move towards sustainable and successful AI/ML initiatives:

  • At the development level, teams using Alloy can focus on the industry/domain problems at hand, rather than spending time and energy building bespoke tooling. Alloy encourages developers to assetize their work, offering tooling for distribution across different target deployment architectures.
  • At the organizational level, Alloy helps teams share use cases by putting the same structure and working patterns in place and building an ecosystem of reuse. This accelerates the development of new products from existing knowledge, and unifies development to avoid fragmentation as those products are built.

QuantumBlack Horizon is a family of enterprise AI products, including Kedro, Brix, and Alloy, that provides the foundations for organization-level AI adoption by addressing pain points like scaling. It’s a first-of-its-kind product suite that helps McKinsey clients discover, assemble, tailor, and orchestrate AI projects.

To learn more about what QuantumBlack Horizon can do for you, please email Yetunde Dada.

Thanks to all who contributed to this article: Rory Walsh, Marc Solomon, Ben Horsburgh, Raul Costa, Zheng Gao, James Mulligan, Jo Stichbury, Joanna Sych, Sarah Mulligan & Matt Fitzpatrick.

--

--

QuantumBlack, AI by McKinsey
QuantumBlack, AI by McKinsey

We are the AI arm of McKinsey & Company. We are a global community of technical & business experts, and we thrive on using AI to tackle complex problems.