---
schema: 1
type: video
title: 'AI Agents for Performance: Ship Faster, Pay Less — Rajat Shah, Netflix'
description: >-
  An inefficient quadratic-time pattern was hiding inside a tensor merge method
  on a live Netflix service, quietly wasting CPU on every request - nothing in a
  code review caught it, but it stood out clearly in a call stack. That's
  usually how this kind of waste gets missed - the normal process of catching it
  (profiling, reading a flamegraph, tracing it through the codebase, writing a
  fix, validating it) takes long enough that inefficiencies sit in production
  for months before anyone looks at them. AI-assisted coding adds to this, since
  it produces more code optimized for how fast it's written, not how fast it
  runs. Rajat Shah's team at Netflix built an agent to handle this loop: it took
  a call stack, traced the issue to the exact source line, proposed a fix, and
  validated it against a canary - a real production traffic split, with no
  regression allowed before it could ship. The result was based on measured
  outcomes, not the model's own assessment. The talk covers what it took to get
  an agent to a point where it could act in production, and walks through this
  specific case from start to finish - found, fixed, and confirmed by canary
  without anyone stepping in. It also covers what's next: the same pattern
  turned up independently in seven other services in one session, which is why
  it makes sense to build a shared catalog of patterns like this so they aren't
  rediscovered each time, and which could eventually be used to catch these
  issues in coding agents before the code ships at all. We'll also share the
  approach itself - how it was built, what it took to trust it, and what it
  caught - so other teams can adopt the same loop in their own SDLC rather than
  starting from scratch. Speaker info: - https://www.linkedin.com/in/rajatsshah/
  - https://github.com/shahrajat - https://shahrajat.com/ Timestamps: 0:00 -
  Introduction: performance for ML serving 2:24 - The manual profiling loop
  today 4:46 - The experiment: can an LLM read a profile? 7:37 - From call stack
  to the exact method 9:07 - How the agent locates and reads the code 11:01 -
  First finding: an O(N) fix, canary confirmed 12:41 - The same antipattern
  across seven services 15:31 - Building a shared pattern catalog 17:16 -
  Storing and sharing findings across services 19:40 - Feeding the catalog to
  coding agents 20:56 - Human approval and verification 22:13 - Canary
  validation on real traffic 24:18 - Reactive vs proactive paths 26:54 -
  Catching waste before production 29:32 - Autonomy levels and what is next ---
  Watch along with the corrected transcript, summary, timestamps and resources
  on this talk's official AIE page:
  https://ai.engineer/talks/CgsWxRUY5Eo-ai-agents-for-performance-ship-faster-pay-less
  Join our upcoming AI Engineer conferences (see https://ai.engineer landing
  page): - AIEi Shanghai, November 5–6 — the first for meeting top Chinese labs
  and engineers - AIE CODE in SF, November 10–12 — the top AI Coding conference
  returns - AIEi Sydney, December 7–8 — the first AIEi run alongside NeurIPS
  2026 in Sydney ---
canonical: >-
  https://liquidgold.cc/channel/aidotengineer/explore/video/ai-agents-for-performance-ship-faster-pay-less-raja-89c835abf778
markdown: >-
  https://liquidgold.cc/channel/aidotengineer/video/ai-agents-for-performance-ship-faster-pay-less-raja-89c835abf778.md
