Navigating the Maze of Production Machine Learning

Episode 8 63 min

Miguel Otero Pedrido ML AI Engineer

Episode 8 · Navigating the Maze of Production Machine Learning

63 min

What we talked about

Miguel Otero Pedrido is an ML/AI engineer who studied physics, researching gravitation, spacetime curvature and quantum field theory, before moving into machine learning. He works on Zapier's AI platform team. He also runs The Neural Maze, an educational brand on YouTube, LinkedIn and a Substack newsletter, where he teaches the parts of production AI that tutorials often skip, drawing on ten years of deploying systems. He and Alexey talk about why traditional machine learning still matters, how to build recommender systems, how the ML and AI engineering roles are changing, and how Zapier handles traces, routing and evaluation.

Miguel says people tend to overestimate new tools. In recommender systems, which he has worked on for five or six years, matrix factorization or learning-to-rank with gradient-boosted trees can beat LLMs in benchmarks, and they are deterministic. He notes that a lot of the excitement around Jev as a router could apply just as well to a random forest. His default is to start with the simplest solution, even a heuristic, and to keep a classic algorithm as a benchmark. He thinks Netflix's foundation-model recommender fits its huge data volumes, but warns that results in a notebook may not justify the cost of running an LLM in production.

Alexey asks how Miguel would build a recommender for a brand-new online shoe store. Miguel would start with a content-based approach that matches user attributes to item attributes. Once there are enough interactions, he would move to collaborative filtering with matrix factorization on implicit feedback. After that come contextual bandits with Thompson sampling, which add randomness so the system avoids an echo chamber and balances exploration against exploitation. He then describes the four-stage production design: cheap candidate generation, filtering, a slower and more accurate ranking step, and a business layer that can promote items.

Miguel sees two main uses for LLMs in recommenders: generating synthetic data and explaining recommendations in natural language. An LLM can't guarantee its output is in the catalog, even with RAG or fine-tuning. He thinks Claude could produce a sensible plan for a recommender, but system design still belongs to engineers, and taking model output without questioning it builds "comprehension debt." Alexey gives an example: agents picked a large Postgres instance when serverless DynamoDB would have done, and his AWS bill doubled. On job titles, Miguel calls AI engineering without fine-tuning "software engineering with new tools." Alexey shares his own scraped job data: the share of AI engineer postings asking for PyTorch fell from forty percent or more to below thirty percent.

At Zapier, Miguel built a pipeline that redacts customer PII from about twenty million trace spans per day landing in Databricks, using a model that isn't an LLM. He also works on an AI gateway with fallbacks across cloud providers and semantic routing, where a light model such as BERT sends each request to the most suitable LLM. For evaluation, he follows Hamel Husain's error analysis: annotate a sample of traces, cluster them with k-means on numeric metrics such as hallucination scores or failed tool calls, and choose which error groups to fix.

For practitioners, the main lessons are to start with heuristics or classic models as a baseline and add complexity only when the metrics justify it. Contextual bandits help keep recommendations from collapsing into an echo chamber, and LLMs work best in a recommender as an explanation layer rather than the core model. Engineers should keep enough foundational knowledge to question what agents produce. Evaluation is where most of the effort belongs. Miguel and Alexey also agree on a practical pattern: launch with a foundation model, collect its predictions, then distill them into a cheaper custom model such as a BERT classifier served with Candle.

Chapters

  1. 0:10 Miguel’s path from physics to production ML 7 min
  2. 7:25 Why traditional machine learning still matters 6 min
  3. 13:28 Starting a recommender system without data 4 min
  4. 17:17 Contextual bandits and feedback 5 min
  5. 22:15 The four-stage recommender architecture 4 min
  6. 26:04 Where LLMs help recommender systems 5 min
  7. 30:55 System design, foundations and comprehension debt 9 min
  8. 39:31 The changing ML and AI engineering roles 7 min
  9. 46:58 Trace redaction and the AI gateway at Zapier 4 min
  10. 51:19 Error analysis and evaluation of agent traces 6 min
  11. 56:58 Semantic routing and model-cost tradeoffs 6 min

Miguel Otero Pedrido ML AI Engineer

Miguel Otero Pedrido is an ML AI Engineer who learns and teaches by building. He went from studying spacetime curvature and quantum field theory to creating real world ML systems ranging from recommender engines in fashion to complex agentic workflows for insurance companies. Along the way he realized good models are not enough since engineers must build the whole system to make AI actually work. Now he shares what he learns through The Neural Maze as his way of helping others build AI that goes beyond the lab. He is always learning always building and always up for a good chat about math systems and how to make AI useful.

Topics in this episode

The wiki pages this conversation is filed under, the strongest first.

AI Engineer Role

The AI engineer role across product software, RAG, agents, evaluation, production reliability, and role boundaries.

AI Engineering

AI engineering is the discipline of shipping LLM applications, RAG systems, agents, evaluations, and production AI products.

LLMs

Large language models with links to retrieval, agents, evaluation, production, and security pages.

Machine Learning

Machine learning as applied modeling, evaluation, production design, monitoring, roles, and business tradeoffs.

Related books

LLM Engineer's Handbook

40 questions answered

Artificial intelligence has undergone rapid advancements, and Large Language Models (LLMs) are at the forefront of this revolution. This LLM book offers insights into designing, training, and deploying LLMs in real-world scenarios by leveraging MLOps best practices. The guide walks you through building an LLM-powered twin that’s cost-effective, scalable, and modular. It moves beyond isolated Jupyter notebooks, focusing on how to build production-grade end-to-end LLM systems. Throughout this book, you will learn data engineering, supervised fine-tuning, and deployment. The hands-on approach to building the LLM Twin use case will help you implement MLOps components in your own projects. You will also explore cutting-edge advancements in the field, including inference optimization, preference alignment, and real-time data processing, making this a vital resource for those looking to apply LLMs in their projects. By the end of this book, you will be proficient in deploying LLMs that solve practical problems while maintaining low-latency and high-availability inference capabilities. Whether you are new to artificial intelligence or an experienced practitioner, this book delivers guidance and practical techniques that will deepen your understanding of LLMs and sharpen your ability to implement them effectively.

Paul Iusztin Maxime Labonne

Build a Large Language Model (From Scratch)

58 questions answered

In Build a Large Language Model (From Scratch), you'll learn and understand how large language models (LLMs) work from the inside out by coding them from the ground up, step by step. In this book, I'll guide you through creating your own LLM, explaining each stage with clear text, diagrams, and examples.

Sebastian Raschka

GPT-3

11 questions answered

GPT-3 has made creating AI apps simpler than ever. This book provides a comprehensive guide on how to utilize the OpenAI API with ease. It explores imaginative methods of utilizing this tool for your specific needs and showcases successful businesses that have been established through its use.

Sandra Kublik Shubham Saboo

Optional analytics

Optional analytics are off unless you allow them. Your choice does not affect access to DataTalks.Club, Slack, events, or courses.

Current choice: not chosen.

Privacy Policy

If you allow analytics, self-hosted Umami counts anonymous public pageviews without analytics cookies. Private account and learning pages are excluded. Read the Privacy Policy for the complete data boundary.

Want to learn more about our community?

How it started, who's here, and everything that goes on here: courses, events, Slack, and more.

About DataTalks.Club