AI-Generated Code Is Already Competing With Human Code — Daksh Gupta, Greptile

AI Engineer · 12 min · 138 sentences · from YouTube's caption track

Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.

  1. 00:12How's everyone doing?
  2. 00:14Awesome.
  3. 00:15Uh, my name is Du.
  4. 00:16I'm one of the co-founders of a company called Gravile.
  5. 00:19And at Grapile, we're working on AI agents that validate poll requests with full context of the codebase.
  6. 00:27The way Graval does this is every time there's a pull request, we have a swarm of agents and they go and look at every file that's changed, every file that's related to the files that changed to figure out if there's bugs.
  7. 00:37And it also spins up your code in a sandbox, installs the dependencies, spins up local host, clicks around to try to break things, mocks inputs, and everything else to figure out if the code is broken.
  8. 00:49But I'm going to talk about something a little bit different, which is fully autonomous coding agents.
  9. 00:56So I first moved to San Francisco three years ago to work on AI coding.
  10. 01:00And this is because GBT 3.5 which came out in 2022 was the first model that seemed like it was really good at programming at the time.
  11. 01:09Code complete tab complete was like the main paradigm for coding.
  12. 01:13The most exciting thing that was happening was you had tab complete from cursor and you had co-pilots code complete and that was like the way in which AI coding works.
  13. 01:22In 2024, for the first time, multifile editing started to work.
  14. 01:26Cursor was the first to do this and then a couple of other products followed.
  15. 01:30But now, for the first time, AI could simultaneously edit multiple files at once.
  16. 01:35But things got really interesting in 2025 because for the first time, we had autonomous agents.
  17. 01:39They could be given a task and they could go and fulfill the task and create entire pull requests all at once.
  18. 01:43And this came to a precipice in December of last year when coding agents became literally completely autonomous.
  19. 01:49And anyone that's working in AI coding knows that December when the new models came out was sort of this like watershed moment in the history of AI coding because these products for the first time were like truly autonomous in how they programmed.
  20. 02:00And all over Twitter were all these crazy stories of people that were having these agents spin off and open a 100 pull requests a day.
  21. 02:07They were experimenting with polyphasic sleep so they could stay awake to re-trigger their agents from time to time.
  22. 02:14And as someone that started programming before agents, I was very skeptical that real companies could program this way.
  23. 02:21So I was really really curious, are these fully vi PRs really actually good?
  24. 02:25Is this something that's sort of a Twitter hype and you can have independent developers and and maybe like small startups with no real customers do this?
  25. 02:32But anyone with real customers with an actually commercially viable code base, could they still use these end-to-end coding agents?
  26. 02:42And at Grubile, we're fortunate to work with some very large companies.
  27. 02:46We work with Nvidia, with Coinbase, with Scale, with Data Dog, with American Express.
  28. 02:49And we got really excited to see if these coding agents were being used really at these large companies and if they were any good at doing real world coding.
  29. 03:02So, as an amateur data scientist, I decided to go and dive into our data.
  30. 03:06We review more than a million poll requests a month and we tend to get a lot of interesting data on what's good and bad about these poll requests.
  31. 03:12We do this for thousands and thousands of companies and they're usually enterprises or at least companies with serious products with real customers.
  32. 03:19And so we figured actually studying this data would yield some really interesting results.
  33. 03:23Was a surprisingly hard to figure out from all the poll requests that GR was reviewing which of the poll requests was actually generated by AI.
  34. 03:30Surprisingly difficult to do this.
  35. 03:32The first thing that I tried was I started looking at the GitHub author field.
  36. 03:37GitHub every commit has an author field and so went through the authors and turns out that less than 1% of pull requests had codeex or clawed or cursor as the author.
  37. 03:47But it wasn't intuitive to me that only but 1% of all code was fully AI generated.
  38. 03:51It just seemed intuitive that that number would be much higher.
  39. 03:53So I started to look for other signals.
  40. 03:55Now thankfully Claude and Codex and some other products leave a PR description in the footer.
  41. 04:01In the PR description, they put something along the lines of co-authored by claude or co-authored by cursor and so on.
  42. 04:06And this gave me a little bit more signal, a little bit more data on which PRs were ostensibly largely, if not completely AI generated.
  43. 04:13The third thing I looked at was branch name prefixes.
  44. 04:15If you use Codex, you know that Codex names as branches.
  45. 04:18And it seemed reasonable that if someone was using these coding agents in such a sense that they were writing the branch names or writing the PR descriptions that the PRs were largely AI generated.
  46. 04:26That seemed like a reasonable assumption to me.
  47. 04:28So now I had a good set of signals to indicate whether a poll request was in fact completely or largely AI generated or not.
  48. 04:36And I came to the result that about a quarter of all the poll requests that Graal was reviewing in any given month were completely or at least largely generated by AI.
  49. 04:46Then I backtracked this data to the last 12 months and it turns out that this number is growing really fast.
  50. 04:51In fact, early last year, fewer than 1% of pull requests had any evidence of being completely AI generated.
  51. 04:57So this number is going very very fast as model performance is getting better.
  52. 05:00What's also interesting is that you can't tell when new models came out on this chart.
  53. 05:05It seemed like the progress is very continuous.
  54. 05:07These things are just generally diffusing into the economy at a generally high pace.
  55. 05:13So then came the next question.
  56. 05:14Everyone's vibe coding.
  57. 05:16Everyone's producing these PRs that are antiendentic.
  58. 05:18Not human plus AI but literally AI.
  59. 05:20The question is are these PRs any good?
  60. 05:23First question, what does it mean for PR to be good?
  61. 05:24That seemed like actually a very important question to answer before we got into judging these AI generated PRs.
  62. 05:30And so I took a few methods to try this.
  63. 05:32The first one I tried was revert rates.
  64. 05:34If a pull request reverted, it was probably pretty bad.
  65. 05:37And so that seemed like a pretty sincere sort of guess at what a bad PR could be.
  66. 05:42And so I started tracking, okay, which PRs were in fact reverted.
  67. 05:46GitHub conveniently names its branches with a revert dash PR number and PR name.
  68. 05:51And so I was able to track the rate at which these things were being reverted.
  69. 05:54And I found some interesting data.
  70. 05:56Codex PR is reverted about one out of every thousand poll requests.
  71. 05:59Devon once every three and a half times every thousand poll requests.
  72. 06:03Humans right in the middle at about two and a half.
  73. 06:05So there doesn't seem to be very big difference between the rate at which poll requests were reverted from people versus agents in my study.
  74. 06:12Now I was very skeptical of this and I figured okay this is probably because humans are making agents do the easier work the simpler well scoped pull requests and the more complex work was being done by humans and of course complex work had a higher propensity to be reverted because the poll requests were more complicated had larger
  75. 06:26surface areas risks and so on.
  76. 06:28So I decided to measure the average size of PR and whether the revert rates were sort of aligned for both of those and I found really interesting data.
  77. 06:36Turns out there's actually very little correlation, if any, between the size of PRs of humans were getting reverted versus size of PRs from agents that were being reverted.
  78. 06:44So this does not seem like actually very strong evidence that the human PRs are any better than the agent PRs.
  79. 06:52The second set of signals I started looking at was Graile comments.
  80. 06:54Now, now Grapple is reviewing all these poll requests and Graile finds P 0's, P1's, P2s across all these changes and it seemed reasonable that if Grapile was finding more bugs in the code that the code was most likely worse.
  81. 07:07So then I started tracking the counts of P 0, P1's and P2s in all these changes.
  82. 07:12And interestingly, once again, there was not that much of a difference.
  83. 07:15In fact, three out of the four agents that we tested performed better than humans in terms of the rate at which they were producing P 0. they were producing fewer P 0 than humans were.
  84. 07:25Similarly the case with P1's and P2s.
  85. 07:28Broadly speaking, human generated PRs were about equal in quality to agent generated PRs based on this data.
  86. 07:43have the agent go and look at those comments, address them, and make a new commit on the pull request branch.
  87. 07:49That is the most common way to use guptile.
  88. 07:51And so it seems reasonable that if the pull requests were higher quality, it would require fewer iterations before they would be merged.
  89. 07:57And so I started tracking the number of iterations, the number of review rounds between when the poll request was opened and when it was merged.
  90. 08:04Sure enough, very little difference.
  91. 08:06Devon's PRs 2.1, Codex PR is 2.45, four, five number of review cycles to merge and humans right in the middle.
  92. 08:14Once again, very little if any statistical difference between human generated and AI generated pull request in terms of how many iterations before they were ready to merge.
  93. 08:24So now that there wasn't any strong evidence that agent generated PRs were worse than human generated PRs, I got curious if there were qualitative differences.
  94. 08:31Maybe the types of ways in which agents failed were different from the types of ways that humans failed.
  95. 08:36And so then I looked at the corpus of reptiles comments.
  96. 08:39It makes on average about four comments per pull request.
  97. 08:42So we had this corpus of several million comments across the last several months.
  98. 08:46And so I started scanning them for specific phrases and words.
  99. 08:49For instance, SQL injection or N plus1 query.
  100. 08:53And I plotted the frequency with which these terms occur in graphile comments for these various agents.
  101. 08:58And so I made this chart of patterns of failure.
  102. 09:03To interpret this chart, you can assume that 1x is the human propensity for producing that type of error across the entire chart.
  103. 09:09And you can kind of see that there's actually quite a lot of variation in the types of failures that these agents seem to produce.
  104. 09:16For instance, Claude is one and a half times more likely to produce a SQL injection error than humans.
  105. 09:22Devon is about half as likely as humans to produce a off bypass issue.
  106. 09:29I found it very interesting that there was this much variation in how these agents were performing and how different their failure modes were from humans.
  107. 09:38So it turns out that in spite of my initial skepticism around the enterprise usability of endto-end coding agents, the evidence seems to suggest that they're here and they probably can contribute in real meaningful ways to enterprise
  108. 09:52coding environments.
  109. 09:53And so we started to think a little bit more about what code review would look like in such a world.
  110. 09:57Here's an interesting stat.
  111. 10:00Today, Graal is used by several tens of thousands of engineers every single week to review all of their code.
  112. 10:05So, we also know generally speaking the number of pull requests that each of these people are writing.
  113. 10:11The median grubile user writes 50 pull requests a month.
  114. 10:14So, call it about two plus per workday.
  115. 10:17The 90th percentile writes 500 poll requests per month.
  116. 10:20That is a drastic difference between the median and the P90.
  117. 10:24The P99 is in the thousands of pull requests.
  118. 10:27That is very interesting in its own sense because that means that the people on the margins are actually producing poll requests at the rate at which they're coming up with new ideas.
  119. 10:34And beyond being interesting, it also makes you wonder well there existing systems for validating this code which is manual code review of course testing maybe you have a QA firm that you work with naturally can scale to that same degree.
  120. 10:47And at Grav, we decided to take sort of a first principles view at what really good validation could look like.
  121. 10:52Instead of saying that we wanted to automate QA or automate testing or automate code review, we took a step back and said, what would we need to do for anyone to be able to merge hundreds of pull requests a month in an enterprise environment where it really matters that the code is correct?
  122. 11:05What would need to happen between when the code was expressed into a pull request and when it was merged and deployed safely?
  123. 11:11We figured we only actually had to answer three questions.
  124. 11:14The first one is does this change violate the user contract?
  125. 11:17The second one, does it increase the propensity of a future violation of the user contract, whatever the user contract might be for that application?
  126. 11:24And third, does it fulfill the intent that the author described?
  127. 11:27Did the poll request do the thing that the author wanted to do?
  128. 11:31And so we started approaching this problem from base ground level and said, okay, agents can probably figure out if something's going to violate the user contract and detect bugs.
  129. 11:41If you let it spin up the code in a sandbox, have it install the dependencies, mock the inputs, run the browser agents, you can probably start to discover most of the issues that could occur,
  130. 11:51you get a pretty high degree of confidence on merge.
  131. 11:53Today, almost a fifth of all the poll request or gravile reviews are merged without any human review or without any human testing, which I find very interesting and that is a number that we care a lot about and want to bring higher and higher,
  132. 12:04of course, within the guard rails of producing really high quality code.
  133. 12:10Thank you so much.
  134. 12:10My name is D, one of the co-founders of Graptile.
  135. 12:13We have a booth here which you should come to.
  136. 12:15And if you're interested in trying Graptile, you can find us at gretile.com and try it today for free.
  137. 12:21And we'd love to hear your feedback.
  138. 12:22Thank you so much.