llms: null
parent: 'https://liquidgold.cc/channel/aidotengineer.md'
channel: aidotengineer
updated: '2026-10-24T06:30:07.058Z'
language: null
children: []
videoId: CgsWxRUY5Eo
durationSeconds: 2019
publishedAt: '2026-07-28T00:59:04.000Z'
searchChunks:
  - ordinal: 0
    text: null
    startSeconds: 13
    endSeconds: 147
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=13'
    heldReason: rights
  - ordinal: 1
    text: null
    startSeconds: 158
    endSeconds: 299
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=158'
    heldReason: rights
  - ordinal: 2
    text: null
    startSeconds: 311
    endSeconds: 457
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=311'
    heldReason: rights
  - ordinal: 3
    text: null
    startSeconds: 311
    endSeconds: 457
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=311'
    heldReason: rights
  - ordinal: 4
    text: null
    startSeconds: 564
    endSeconds: 669
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=564'
    heldReason: rights
  - ordinal: 5
    text: null
    startSeconds: 680
    endSeconds: 770
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=680'
    heldReason: rights
  - ordinal: 6
    text: null
    startSeconds: 781
    endSeconds: 935
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=781'
    heldReason: rights
  - ordinal: 7
    text: null
    startSeconds: 935
    endSeconds: 947
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=935'
    heldReason: rights
  - ordinal: 8
    text: null
    startSeconds: 1038
    endSeconds: 1050
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1038'
    heldReason: rights
  - ordinal: 9
    text: null
    startSeconds: 1199
    endSeconds: 1256
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1199'
    heldReason: rights
  - ordinal: 10
    text: null
    startSeconds: 1266
    endSeconds: 1333
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1266'
    heldReason: rights
  - ordinal: 11
    text: null
    startSeconds: 1345
    endSeconds: 1469
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1345'
    heldReason: rights
  - ordinal: 12
    text: null
    startSeconds: 1480
    endSeconds: 1624
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1480'
    heldReason: rights
  - ordinal: 13
    text: null
    startSeconds: 1480
    endSeconds: 1624
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1480'
    heldReason: rights
  - ordinal: 14
    text: null
    startSeconds: 1636
    endSeconds: 1778
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1636'
    heldReason: rights
  - ordinal: 15
    text: null
    startSeconds: 1788
    endSeconds: 2019
    watch: 'https://liquidgold.cc/watch/CgsWxRUY5Eo?t=1788'
    heldReason: rights
---


# AI Agents for Performance: Ship Faster, Pay Less — Rajat Shah, Netflix

An inefficient quadratic-time pattern was hiding inside a tensor merge method on a live Netflix service, quietly wasting CPU on every request - nothing in a code review caught it, but it stood out clearly in a call stack. That's usually how this kind of waste gets missed - the normal process of catching it (profiling, reading a flamegraph, tracing it through the codebase, writing a fix, validating it) takes long enough that inefficiencies sit in production for months before anyone looks at them. AI-assisted coding adds to this, since it produces more code optimized for how fast it's written, not how fast it runs. Rajat Shah's team at Netflix built an agent to handle this loop: it took a call stack, traced the issue to the exact source line, proposed a fix, and validated it against a canary - a real production traffic split, with no regression allowed before it could ship. The result was based on measured outcomes, not the model's own assessment. The talk covers what it took to get an agent to a point where it could act in production, and walks through this specific case from start to finish - found, fixed, and confirmed by canary without anyone stepping in. It also covers what's next: the same pattern turned up independently in seven other services in one session, which is why it makes sense to build a shared catalog of patterns like this so they aren't rediscovered each time, and which could eventually be used to catch these issues in coding agents before the code ships at all. We'll also share the approach itself - how it was built, what it took to trust it, and what it caught - so other teams can adopt the same loop in their own SDLC rather than starting from scratch. Speaker info: - https://www.linkedin.com/in/rajatsshah/ - https://github.com/shahrajat - https://shahrajat.com/ Timestamps: 0:00 - Introduction: performance for ML serving 2:24 - The manual profiling loop today 4:46 - The experiment: can an LLM read a profile? 7:37 - From call stack to the exact method 9:07 - How the agent locates and reads the code 11:01 - First finding: an O(N) fix, canary confirmed 12:41 - The same antipattern across seven services 15:31 - Building a shared pattern catalog 17:16 - Storing and sharing findings across services 19:40 - Feeding the catalog to coding agents 20:56 - Human approval and verification 22:13 - Canary validation on real traffic 24:18 - Reactive vs proactive paths 26:54 - Catching waste before production 29:32 - Autonomy levels and what is next --- Watch along with the corrected transcript, summary, timestamps and resources on this talk's official AIE page: https://ai.engineer/talks/CgsWxRUY5Eo-ai-agents-for-performance-ship-faster-pay-less Join our upcoming AI Engineer conferences (see https://ai.engineer landing page): - AIEi Shanghai, November 5–6 — the first for meeting top Chinese labs and engineers - AIE CODE in SF, November 10–12 — the top AI Coding conference returns - AIEi Sydney, December 7–8 — the first AIEi run alongside NeurIPS 2026 in Sydney ---

Canonical: https://liquidgold.cc/channel/aidotengineer/explore/video/ai-agents-for-performance-ship-faster-pay-less-raja-89c835abf778 · Channel: [AI Engineer](https://liquidgold.cc/channel/aidotengineer.md)

> Search chunk text is held until public-source provenance is verified.

## Document chunks

> Missing: no stored document chunks are available.
