Marketing Was Always Math. So We Taught Machines To Do It.
By Sonic Prabhudesai MSBA 18
Prepared for the UC Davis Graduate School of Management & Master of Science in Business Analytics (MSBA) Publications, Sept. 2026
I grew up an engineer. I built a startup. And for the longest time, I looked down on digital marketing.
That wasn't arrogance so much as what I'd been taught. Advertising, everyone told me, was about feelings. It was the look of the ad, the emotion it sold, the creative spark behind it. It was a craft for people who were good with words and colors, and I wasn't one of them. So I filed it away as something other people did, somewhere down the hall from the real work.
Then I got a job offer I had no business getting.
Without a single day of digital marketing experience, someone at Meta took a bet on me and put me on one of the largest advertiser partnerships in the company's history. The advertiser was Wish, the e-commerce company, and the account spent over a billion dollars a year. I didn't know how to run a Facebook campaign. I was suddenly responsible for helping run a billion dollars of them.
The Rude Awakening
The first thing I noticed had nothing to do with ads. It was how few people there were.
Wish ran that budget, across more than 100 countries, with two engineers. Not two teams. Two people, writing code that decided what to bid, on what, for whom and when. There was no war room full of media buyers. There was no agency on retainer arguing about the font on a banner. There were two engineers and a very large number.
That was the first shock: marketing wasn't emotion. It was an optimization problem, and the people who treated it that way were winning by a mile.
The second shock came when I looked at everyone else. The rest of the industry was running the same kind of business with hundreds of people. In-house marketing teams. Media buyers. Creative agencies. Data agencies. Mix modelers. Consultants to coordinate the consultants. All of them doing, slowly and expensively, what two engineers at Wish were doing programmatically before lunch.
It's almost like the whole industry had agreed on the wrong job description. The gap between the best advertisers and everyone else wasn't talent. It was architecture.
What Actually Wins An Auction
Here's the thing that took me years to fully appreciate. Every ad impression on Meta is an auction, and the auction doesn't care how the ad makes you feel. It picks the ad with the highest total value: roughly, your bid, times the odds the person will actually do what you want, plus a score for how good the ad is.
The entire creative industry lives in that last term. And it matters. But my co-founder Mina Hadian and I have spent more than 15,000 hours and over $3 billion of ad spend at Meta learning where the money actually moves.
Our contrarian bet, the one this company is built on, is that performance marketing is about 80% data and engineering and 20% creative. Most of the industry has that ratio backwards.
And if it's 80% data and engineering, then most of it can be automated.
The Beginning
We didn't start a company the day we had that thought. We started it when the tools caught up.
When large language models took off in 2023, the models weren't good enough to replace a media buyer. Not close. But the direction was obvious to anyone who'd watched two engineers run a billion dollars. Software was about to go from following rules to reasoning. And most of what a performance marketing team does all day is reasoning: why did cost per install jump, is this creative actually working or just cheap, did our new campaign eat the old one.
So we started Distribution Labs. Today our systems run over $8 million a month in ad spend across Meta, Google, Snap and Reddit for businesses on five continents. We do it with three humans and 15 agents.
We made one deliberate choice early: we only work with advertisers spending more than $250,000 a month. That sounds like snobbery. It isn't. Below that, an account is simple enough that dashboards and a few rules mostly get you there. Above it, the pieces start interacting. Signals affect bids, bids affect audiences, audiences affect creative fatigue, creative fatigue affects cost and measurement lies about all of it. That's where you need something that thinks, not something that follows a checklist. I believe deep-reasoning agents are revolutionary precisely at that level of complexity, and not very interesting below it.
What A Bad Morning Used To Look Like
To understand what we built, it helps to picture the old way.
A media buyer opens the account on a Tuesday morning. Cost per acquisition is up 30% from last week. Now what? Is it the auction getting expensive, or people not clicking, or people clicking and not installing, or installing and not buying? Is it one country, one campaign, one ad? Did something break overnight? Did we launch something Friday that's now cannibalizing what worked? A good buyer can untangle that. It takes hours, and two good buyers will often untangle it differently.
We taught our agents to do that untangling in a fixed order, every day, for every client, and we taught them what we learned running billions of dollars: which questions come first and which come last.
So every morning, a set of agents writes a short summary for each account. Above is a screenshot of our agent frameworks and you can see all agents. What moved, what's been slipping for a few days rather than one and the first recommendations. The goal is the briefest honest answer, not another dashboard.
Underneath that, another set of agents does something most people don't think about. Performance rarely declines because the market shifted. It declines because something broke. A conversion event silently stops firing. A catalog feed errors out. iOS events aren't set up right and Meta optimizes toward the wrong thing. A campaign structure fragments and starves itself of data. By our count there are at least 35 things like this that can quietly drain an account, and almost none of them show up in a performance report until the damage is done. So these agents watch all 35, around the clock, and flag what's broken. In some cases, they push the fix themselves. The diagnostic scorecard feeds into the agent framework to drive a more holistic view on performance.
A third agent handles creative, and this is where the 20% lives. We built a framework that scores every ad on a wide set of metrics and, crucially, refuses to judge an ad that hasn't spent enough to be judged. A lot of "winning" creative in this industry is just creative that got lucky on a small budget. The agent reads the account's whole creative history and tells us not just what's working, but what we should make next. The output is a Creative Performance scorecard that the agent builds by itself providing a score per current creative but real time learnings on what to product next.
The fourth layer is the one I'm proudest of. We built our own funnels and taught the agents how to reason about them: how cost, click-through, install rate and purchase rate push on each other, and which early signals predict a decline several days before it shows up in CPA. This is where everything the other agents see gets put together, and where the recommendation comes out. Change the ads first. Then bids. Then budgets. Shut a campaign down only after that. Rethink the strategy last, because that's the expensive, irreversible one.
And then there's the boring layer that saves us the most time: agents that build dashboards, presentations and documentation. We have never built the same report twice. A new client walks into infrastructure that already exists. Here’s an example of the dashboard which not just has the data but you can actually have a conversation with it!
What The Humans Do
People assume the point of agents is speed. It isn't, really. The point is who makes the call.
In our model, the agents diagnose and propose. A human approves, overrides or escalates. That sounds like a small change. It isn't. It means our three humans spend their day on the things agents genuinely can't do yet: understanding what a client's business is actually trying to become, noticing when the strategy should change before the numbers say so and knowing when the data is lying.
That last one matters more than I expected. Agents are only as honest as the definitions underneath them. Early on, two of our systems counted installs differently, and for a while we had two confident, well-reasoned answers to the same question. An agent will give you the wrong answer faster and more persuasively than any analyst. We learned that the hard way, and we'll learn it again.
The results across our portfolio have been real. Cost per action down 65% for one of the largest sports betting platforms in Latin America. Cost per install down 55% for one of the fastest-growing finance apps in North America. iOS purchasers up 171% for a global strategy game. There are more, but you get the idea.
The Dream
Our goal is simple to say and very hard to build. A client should hand us two numbers, their budget and the customer acquisition cost they can live with, and never think about any of it again.
We are not there yet. But I know what it looks like, because I watched two engineers get close to it a decade ago with tools far worse than the ones we have now.
The companies that win the next ten years of growth won't be the ones with the biggest marketing teams. They'll be the ones that figured out earliest that marketing was always math, and that math can be taught to machines.
About the Author
Sonic Prabhudesai is the co-founder of Distribution Labs, an AI-powered growth company. Previously at Meta, he worked with businesses across global markets and managed more than $3 billion in advertising spend. He holds an M.S. in Business Analytics from UC Davis and focuses on applying AI to growth, analytics and business decision-making.