A skeptic's guide to AI-powered products
Delivering value in the face of hype
So, you want to do a machine learning. You're not totally sure what that means, but everyone's talking about it! You saw some cool demos of large language models, image generation or some other shiny tech that's debuted 5 years from when this post was written.
Unlike blockchain, AI is definitely the future: we're not sure how, but it's going to revolutionize society. Your company can't be left behind.
Unfortunately, you work at a company that makes video games. Or meeting software. Or does consumer banking. You don't have any clue how to actually build "an AI" or how to integrate it into your product in a way that actually makes it better.
Fortunately for you, machine learning experts at Google have developed an excellent set of guidelines that anyone can understand. The most important of these is sometimes called "the first law of machine learning", and it is very simple: don't do machine learning.
You're still here?
Unfortunately, if you're still reading this post, you don't have the power to change this decree. Or maybe you weren't convinced, and really want to do machine learning anyways.
Okay, cool. We can work with that. It may be a dumb, counterproductive choice that distracts you from solving the real problems your company is facing, but ultimately, constraints breed creativity.
And despite the cynical tone, machine learning is genuinely wonderful and terrible. I love it and think it can be used in a lot of incredible ways. Some of which might even make you money!
Machine learning fundamentals
If you've never been exposed to the fundamentals of machine learning before, there are only three key technical lessons you need to know as a PM for a machine learning team:
- Machine learning is trained on data, and reproduces the patterns in that data.
- There are four core ways to use machine learning: prediction, causal inference, generation and reinforcement learning.
- Machine learning is expensive and unreliable: only use it when you have no other choice!
All of that stuff about the relative performance of models with names from the Muppets, deep learning architectures, federated learning, representation learning, Wasserstein metrics and dozens of other impressive sounding technical terms? Really cool, but most of it doesn't matter to you: focus on the fundamentals and you'll be able to ask your engineers the questions that matter.
Machine learning models are trained on data
Unsurprisingly, there are no little men trapped in a box drawing anime girls, making up weird factoids and writing cold intros for recruiters. You probably know that there's a lot of math and computers involved, but how do they work?
Ultimately, machine learning models (aka AI, aka statistics for computer scientists) are trained on data. They ingest data points (hundreds or thousands or billions of them), use fancy math, and capture the patterns that are contained in them. This has a few implications:
- You need good data to make a succesful machine learning product.
- It should be clean: free of obvious errors. This process sucks, a lot.
- It should reflect the conditions you actually care about: outdated and unrepresentative data is much less useful.
- You need enough data to actually get meaningful results.
- The data must actually contain the relationship you're looking for: otherwise you're just lying to yourself and your customers.
- Your model will reproduce any biases in that data.
- This might cause legal headaches and public outrage: discrimination is bad, even if it's done by a machine.
- As IBM said in 1979: a computer can never be held accountable; therefore a computer must never make a management decision.
- If you are using generative models to create new samples that look like your inputs, these are fundamentally based on your training data.
- This might cause legal problems, so consider actually licensing your training data.
- It will probably also make people very mad, due to the whole "wanting to be able to earn a living" thing. Maybe consider the ethical and PR implications?
What can I do with machine learning?
Alright, so you have some data, and a directive to "do machine learning". What might you possibly accomplish? Let's go over the broad possibilities:
- Prediction: estimate or predict a quantity, based on other cheaper or earlier data.
- Great for predicting prices, fraud detection, building recommender systems, or helping a missile know where it is.
- Can be used to create features like a list of objects in images or sentiment analysis, to use in other products.
- Straightforward and effective! If you have the right data.
- Causal inference: understand how a system works, and use that to inform your decisions.
- A/B testing (and more) to determine what changes will be effective.
- Understanding your business, and figuring out how it works.
- Traditionally the domain of statistics: use traditional methods when you can!
- Go in with an open mind, and try very hard not to lie to yourself.
- Very hard to automatically scale: generally the impact will be in shaping decisions that you make and act on.
- Generation: create more samples that look like your training data, but different.
- This is the current wave of LLM and image generation and voice cloning hype.
- Summarize documents! Make art! Or voices! Or reams of eerily quasi-accurate text!
- Metrics for "what does success look like" are often much squishier.
- Generally requires a ton of data and expensive computation.
- Reinforcement learning: create an agent that learns and responds to a challenging or dynamic environment.
- Shows promise in robotics: environments are exceedingly complex, and robots might need to respond to new things dynamically.
- This can be used to identify promising new experiments to run, such as in material science or pharmaceuticals.
- Once you have a specific policy to solve a challenging task, you can just freeze it and use it in production, reducing cost and improving reliability.
Machine learning can do a lot of things! But it's not magic, and the combination of some data and an aching desire for a sweet machine learning product does not guarantee business success.
Machine learning sucks
So, why does that first law of machine learning exist? If machine learning is so powerful and flexible, why shouldn't we jam it in all of our products and ride the hype train straight to the future?
Well, let me prepare a short and non-exhaustive list:
- Machine learning models can behave in unpredictable ways.
- ML solutions are often much harder to understand than an equivalent statistical or hard-coded solution.
- A cheap, simple solution is often good enough.
- Machine learning requires good data, which you often won't have.
- Hiring machine learning experts is expensive.
- Training machine learning models is time consuming and expensive.
- Deploying machine learning models in production is complicated and flaky.
Seriously: these aren't new or controversial problems. If you want to make a good product, machine learning should be a last resort, sprinkled in carefully to achieve things no other technique can do.
But more optimisticly, there's a whole range of possible approaches you can take, to slowly test out the technology in a lower risk way.
- Just build a simple baseline solution, that doesn't use AI.
- Use an interpretable statistical model. Anything from linear regression to generalized additive models works great here.
- Augment your baseline solution with machine learning, by applying corrections to its predictions or outputs.
- Use a powerful but simple machine learning technique to solve your problem, like gradient-boosted decision trees.
- Use pre-trained fancy models to do feature extraction on your images, text or other weird data, and then pass it into simpler tabular data learning algorithms.
- Take an existing foundation model in your domain, and then fine-tune it on your own data.
- Take an existing model architecture, and then train it on your own data.
- Invent a new model architecture, validate that it works on a standard benchmark or three, and then train it on your own data.
Realistically, most problems only require level 1 or 2. But, if you use anything beyond level 2, you can honestly (grading on a curve, okay?) claim that your product is "made with AI" and "ML-powered"! The lower on this scale you stay, the easier, cheaper, faster and lower risk your project will be. Sure, you could probably squeeze out another 1% of performance by playing with bleeding edge model architectures. But is that really the thing that will help your business most?
Despite the mystique and prestige, adding machine learning to your business doesn't require hiring PhDs in machine learning. At level 1 through to level 4, any reasonably competent software engineer with a bit of humility and a head for numbers can tackle this. At level 5 through 7, probably find someone with experience in machine learning and prepare to invest in infrastructure to make sure their experiments can actually be deployed. Only at level 8 are you fundamentally doing novel research. Unless you are operating at a truly massive scale, or machine learning is your business's key competitive advantage, don't waste your time doing that!
But what should I do with machine learning?
With your feet planted firmly in reality, it's time to use your head and decide how to actually apply machine learning to your business. Even if you know what it can do, there's an art to figuring out where it should be used.
Fortunately, this isn't a unique problem. Focus on your users, and what they actually want and need. No, not your CEO, who's spitting a new fad-of-the-month AI idea at you. The people who actually pay you money, because you make a thing that makes their life better.
Go back to the fundamentals:
- What are your users trying to do?
- Where is our product the weakest?
- What is our vision for the thing that we're selling?
These are the things you should be focusing your time on, AI or not. The problems that are particularly suited to machine learning will:
- Have a clear measurement of what a "successful" business outcome looks like.
- Have lots of high-quality data.
- Not already have a good solution using traditional approach.
- Be okay with some mistakes, either due to low-stakes or manual overrides.
No matter how hyped AI might (or might not) be, I genuinely believe that there's real value in the technology. But ultimately, I don't think that most of the competetive edge comes from raw technological prowess: bigger models, better benchmarks, cheaper inference. Instead, like always in business, it comes down to picking the right problem and building what your users actually need. Hopefully, even if you don't know your f-score from your Lp norm, this was a helpful read: demystifying machine learning and helping you see how it might (and might not) help you actually do the things you care about.
Thanks for reading: hopefully it was educational, thought-provoking, and/or fun. If you'd like to read more like this in the future, consider signing up for our email list or subscribing to our RSS feed.