Ai4
Software engineering must transition from static code deployment to managing dynamically evolving system behavior through continuous feedback and multi-clock control infrastructure.
AI-assisted summary of Adaptive Recommendations at Scale Using AI With Zocdoc (ex-Netflix, Walmart, Twitter) — original source. Check the original for full context.
Source published:
Detailed notes
## Background Published on YouTube by Ai4 on August 14, 2026, this talk features Mallika Rao, Senior Engineering Manager at Zocdoc (formerly of Netflix, Walmart, and Twitter), examining the evolution of recommendation systems from batch personalization into adaptive, real-time discovery engines. The presentation explores event-driven continuous intelligence, architecting for ambiguity, and the leadership practices needed to balance experimentation, model debt, and infrastructure stability in AI-native systems.
## TL;DR Mallika Rao argues that recommendation systems are the original learning software, offering a foundational blueprint for modern AI-native workloads and agentic systems. Because adaptive systems mutate post-deployment, dynamically evolving behavior—rather than static code—becomes the primary production artifact within a closed-loop control system that both learns and actively shapes user taste. Rao introduces 'The Three Clocks' framework (World, Learning, and Control) to maintain equilibrium between ingestion speed and safety, emphasizing that operational trust infrastructure must replace raw model accuracy as the core engineering bottleneck. She concludes that engineering has entered an era of Behavioral Software Engineering, which requires reimagining testing, rollbacks, and intent modeling as autonomous AI agents increasingly act as intermediary learners.
## Atmosphere & style The presentation carries a crisp, authoritative, and deeply reflective tone, seamlessly bridging high-level systems philosophy with battle-tested engineering realities from Netflix, Twitter, Walmart, and Zocdoc. Rao speaks with calm precision and structured clarity, using thought experiments and first-principles diagrams to deconstruct complex control-loop dynamics. It feels like an advanced masterclass on production AI maturity, replacing industry hype with pragmatic architectural rigor and insightful inquiry into the future of human-agent interaction.
## Key takeaways - [00:04](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=4s) Recommendation systems serve as the foundational blueprint for modern AI-native workloads, agents, and co-pilots because they were the first software systems forced to learn and adapt at hyper-scale. - [01:16](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=76s) In adaptive systems, dynamically evolving behavior—rather than static code—is the primary production artifact that engineers must version, test, and maintain. - [04:18](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=258s) Adaptive platforms operate as closed-loop control systems rather than linear pipelines, because the recommendations they serve directly shape user behavior and subsequent training data. - [04:18](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=258s) Every adaptive architecture must fulfill six technology-agnostic responsibilities: Sense, Represent, Adapt, Decide, Act, and Learn & Control. - [06:07](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=367s) Real-time inference capability is distinct from real-time learning; the true benchmark of an adaptive system is how quickly it can sense, understand, and adapt to environmental changes. - [06:07](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=367s) Accelerating learning speed introduces the danger of rapidly reinforcing incorrect, skewed, or toxic patterns that corrupt downstream data distributions. - [06:07](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=367s) Human domain expertise and operational knowledge should be integrated as first-class, high-signal data streams rather than treated as exception overrides. - [10:03](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=603s) The Three Clocks framework requires maintaining equilibrium between the World Clock (reality), the Learning Clock (model adaptation), and the Control Clock (safety intervention and rollbacks). - [12:45](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=765s) Production bottlenecks have shifted from model accuracy to operational trust, demanding specialized infrastructure like shadow canaries, preview environments, and instant behavioral rollbacks. - [14:02](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=842s) Recommenders act as control systems that can create self-fulfilling feedback loops, actively shaping user preferences rather than merely discovering pre-existing taste. - [16:33](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=993s) The discipline of software engineering is entering the Behavioral Software Engineering era, redefining traditional concepts of testing, versioning, deployment, and correctness for non-deterministic systems. - [19:42](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=1182s) The emergence of autonomous AI agents introduces an intermediary learner between users and platforms, complicating whether systems are optimizing for human taste or agent taste.
## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=4s) When Software Starts Learning: Recommenders as the Lens for AI Systems
Mallika Rao opens her talk at AI4 by framing a foundational question that has guided her career building search, personalization, recommendation, and AI platforms across Netflix, Twitter, Walmart, and Zocdoc: "What happens to software engineering when the software itself starts learning?" Recommendation engines were the very first software systems forced to confront this paradigm shift at hyper-scale. Rather than being a legacy niche, the architectural hard truths learned from building recommenders provide the direct blueprint for modern AI-native workloads, autonomous agents, co-pilots, and next-generation search engines.
```mermaid flowchart LR accTitle: Closed Loop Adaptive System subgraph Sensing["1. Sensing & Ingestion"] A["User Actions & Context"] --> B["Streaming Signals"] end subgraph Adaptation["2. Learning & Adaptation"] B --> C["Model Retraining & Embeddings"] C --> D["Behavior & Decision Engine"] end subgraph Actuation["3. Actuation & Impact"] D --> E["Recommendations / Actions"] E --> A end ```
[01:16](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=76s) The Thought Experiment: Behavior as the True Production Artifact
To illustrate why learning software breaks classical paradigms, Rao presents a thought experiment: imagine an engineering team designs the "perfect" recommendation system—the machine learning models are flawless, ranking algorithms are tuned, data pipelines are pristine, and personalization is exact. The fatal flaw is that the system was only perfect *yesterday*. Overnight, external reality shifted: new content was published, breaking trends surfaced, user preferences shifted, catalog inventories rotated, or healthcare providers opened new appointment slots on Zocdoc. The recommendations produced today are not mathematically incorrect; they are simply stale.
This realization fundamentally changes the definition of software engineering. Traditional software operates on a rigid contract: engineers write code, test it, deploy it, and expect its execution behavior to remain deterministic and static until the next deployment. Adaptive systems shatter this premise—their production behavior continuously mutates even when not a single line of deployed code has changed. In traditional engineering, code is the versioned, tested, and deployed artifact; in adaptive systems, code merely describes the underlying mechanism, while the dynamically evolving *behavior* is the actual production artifact that must be engineered with equal rigor.
[04:18](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=258s) From Static Pipelines to Closed Loops: The Six Core Responsibilities
The defining distinction between traditional software and adaptive systems lies in how they interact with the world. Traditional software observes input and responds. Adaptive software, by contrast, actively participates in shaping its environment. When a platform serves a recommendation, it directly dictates what a user consumes, when they consume it, and how long they engage. That resulting consumption pattern immediately becomes the new training data fed back into the system, influencing what will be served next. The architecture is no longer a linear, unidirectional data pipeline—it is an active closed-loop control system.
When architecting these closed-loop ecosystems, Rao highlights six core, technology-agnostic engineering responsibilities that every adaptive system must fulfill: - **Sense**: Capturing and ingesting fresh, real-time contextual signals from the environment. - **Represent**: Mapping raw signals, item spaces, and user states into meaningful latent representations and embeddings. - **Adapt**: Updating model parameters, index states, or ranking heuristics based on incoming data. - **Decide**: Evaluating trade-offs across candidates to select optimal outputs. - **Act**: Serving the selected decision to the user or downstream consumers. - **Learn & Control**: Monitoring outcomes, maintaining guardrails, and safely feeding new signals into subsequent learning cycles.
[06:07](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=367s) The Core Tension: Real-Time Learning vs. Learning the Wrong Things
Whenever an abrupt shift occurs in the world—such as a trending song on social media, a breaking news cycle, or a high-demand doctor listing open availability—the critical engineering metric is not how fast the system performs inference. A real-time inference system capable of generating predictions in milliseconds is fundamentally different from a real-time learning system. The vital question is: "How long until the system knows?" How quickly can the platform sense, adapt, understand, and decide upon an environmental change?
This introduces the central tension of adaptive systems engineering: platforms want to learn as rapidly as possible, but accelerating the rate of learning dramatically increases the risk of the model learning incorrect, skewed, or toxic patterns. Because every output shapes future training inputs, bad learning quickly corrupts downstream data distributions. Furthermore, Rao challenges the common assumption that adaptive systems exist to eliminate human judgment. Operations teams, merchandisers, and domain experts frequently recognize localized disruptions, seasonal shifts, or market-specific events long before statistical algorithms detect them. Rather than treating humans as messy exception overrides, high-performing architectures treat human input as a first-class, high-signal data stream.
[10:03](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=603s) The Three Clocks Framework: Balancing World, Learning, and Control
To evaluate and architect adaptive systems, Rao relies on a mental model she terms "The Three Clocks." Every autonomous and learning platform operates on three distinct, competing temporal frequencies:
| The Clock | Definition & Role | Risk When Misaligned | |:--- |:--- |:--- | | **World Clock** | The speed at which external reality, user contexts, and events change. | N/A (Baseline environmental reality) | | **Learning Clock** | The speed at which the system ingests data, updates models, and reflects new behaviors. | If it lags behind the **World Clock**, the platform becomes stale and irrelevant. | | **Control Clock** | The speed at which the platform detects that it has learned something wrong, intervenes, and rolls back safely. | If outrun by the **Learning Clock**, the system becomes erratic, unpredictable, and potentially dangerous. |
Engineering excellence is not about blindly maximizing the speed of every clock; it is about maintaining continuous equilibrium between them. Architectural decisions ultimately boil down to a single question: *"Which clock are we optimizing at this point of time? And which are we ignoring?"*
[12:45](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=765s) The Infrastructure of Trust: Moving Past Model Accuracy
For decades, machine learning practitioners operated under the belief that model accuracy was the primary performance bottleneck. In production, however, the real bottleneck is operational trust. Trust cannot remain an abstract feeling or a product aspiration; it must be constructed directly into the infrastructure via specialized tooling and verification primitives: - **Preview & Dry-Run Environments**: Validating model updates against offline scenarios before exposing them to users. - **Shadow Traffic & Shadow Canaries**: Running candidate models parallel to production traffic to evaluate behavioral shifts under live distribution without user impact. - **Continuous Evaluation & Integration Harnesses**: Dynamically scoring safety, bias, and business guardrails in real time. - **Instant Behavioral Rollbacks**: Mechanisms capable of resetting model states or falling back to safe deterministic baselines the moment anomalous behavior is detected.
[14:02](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=842s) Recommenders as Control Systems: Shaping Taste and Self-Fulfilling Loops
Feedback loops are commonly treated as purely beneficial mechanisms in machine learning, but closed loops introduce profound feedback bias. If a system promotes an item simply because it is trending, more users see it, click it, and engage with it. The algorithm observes these clicks as positive reinforcement and amplifies the item even further. This raises a fundamental dilemma: "Did we actually discover a preference or did we actually create one?"
At this stage, recommender systems behave less like passive ranking algorithms and more like active control systems that reshape future data distributions. The relationship between users and learning algorithms is mutual rather than unidirectional: while the system learns human taste from past behavior, it simultaneously shapes human taste by governing what users discover, what they ignore, and what they seek next.
```mermaid flowchart TD accTitle: Taste Shaping Loop subgraph FeedbackBias["Self-Fulfilling Feedback Loop"] A["Item Recommended Due to Popularity"] --> B["Increased Exposure & Engagement"] B --> C["System Learns Strong Positive Signal"] C --> A end subgraph DistributionShift["Data Distribution Impact"] C --> D["Mutates Future Training Distribution"] D --> E["Shapes User Discovery & Taste Over Time"] end ```
[16:33](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=993s) Crossing the Boundary: From ML and Distributed Systems to Behavioral Software Engineering
Reflecting on her career path across Twitter, Walmart, and Zocdoc, Rao outlines three evolutionary eras of recommendation engineering: 1. **The Machine Learning Era**: Focused strictly on statistical modeling—building better ranking algorithms, relevance functions, vector embeddings, and feature stores. 2. **The Distributed Systems Era**: Focused on scaling data pipelines—managing state, minimizing serving latency, and maintaining freshness across distributed backends and mobile clients. 3. **The Behavioral Software Engineering Era**: Focused on safely deploying and managing systems whose behavior continuously evolves post-deployment.
This third era forces engineering teams to redefine fundamental software concepts: - **Testing**: How to unit-test and integration-test a system whose output is non-deterministic and designed to change over time. - **Deployments & Rollbacks**: What it means to deploy or roll back an evolving policy or learned behavioral artifact rather than a binary code release. - **Versioning**: How to version behavioral checkpoints alongside data schemas and code commits. - **System Correctness**: Defining what "correctness" means when a system is explicitly expected to mutate its logic based on environmental feedback.
[19:42](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=1182s) The Agentic Frontier: Explicit Intent, Implicit Intent, and Intermediary Learners
Rao traces the progression of how systems interpret human intent. Search queries provided an explicit window into curiosity, confusion, and direct user need. Recommendation systems introduced an implicit window, inferring underlying taste through indirect actions like clicks, skips, dwell times, and watch durations. Together, explicit and implicit signals provided a comprehensive view of human judgment.
The emergence of AI agents, however, adds a disruptive new layer to this architecture: an intermediate, autonomous learner acting on behalf of the user. When an agent executes searches, evaluates alternatives, and ingests dozens of papers or provider schedules without the user directly clicking or browsing, it creates an architectural puzzle: *"Whose taste are we learning? Is it learning my taste? Is it learning my agent's taste?"*
Rao concludes by emphasizing that the defining software engineering challenge of the next decade will be architecting scalable infrastructure that enables continuous learning across multiple intelligent actors while preserving human judgment, explainability, and safety when the behavior of software never stops changing.
## Notable quotes > [00:04](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=4s) What happens to software engineering when the software itself starts learning? — Mallika Rao
> [06:07](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=367s) How long until the system knows? — Mallika Rao
> [10:03](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=603s) Which clock are we optimizing at this point of time? And which are we ignoring? — Mallika Rao
> [14:02](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=842s) Did we actually discover a preference or did we actually create one? — Mallika Rao
> [19:42](https://www.youtube.com/watch?v=KMHuxIZGTlg&t=1182s) Whose taste are we learning? Is it learning my taste? Is it learning my agent's taste? — Mallika Rao
## Mentioned Mallika Rao, Zocdoc, Netflix, Walmart, Twitter, AI4
## Video description Mallika Rao - Senior Engineering Manager, Zocdoc (ex-Netflix, Walmart, Twitter)
As recommendation systems evolve from batch-based personalization to adaptive, real-time discovery engines, infrastructure must transform too. This talk draws from large-scale experiences powering billions of recommendations and searches per day—spanning event-driven architectures, model-driven indexing, and feedback-loops built for continuous learning. We’ll explore how to evolve traditional recommender pipelines to support AI-native workloads—where training, inference, and evaluation all coexist in production. You’ll learn how leaders can architect not just systems, but trust and ambiguity—balancing experimentation and reliability while enabling teams to thrive amid shifting signals.
This is a story about how distributed systems meet adaptive intelligence—and what it takes to make recommendations feel instant, relevant, and alive.
In the era of AI-driven personalization, recommendation systems are no longer static ranking engines—they are adaptive ecosystems that continuously evolve through user feedback, contextual cues, and model retraining.
This talk unpacks how large-scale distributed systems can transform to support this new paradigm of real-time discovery. Drawing from experience designing large recommendation and catalog-slicing infrastructures across consumer platforms, we’ll explore:
Event-Driven Adaptation — How streaming signals and micro-batches bridge online and offline learning, turning user interactions into live feedback loops.
Infra for Continuous Intelligence — Designing infra that allows training, inference, and evaluation to coexist seamlessly, without fragmenting data pipelines or reliability.
Architecting for Ambiguity — Techniques for scaling before the problem is fully defined—building systems that embrace evolving data distributions and model behaviors.
Trust & Leadership in the Loop — Why leaders must treat “infra debt” and “model debt” with equal rigor, architecting psychological and technical safety so teams can innovate responsibly.
Dual-Path Execution — How maintaining separate product and infra strategies for AI adoption enables organizations to ship fast while investing deep.
By the end, attendees will walk away with a playbook for evolving legacy recommender systems into adaptive, AI-native discovery platforms—and insights on how to lead teams confidently through that transition.
Key Takeaways How to evolve recommendation infrastructure for real-time, adaptive intelligence.
How to architect for ambiguity—designing systems and teams that thrive amid uncertainty.
Why evaluation and feedback loops are as critical as training.
How to balance product innovation with infra stability through dual execution paths.
Leadership lessons for navigating the AI-driven evolution of large distributed systems.
[Source](https://www.youtube.com/watch?v=KMHuxIZGTlg)