AI Engineer World's Fair 2026
From Tokenmaxxing to Trusted Throughput — Mingsheng Hong, Ironclad
Read the talk
From Tokenmaxxing to Trusted Throughput
Mingsheng Hong explains how Ironclad connects AI coding spend to reviewed, validated software—and why review capacity, reliable CI, and disciplined agent workflows matter to that return.
From a talk by Mingsheng Hong
At a glance
Ideas worth remembering
Use token dashboards to investigate adoption gaps and unusual spending. Interpret differences in the context of each team's work, without rewarding consumption.
Measure delivered value alongside cost. Complexity-weighted merged PRs are Ironclad's evolving proxy, with no reproducible scoring rubric supplied in the talk.
Trusted throughput requires automated validation, human assessment, and evidence from customer use. A merge alone does not complete that evaluation.
Protect downstream capacity: let AI handle simpler review issues first, fix flaky CI, and measure readiness-to-submission time and retries. Large PRs and repeated babysitting conceal delivery problems.
Combine budgets and anomaly alerts with bounded retry loops, stable prompt prefixes, context summarization, and regular review of what the team is learning.
Buy common infrastructure and build reusable prompts for local engineering tasks. Evaluate ambiguous agent investments early, together with their effects on review and CI.
Token usage is a signal, not a performance target
Mingsheng Hong opens with a problem for engineering leaders: how to control and optimize AI token spending without encouraging waste. He recounts a reported Amazon story in which an employee created a voluntary usage dashboard and engineers began competing to reach the top. Hong explicitly says he does not know whether leadership encouraged that competition. The example illustrates how a visible measurement can become an incentive even without a formal policy.
Ironclad also tracks token usage and cost by team and individual. Hong describes the dashboard as a smoke detector: unusually low usage may identify a team that needs help adopting AI, so it warrants a conversation. The number alone does not establish whether someone is doing valuable work. Rewarding higher consumption would turn the cost of an activity into the goal of that activity.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Cost management depends on getting through adoption
Hong places a boundary around his advice: it primarily addresses teams that have already established AI adoption. A team still provisioning access or encouraging engineers to try the tools may not be ready for the same cost controls. Ironclad had crossed that threshold over the preceding couple of quarters, and roughly half the audience raises a hand when he asks who has moved from initial adoption to serious concern about cost.
Adoption also requires more than a leadership directive. Hong recommends sitting with people who are resistant or struggling and understanding their reasons. Some engineers tell him that the pride of handcrafting code has been replaced by the less satisfying work of reviewing poor AI output. He treats that as a legitimate concern. Leaders need to identify consequential technical work through which engineers can continue developing their skills, rather than assuming that access to a tool resolves the professional transition.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Trust grows through successive validation
Ironclad builds AI products for legal contracting, helping lawyers, procurement teams, and other business users advance contracts faster while controlling risk. Hong uses a customer workflow to explain how trust develops. A lawyer may first run conversational searches against contracts they already know well. If the answers match expectations, the lawyer may expand to unfamiliar contracts or other tasks, such as redlining and finding anomalies. Familiar material gives the user a basis for judging the output before relying on it more broadly.
Hong applies the same progression to AI-assisted engineering. Engineers, leadership, and customers all need evidence that generated work deserves their trust. He calls the resulting output trusted throughput: code that has been reviewed and validated internally and ultimately validated in customer deployments. The spending objective follows from that definition. A lower token bill is not necessarily an improvement; the aim is to improve the return on that spending by delivering more work that survives those checks.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Measure both sides before cutting spend
Cost measurement starts with the tools already in use. A team using a single coding tool may get sufficient analytics from its vendor dashboard. Ironclad uses several tools, so it built simple dashboards and extraction pipelines with AI assistance to bring vendor data together. Aggregating that data allows the company to examine each team's and individual's spending across tools instead of seeing disconnected portions of their usage.
The next step is to measure what that spending produces. Hong warns against moving directly from observing cost to minimizing it: doing so evaluates only one side of the return. Once cost and value are both visible, the team can look for constraints on delivery. In Ironclad's experience, abundant code generation shifts pressure downstream to review and continuous integration. Spending less on generation alone does not address the work waiting to be reviewed and merged.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read dashboards in the context of the work
Regular dashboard reviews serve two immediate purposes: finding remaining adoption gaps and investigating unexpected usage bursts. A burst may be legitimate, and comparisons between teams require context. A platform infrastructure team can use AI differently and receive different benefits from a UI team. Hong wants these reviews to produce lessons that feed back into shared practices, rather than a ranking of employees by consumption.
Lines of code provide his analogy for the distinction between tracking and optimizing. The number can describe engineering activity, yet removing code may be the more productive, higher-quality result. Maximizing the count would punish that improvement. Token usage has the same limitation: it records an input to the work without establishing the value of the outcome.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From generated volume to weighted merges
Hong traces the evolution of Ironclad's value metric. Counting open pull requests improves on counting lines because it groups generated work into proposed changes. Ironclad saw a pronounced increase in open PRs, but an open proposal can remain unshipped. Although exploratory R&D can be useful without landing code, Hong argues that delivery eventually matters. The team therefore moved to counting merged PRs.
Merged PRs still differ greatly. Hong contrasts a 10-line concurrency fix that takes substantial investigation with a thousand lines of boilerplate that consume generation and review time without necessarily adding as much business value. Counting each as one merge misses that distinction. Ironclad began assigning a complexity score to each merged PR, using a carefully written prompt to ask AI for a T-shirt size assessment, then using that assessment to weight the merge.
This remains a pragmatic proxy. Its working assumption is that delivering a more complex PR represents more value, but Hong presents the measure as something the team expects to keep evolving. He does not supply a reproducible scoring rubric or numerical weights. The proposal offers a way to distinguish delivered work more carefully; it does not establish that complexity is equivalent to customer value.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
What makes throughput trusted
The qualitative definition of trusted throughput adds three kinds of evidence. First come objective checks: test coverage, predefined security checks, and normal canary practices for safe rollout. Second comes human judgment through code and design review. Reviewers assess quality, clarity, maintainability, and architectural fit—properties that complement the automated checks.
Third comes customer experience after the change reaches production. Hong asks whether incidents require rollbacks and whether customer complaints or support tickets expose usability friction and bugs. Internal approval is therefore an intermediate stage of validation. The customer evidence tests whether work that appeared sound during development actually behaves well in use.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Protect review quality as generation accelerates
When creating PRs becomes easier, review and merging can become the limiting stages of delivery. Hong identifies a damaging response to overloaded CI: engineers stop splitting changes and submit larger PRs. His example is a regression suite that takes an hour. An engineer may fear that splitting a change into 10 PRs will mean 10 hours of waiting. Batching avoids some perceived overhead, but increases the human review burden and spreads attention thin, reducing review quality.
Ironclad's review principle is to use AI as the first pass. It should catch simpler issues, such as coding style problems and missing test coverage, and the author should address those before routing the change to a human. That ordering reserves human attention for judgments about code quality, architecture, and security design. Engineers retain final accountability; AI review helps them spend their limited attention on the decisions that need it most.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Measure the waiting around CI
More numerous, smaller PRs put additional pressure on CI. If the organization leaves that pressure unresolved, individual engineers must babysit changes until they merge. Flaky tests make the problem concrete: a person repeatedly presses rerun, or an agent loops on the person's behalf. The first consumes human time; the second consumes tokens. Neither removes the underlying instability, and Hong connects this repetitive work to frustration and lower morale.
Ironclad is investing developer experience and platform engineering effort in reducing flaky tests and improving CI infrastructure. Hong recommends measuring elapsed time from a PR being ready to submit until it is submitted, alongside the number of retries needed to pass tests. If a normal CI run takes an hour but a typical submission takes two or three hours, the difference is a warning sign. Measuring only the duration of one test run would miss much of the engineer's actual wait.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Bound waste and improve everyday prompting
Hong's operating framework brings together guardrails, better practices, and a learning loop. Budgets and quotas establish limits; usage tracking and anomaly definitions support notifications when something looks wrong. Regular human reviews complement those alerts by identifying patterns and lessons. Leaders and engineers then refine the guardrails and feed what they learn into institutional knowledge.
An agent's test-and-repair loop is one concrete place to apply a limit. Hong describes a harness that generates an initial PR, runs tests, attempts to fix code or tests when they fail, and retries. Without a bound, a failing workflow can keep spending tokens. A maximum number of loop steps limits that exposure. He does not specify a universal retry count; the mechanism is to make the loop finite rather than assuming it will eventually succeed.
Prompt caching offers another efficiency mechanism. Hong explains that vendors can optimize processing when requests share the same prompt prefix. Users can support that behavior by placing fixed material first and changing material afterward. His example is a stable system prompt followed by a varying user prompt. The useful design choice is the ordering of reusable and variable content; the talk does not quantify the savings.
Context pruning addresses the accumulation of material during a long conversation. Hong encourages engineers to develop the habit of summarizing context as the session grows. He also notes that coding tools can manage and compact context automatically. He presents compaction as a way to improve both token efficiency and output quality, while leaving the specific summarization method and its evaluation unspecified.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Buy common infrastructure and build shared working knowledge
Hong's build-versus-buy principle is to buy capabilities that do not differentiate Ironclad, such as IDEs and CI infrastructure, and build practices that depend on its own engineering context. The internal example is a playbook of carefully written AI prompts for different kinds of work: small bug fixes, new UI features, and refactoring. Saving and sharing those prompts lets the team reuse and improve its working knowledge.
Some choices remain open. Ironclad is trying to build what Hong calls a builder agent, a cloud-based code-generation system that wraps coding tools, while also exploring vendors in that area. He offers this as an unresolved case rather than evidence that every organization should build its own agent. The general buying principle still requires judgment when a capability combines common infrastructure with local workflow needs.
His closing advice is to make these decisions early enough to support growing code generation. Teams should anticipate its effect on review and CI, learn from other organizations' mistakes, and keep instrumenting the delivery system to understand CI health and developer experience. Hong ends by emphasizing token ROI and inviting interest in Ironclad's legal contracting AI work. The practical direction is to expand the organization's ability to validate and deliver software alongside its ability to generate it.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
- 0:01
[music]
- 0:12
All right, let's get started. Apologies
- 0:15
for the delay, but I'm really excited to
- 0:17
be here. I'm Mingshan, VP of engineering
- 0:20
focused on AI at Ironclad. And today
- 0:24
I'll be telling you about something
- 0:25
that's probably on top of many of your
- 0:28
mind. uh how to control and optimize for
- 0:32
your AI token spend. Can I get a get a
- 0:35
quick show of hands that this is a
- 0:37
relevant topic?
- 0:40
Okay, awesome. I appreciate that.
- 0:45
So, we have all heard a few sensational
- 0:48
stories from the media. There's an
- 0:51
interesting Amazon story where an
- 0:53
employee just created kind of a
- 0:55
voluntary dashboard and everyone start
- 0:58
tracking their own AI token usage. I'm
- 1:01
not sure there's explicit encouragement
- 1:03
from the leadership, but the effect is
- 1:05
you know engineers some of the engineers
- 1:07
started competing with each other in
- 1:09
maximizing their token usage and get to
- 1:12
the top of the so-called leaderboard.
- 1:14
There's a similar story from Meta and
- 1:17
then another even more sensational story
- 1:19
about some companies spending $500
- 1:21
million on cloud oops within a month. So
- 1:26
while these may not be happening in your
- 1:28
companies today, the threats, the risks
- 1:31
are real. How do we think about the
- 1:34
policies? How do we measure the cost?
- 1:36
And how do we control and optimize for
- 1:38
it?
- 1:40
So one initial learning I want to share
- 1:42
is it is really important to have
- 1:45
dashboard that track every team every
- 1:48
individual's token usage and cost but
- 1:51
that should not be positioned as a
- 1:53
leaderboard. We think of the the usage
- 1:57
dashboard more as a smoke detector. If
- 2:00
there are local pockets of teams or
- 2:02
individuals that don't use much AI token
- 2:05
that might be a signal worth
- 2:06
investigating. But beyond that certainly
- 2:09
we don't want to create even indirect
- 2:12
incentive to maximize the token usage
- 2:15
itself.
- 2:18
So how do we think about it then? First
- 2:21
I want to make sure that we position
- 2:23
this talk for those of you whose teams
- 2:26
have already gone through the hump of
- 2:29
getting AI adopted. If you're still in
- 2:32
the initial process of provisioning easy
- 2:36
access to your engineers or encouraging
- 2:39
the teams and individuals to adopt, then
- 2:42
you may not be ready to implement some
- 2:45
of the ideas for controlling and
- 2:47
optimizing for cost. But that's okay.
- 2:50
This could still be a good discussion.
- 2:51
And frankly, we just got over that hump
- 2:54
over the last couple quarters. So this
- 2:56
is a very topical subject that every
- 2:59
engineering leader I believe is
- 3:01
navigating. So I would love to start
- 3:02
that dialogue with you all today to
- 3:04
explore the best practices. Can I get a
- 3:07
quick show of hand for those of you
- 3:09
whose teams have gone over the initial
- 3:11
adoption phase now you are starting to
- 3:14
seriously worry about the cost. Okay, I
- 3:17
see roughly half of the hands raised.
- 3:18
Thank you. So let's talk about then how
- 3:22
we can control and how we can optimize
- 3:25
what we call the trusted throughput as a
- 3:27
kind of a proxy metric as a way to
- 3:30
measure your ROI. But before that, just
- 3:33
for those of you who are in the process
- 3:35
of still increasing adoption, one lesson
- 3:38
we learned is to after the kind of the
- 3:41
top down leadership push is to sit down
- 3:43
with the individual teams and uh the
- 3:47
individuals who may be resistant or
- 3:49
struggling with adoption, understand
- 3:51
where they came from. For example, there
- 3:53
are some legitimate concerns that I
- 3:55
heard, you know, people say, "Hey, I
- 3:57
used to really take pride and joy in
- 3:59
handcrafting the code and now a lot of
- 4:01
the joy and the pride got taken away and
- 4:05
replaced with me reviewing AI slop code,
- 4:08
right? So that doesn't sound like a very
- 4:10
satisfying professional activity and
- 4:12
that's where we need to kind of dig down
- 4:14
and understand what are still the kind
- 4:16
of the high impact and uh engineering
- 4:19
tasks technical work that we can help
- 4:21
our engineers continue to grow
- 4:23
themselves in the era of the AI.
- 4:28
So I wanted to share with you a bit more
- 4:31
about what we at ironclad does and
- 4:33
there's an interesting connection
- 4:35
actually within how we think about
- 4:36
optimizing for engineering AI token
- 4:39
usage. So, ironclad is a legal
- 4:42
contracting AI companies AI company. We
- 4:45
build AI features and native AI products
- 4:49
to help lawyers, procurement and other
- 4:52
business users move forward new
- 4:54
contracts, move them forward faster with
- 4:57
controlled risk. What that means is
- 5:00
building trust is the number one
- 5:02
priority with our AI product features
- 5:05
and products. And for the prior speak uh
- 5:07
speaker speaker, she did a wonderful job
- 5:09
telling you about the importance of
- 5:11
trust and how to build it in their
- 5:13
domain. In our ironclad product domain,
- 5:16
it often means lawyers especially, but
- 5:19
other persona as well taking the time to
- 5:21
kind of test the water and see if they
- 5:23
can trust the AI output. For example,
- 5:26
they may feed our conversational search
- 5:28
a set of contracts they are firmly
- 5:30
familiar with and they run a search and
- 5:33
see if the output is towards the
- 5:35
expectation. If so, they may expand on
- 5:38
searching for things they don't know
- 5:39
about or apply other workflows using AI
- 5:42
to solve other things like redlinining
- 5:44
the contract um and you know finding
- 5:47
anomalies and so on. And so similarly
- 5:51
using AI and making sure AI is
- 5:54
delivering high engineering value also
- 5:56
involves a you know a sequence of steps
- 5:59
in gaining trust from the internal
- 6:01
engineers the leadership as well with as
- 6:04
uh with our customers. So this is the
- 6:06
focus of our talk today
- 6:11
and this probably will not come as a
- 6:13
surprise here. The goal is not to
- 6:17
minimizing or not even necessarily to
- 6:19
reduce token spend. So here we kind of
- 6:22
use the word it's not about austerity.
- 6:24
It's about further improving the ROI of
- 6:26
the token spend.
- 6:29
So how do we do that? Here we propose um
- 6:32
a concept we call trusted throughput. So
- 6:36
the trusted throughput comes from having
- 6:39
the code reviewed and validated
- 6:42
internally and ultimately validated in
- 6:45
customer uh in customer deployments.
- 6:50
So how do we go and how do we think
- 6:54
about controlling the cost and uh
- 6:57
measuring and in turn optimizing the
- 7:00
ROI? The first step is I'm pretty
- 7:03
confident that all of you your teams who
- 7:05
have been adopting AI have been
- 7:06
measuring the cost. If you're using a
- 7:09
single tool like claw code or codeex
- 7:12
then you tend to get very rich analytics
- 7:14
from the vendor's dashboard already. If
- 7:16
you're like us who use a combination of
- 7:18
these different coding tools then we
- 7:21
basically use AI to build simple
- 7:23
dashboards and pipelines to extract such
- 7:26
vendor data. So we can kind of
- 7:28
crossorrelate them. Then we can break it
- 7:30
down, aggregate and then break down by
- 7:32
per team, per individual, what is their
- 7:35
cost usage across all of these uh tools.
- 7:39
So that's the first step for measuring
- 7:40
cost. Now one pitfall I have seen and we
- 7:44
wanted to caution everybody is to then
- 7:47
jump from measuring cost to start
- 7:50
reducing or minimizing the cost, right?
- 7:52
Cutting cost. We think that is
- 7:54
premature. Instead, the other important
- 7:56
side of the equation for ROI is to
- 7:58
measure value. How much value are we
- 8:01
getting from burning the tokens? Once we
- 8:04
can measure the cost and value side, we
- 8:06
understand ROI and then to improve ROI,
- 8:09
we want to find and then fix the
- 8:11
bottlenecks. In the next couple slides,
- 8:14
I'm going to introduce two new
- 8:15
bottlenecks we identify in this whole
- 8:17
new software development life cycle
- 8:19
where code generation now becomes
- 8:21
abundant thanks to AI. But the pressure
- 8:24
is now getting pushed down to code
- 8:26
review and continuous integration CICD
- 8:29
the merging the code. So we'll talk
- 8:31
about that and finally we'll put
- 8:33
together these ideas into a pra
- 8:35
pragmatic framework of how we think
- 8:37
about optimizing the ROI and thus the
- 8:39
leverage in using AI.
- 8:45
Okay. So this is kind of just a slide in
- 8:48
building or using the vendor dashboard
- 8:50
to measure the cost. And again we want
- 8:52
to caution that here the main goal for
- 8:55
regularly reviewing the dashboard is to
- 8:58
see a if there's still adoption gap
- 9:00
within individual pockets of teams or
- 9:02
the individual engineers and b if there
- 9:05
are any sudden surprises in kind of the
- 9:08
usage burst and if so understand what's
- 9:10
been happening if they're legitimate and
- 9:12
then also compare teams
- 9:15
contextually. So this is important. We
- 9:17
don't control just the AI usage per se
- 9:20
because for example a platform
- 9:21
infrastructure team the way they use AI
- 9:24
and the way they get value may be
- 9:25
different from the UI team. So we need
- 9:27
to take the context into consideration.
- 9:30
All of such review analysis is to help
- 9:32
us extract learnings. So there's a
- 9:34
self-learning loop that we can then feed
- 9:36
back into institutional best practices.
- 9:39
What we don't want to use the dashboards
- 9:42
are to kind of stack rank people, right?
- 9:44
making it a a leaderboard and somehow
- 9:47
reward maximization.
- 9:49
There's an interesting analogy I want to
- 9:50
draw with uh a traditional edge
- 9:53
productivity metric called lines of
- 9:55
code. So I believe all of you will be
- 9:58
tracking that metric but it wouldn't be
- 10:00
wise to use that metric as the key goal
- 10:02
to measure engine velocity because if we
- 10:05
want productive and high quality engine
- 10:08
work one can argue that removing code is
- 10:11
even better. So, LOC line of code is an
- 10:14
important metric but not something we
- 10:16
want to directly optimize for. Same
- 10:18
thing for the token usage and spend.
- 10:22
So, that that gets us to the notion of
- 10:25
trusted throughput. How do we think
- 10:27
about that? How do we define that?
- 10:29
First, I want to kind of share the
- 10:31
quantified uh side of the things. What
- 10:33
are the metrics that kind of we have
- 10:34
been involving in defining and tracking.
- 10:37
So we talked about line of code is
- 10:39
clearly not a good way to measure if AI
- 10:42
is you know generating a lot of value.
- 10:44
So the next evolution can be let's count
- 10:47
the number of open PRs pull requests.
- 10:50
The intuition being engineers are using
- 10:53
AI to generate a lot more code. So let's
- 10:55
measure the open PR. So clearly we see a
- 10:59
big kind of inflection in the open PR
- 11:02
count. But eventually as we as I assume
- 11:05
everyone would agree over the time even
- 11:07
though people may do oneoff you know R&D
- 11:10
work to try out things without lending
- 11:12
them but eventually we're all measured
- 11:14
by the code we ship. So therefore we
- 11:17
evolved from tracking the open PR count
- 11:20
to tracking the merge PR count. So
- 11:22
that's an improvement.
- 11:25
But the next question is not every
- 11:27
merged PR is equal. There can be a PO
- 11:30
with only 10 lines of code that takes
- 11:32
forever that finds and fix a concurrency
- 11:34
bug or there can be a thousand line kind
- 11:37
of boilerplate code that just takes a
- 11:39
lot of time to then kind of generate and
- 11:41
review but otherwise it's not necessary
- 11:43
adding as much business value.
- 11:46
So as such we then started kind of
- 11:48
tagging each merged PR with some sort of
- 11:51
complexity score. There's no traditional
- 11:54
definition of what that means. We looked
- 11:56
at the literature a bit. So we just took
- 11:58
a pragmatic approach of giving AI a
- 12:00
well-crafted prompt and then we feed the
- 12:03
PR into basically one or two M and say
- 12:06
score the complexity based on t-shirt
- 12:08
size. So I the idea being if you use AI
- 12:11
to generate a more complex PR we
- 12:13
consider that as being more valuable
- 12:15
basically that's how we kind of add a
- 12:17
weightage to each merged PR but that's
- 12:20
not the end of the journey that's still
- 12:21
something we're going to evolve keep
- 12:23
evolving and I would love to discuss
- 12:25
with everyone on kind of how we end up
- 12:27
creating defining a set of metrics that
- 12:30
kind of approximate the value AI is
- 12:32
generating.
- 12:34
Now let's look at the qualitative view.
- 12:36
What we think about the way we would
- 12:38
define trusted throughput is a high
- 12:41
quality output that's interested by both
- 12:43
internal engineering and leadership and
- 12:46
external customers. We think they come
- 12:48
from three buckets.
- 12:50
The first bucket is all of the objective
- 12:53
metrics that we run with checking the
- 12:55
test coverage whether uh all of the
- 12:58
predefined security checks are passing.
- 13:00
Do we go through the regular canarying
- 13:03
practice as we roll out features safely
- 13:04
and so on. In addition, we complement
- 13:08
the subjective objective metrics with
- 13:11
our subjective human judgment. So that's
- 13:13
where the code review, the design review
- 13:16
come in to look at the code quality,
- 13:18
clarity, maintenance, architecture fit
- 13:20
and so on. And then finally we want to
- 13:23
make sure through all of these internal
- 13:25
objective and subjective check when the
- 13:27
rubber meets the road how customer
- 13:30
perceive the changes are there
- 13:32
production fire that lead to ro
- 13:34
rollbacks do customers complain have
- 13:37
tickets that talk about usability uh
- 13:39
friction uh bugs and so on. So these are
- 13:42
the three buckets that together form
- 13:44
what we think is trusted throughput from
- 13:46
engineering.
- 13:52
Okay. So now let's talk about from a
- 13:54
software deploy deployment life cycle
- 13:56
perspective where we observe the new
- 13:59
bottlenecks are as I mentioned earlier
- 14:02
AI code generation is making PR creation
- 14:06
abundant. So now the the bottleneck from
- 14:10
kind of the whole life cycle perspective
- 14:12
gets shifted onto re review and they're
- 14:15
subsequently merging the PR. Does that
- 14:17
resonate?
- 14:20
I see some heads nodding. So this is
- 14:23
where we spend time on figuring out how
- 14:25
we can further improve the review
- 14:27
process as well as the continuous
- 14:29
integration the CI process. So we will
- 14:32
dive into these two topics in the next
- 14:34
couple slides here. I just want to say a
- 14:37
potential anti-attern anti-solution is
- 14:40
that hey if the CI infrastructure gets
- 14:43
overloaded then a workar around by
- 14:45
engineers to stop splitting PR just
- 14:48
start submitting large PR for review and
- 14:50
submission because if it takes an hour
- 14:53
to run all of your regression test and
- 14:55
submit it I don't want to break my PR
- 14:57
into 10 right which might take 10 hours
- 14:59
however this in our view can be pretty
- 15:02
risky because it makes the human review
- 15:06
overhead higher it also reduce the
- 15:09
quality of the review because the human
- 15:10
attention can be spread thin so that is
- 15:12
an anti-attern I wanted to caution
- 15:17
so for code review the key principle we
- 15:21
use is to make sure we onboard AI
- 15:23
tooling as the first level of defense
- 15:26
they don't replace human reviewers but
- 15:28
we want to offload human reviewers as
- 15:30
much as possible let the AI review take
- 15:32
care of simpler things like coding style
- 15:35
issues or if there's a missing test
- 15:38
coverage. So, make sure the author gets
- 15:41
through all of them before then the
- 15:43
review gets routed to a human reviewer.
- 15:46
And this way our human engineers can
- 15:48
focus on applying their deep judgment on
- 15:51
aspects that are somewhat subjective
- 15:53
like if the code is good, if the
- 15:55
architecture is sound, if the code uh uh
- 15:59
passes kind of the security uh the
- 16:02
security design and so on. so that in
- 16:04
the end our engineering team can take
- 16:07
the final accountability.
- 16:11
Now let's look at CI. So I assume all of
- 16:14
you deploy some form of CI uh CI/CD and
- 16:18
what we're seeing is thanks to AI now
- 16:21
making it much easier to generate code
- 16:24
as splitting code into smaller but more
- 16:27
PRs it puts a lot more pressure on the
- 16:30
CI and this is something that uh if we
- 16:33
don't address uh at a company level
- 16:36
individual engineers can be struggling
- 16:38
because that means they have to waste
- 16:39
their human time babysitting the PR to
- 16:42
get merged. If they run into flaky test
- 16:45
then they have to manually they hit
- 16:47
rerun it's very frustrating or they can
- 16:49
recruit an AI agent to babysit and kind
- 16:52
of do a loop but that in turn waste AI
- 16:54
token as well. So these are not these
- 16:56
are just workarounds not perfect
- 16:58
solution and also tend to make engineers
- 17:01
feel a little bit lower morale a little
- 17:03
bit more frustrated. So what we what we
- 17:06
are doing is kind of we put more uh
- 17:09
developer experience uh platform kind of
- 17:12
engineering to invest into reducing
- 17:15
removing the flaky test improving the CI
- 17:18
infrastructure and the key thing here is
- 17:21
to also define and measure the right
- 17:24
metrics for example uh the work clock
- 17:27
time between when a peer is ready to
- 17:29
submit till when it's submitted right if
- 17:32
a typical CR uh run takes an hour. Does
- 17:36
the typical PR submission take two or
- 17:37
three hours? In which case, that's a red
- 17:39
flag and also the number of times a PR
- 17:42
needs to get retrieded for passing
- 17:44
through the test. So, these are the key
- 17:46
metrics that we are using to measure our
- 17:48
developer experiences and the relevant
- 17:50
team who is focused on improving uh
- 17:53
these uh the developer experience.
- 17:58
So with all of the analysis and ideas
- 18:00
here we uh want to share kind of the a
- 18:04
pragmatic framework of how we can then
- 18:07
measure and optimize token usage. It has
- 18:10
three aspects. The first one is set the
- 18:13
right set of guards across setting the
- 18:15
budget and quota tracking usage defining
- 18:19
anomalies so that no users uh leaders
- 18:22
can get notified if something feels
- 18:24
wrong. This is complementaryary to still
- 18:27
regular human review which can catch
- 18:29
other interesting patterns or learnings
- 18:31
and feedback into the institutional
- 18:33
knowledge base.
- 18:35
Let me just couple that with the third
- 18:37
item here which is the learning loop we
- 18:40
talk about as our leadership work with
- 18:43
individuals to define these guard rails
- 18:45
review the metrics and then refine
- 18:47
that's how we kind of close the learning
- 18:49
loop. In addition to that, we want to
- 18:52
work with our teams, individual
- 18:54
engineers to continue to search for and
- 18:56
if needed innovate on the best practices
- 18:59
of how to use AI, how to use AI to build
- 19:02
products and also use it internally. For
- 19:05
example,
- 19:07
some engineers may be writing an agentic
- 19:09
loop as part of the harness when they
- 19:11
use cloud code. after they generated
- 19:14
initial PR they go and loop around and
- 19:16
say try and pass the set of tests and
- 19:19
then if some tests don't pass just auto
- 19:22
fix the test or the code and retry. One
- 19:25
thing to watch out for is to put a limit
- 19:27
on the number of loop steps to make sure
- 19:30
if things go out of control we don't
- 19:32
waste too many tokens on that. Another
- 19:35
example is prompt caching. This is
- 19:38
becoming increasingly more prevalent by
- 19:39
the commercial uh model vendors where
- 19:44
what they advise is if you send a prompt
- 19:48
with the same prefix they could optimize
- 19:51
how they process the prefix of the
- 19:53
prompt. What that means then as a user
- 19:56
to those is that we want to encourage
- 19:58
our users to structure their prompt that
- 20:01
way. For example, if your prompt
- 20:03
consists of a system prompt followed by
- 20:05
a user prompt, you want to put the
- 20:06
system prompt that's fixed at the top
- 20:09
and the varying content at the bottom.
- 20:12
Context pruning is also important. We
- 20:14
want to kind of drill it into each
- 20:15
individual users kind of new kind of
- 20:18
muscle memory. So they are aware that as
- 20:20
they build out the context through a
- 20:22
longer chat session, they would be
- 20:24
mindful of summarizing the context and
- 20:26
make sure that the token usage is
- 20:28
efficient that way. There are
- 20:29
increasingly more tools like claw code
- 20:31
that will automatically manage and
- 20:33
compact the context for you. And so this
- 20:35
increases the token usage efficiency but
- 20:38
also increase the quality of AI output.
- 20:40
There are other ideas we're exploring as
- 20:42
well.
- 20:48
So I know we're at time so this is
- 20:50
towards the end of the talk. There is
- 20:52
sometimes we also face build versus by
- 20:54
decision. The principle is simple for
- 20:57
things that are non- differentiating
- 20:59
like IDE CI infrastructure we want to
- 21:02
buy. But then for things that are
- 21:04
specific to our context like how we
- 21:06
would generate high quality PR for small
- 21:09
bug fixes versus building a new UI
- 21:11
feature for refactoring and so on. We
- 21:13
have our internal playbook which is a
- 21:15
set of well-crafted AI prompts. So we
- 21:18
save that and share across our team. So
- 21:21
that gets reused and enhanced. So that's
- 21:23
something we must build internally. When
- 21:25
it comes to case to case though,
- 21:27
sometimes it's still a bit ambiguous
- 21:28
like we're trying to build what we call
- 21:30
builder agent. That's like a cloud-based
- 21:32
code generation that wrap the cloud
- 21:34
codec and so on. While we know there are
- 21:37
also other vendors out there that we're
- 21:39
still exploring. So we love to exchange
- 21:40
thoughts on that.
- 21:43
So then to summarize here are a couple
- 21:45
key lessons as we went through the last
- 21:47
couple quarters of journey. I wanted to
- 21:49
share so that hopefully you could kind
- 21:50
of accelerate your process there. If I
- 21:53
were to summarize these three things I
- 21:54
would it's about learning planning ahead
- 21:57
and learn from other people's stories
- 21:59
mistakes. So what that means is think
- 22:01
about build respences by early on as you
- 22:05
are encouraging more code gen think
- 22:07
about how that impact your code review
- 22:09
and CI and how you can address these new
- 22:12
bottlenecks. And finally, continue to
- 22:14
define and instrument your system to get
- 22:16
the right metrics to measure the health
- 22:18
of your CI system and the whole
- 22:21
developer experience in general.
- 22:24
So that's it for the talk. We believe
- 22:26
that this is the golden era of AI where
- 22:29
maximizing token ROI is the key for
- 22:32
every team success. And with that, I
- 22:34
just want to end with saying we are
- 22:36
hiring. I know this is engineering
- 22:38
leadership crowd but if you know of
- 22:39
someone who is interested in building
- 22:41
cutting edge legal contracting AI we
- 22:43
would love to talk. Thank you.