HomeVideos

Claude Code + Karpathy Autoresearch = The New Meta

Now Playing

Claude Code + Karpathy Autoresearch = The New Meta

Transcript

803 segments

0:00

An open-source project just dropped

0:01

that, when you combine it with Claude

0:03

code, literally becomes self-improving

0:05

AI. This is not engagement farming or

0:07

hype bait. This is a real repo that was

0:09

just released by Andre Karpathy, who's

0:11

widely renowned as one of the foremost

0:13

voices in AI and machine learning

0:14

research. And basically, what he did

0:16

was, while training his model, he

0:18

thought, "Why don't I just have my

0:19

models train my models instead?" He

0:21

built an elegant pipeline, which he's

0:23

calling auto research, and essentially

0:25

completely and fully automates the

0:27

process of experimentation. He says it

0:29

right here. The idea is to give an AI

0:31

agent a small but real LLM training

0:34

setup and just let it experiment

0:35

autonomously overnight. It'll modify the

0:37

code, train for 5 minutes, check if the

0:40

results improved, keep or discard, and

0:42

then just repeat. You wake up in the

0:43

morning to a log of experiments and it

0:45

hopefully a better model. Now, I'm not

0:48

in machine learning training. I don't

0:50

help make models more intelligent. What

0:52

I do is I take models that other people

0:54

have made, and then I use them for the

0:56

purposes of making money. And so,

0:58

immediately when this dropped, I started

1:00

thinking about ways that I could apply

1:01

this principle of auto research into my

1:03

own life to improve, obviously, my own

1:05

economic outcomes. And there are so

1:07

many, it's not even funny. So, what I'm

1:08

going to do is I'm going to run through

1:09

some real practical examples in a

1:11

moment, things that I'm actually doing

1:12

in my own business that you can

1:13

implement inside of Claude code. Then,

1:15

I'm going to show you how to actually do

1:16

it, so go through the step-by-step of

1:18

setting up the repo and building some

1:20

experimentation done totally

1:22

autonomously for you. And at the end,

1:23

you will have a fully automated,

1:25

self-improving pipeline, just like Andre

1:27

Karpathy here has done for his own

1:29

machine learning training. So, here's

1:30

one of many examples. I do a lot of cold

1:32

email in my own business and then for

1:34

clients. And cold email, in case you

1:35

didn't know, is where you package up a

1:37

really nice, sexy-sounding offer, and

1:39

then you send it to people you've never

1:41

met with the hopes that they take you up

1:42

on it and then maybe convert. So, jump

1:44

on a call with you, fill out a form,

1:45

whatever. Now, the key metric in cold

1:47

email is usually reply rate,

1:49

specifically positive reply rate, but

1:51

reply rate's easier for our purposes, so

1:52

that's what I'm going to go with. And as

1:54

you could see, most cold email software

1:55

tracks this for you out of the box. So,

1:57

2.4% of people replied to this campaign.

2:00

2.5% of people replied to this campaign,

2:03

and so on. Well, turns out that's all

2:05

you need in order to build an automatic

2:06

experimentation pipeline. You need some

2:08

metric that you want to improve, and

2:10

then you need some way factor, some

2:12

thing you can modify to improve it. And

2:14

so, what I have is my metric is reply

2:16

rate, and then what I have is the thing

2:18

that I can adjust is my cold email copy.

2:20

So, what this looks like in practice for

2:21

me is a folder called email optimizer.

2:25

There are a bunch of additional code

2:26

files here, configs, places where I'm

2:29

storing the results of my data, and so

2:31

on and so forth, and aren't super

2:32

important. What is important is this

2:34

file right over here called

2:35

orchestrator.py.

2:37

And this contains all of the prompts

2:39

that I'm feeding into my orchestrator

2:41

agent, who essentially is responsible

2:43

for spinning up new cold email campaigns

2:45

and then testing them against each other

2:46

until I get better and better results.

2:48

And it was as simple for me as literally

2:49

copying the repo and making some slight

2:51

adjustments. What I do is I tell it that

2:53

that's inspired by Carbon the thesis

2:55

auto research pattern. The core idea is

2:57

an AI agent that runs experiments

2:58

autonomously in a tight loop using an

3:00

objective metric as a feedback signal. I

3:02

have the architecture over here. I run

3:05

the loop every 4 hours, and at the end

3:07

of every 4 hours, I actually have better

3:10

copy uh that's self-evolving over time

3:12

based on the results from my previous

3:14

test. And you can see some of the

3:15

examples right over here. Anything with

3:17

C is what we call a challenger. Anything

3:19

with B is what's called baseline. And

3:21

so, the model starts with a baseline

3:23

type of copy, which we could see right

3:25

over here. And then it makes slight

3:28

modifications based off of what it knows

3:30

to perform really well in cold email

3:32

copy before testing it out. It runs the

3:34

two side by side, and then automatically

3:36

harvests based off of the results, aka

3:39

the number of replies, and so on and so

3:40

forth for both campaigns. Now, that part

3:42

isn't the important bit. I mean, we've

3:43

been optimizing cold emails for for many

3:45

years at this point. The important bit

3:47

is it then creates new copy based off of

3:50

the learnings from previous experiments.

3:53

As the models get better and better and

3:55

better, they log all of their learnings

3:57

to a resource.md

3:59

that significantly improves future

4:01

models abilities to make changes. And so

4:03

here's a big list of things that this is

4:06

essentially figured out, move reply rate

4:09

up. And so in that way we get to push

4:11

towards that direction over time. Now

4:13

this has only been running for a few

4:14

days now. Imagine this running for a

4:16

year. Instead of optimizing on a basis

4:18

of once every 4 hours, imagine if this

4:20

optimized on a basis of once every 5

4:22

minutes. Well, that's what my next leg

4:23

of testing is going to do. We're going

4:25

to be significantly improving the

4:26

volume, pumping all this stuff out at

4:28

10x the level, and then optimizing and

4:31

iterating our results again fully

4:32

autonomously. So that's just one

4:33

example. I'm going to run you guys

4:35

through a bunch of other use cases that

4:36

you can apply auto research to, whether

4:38

you're in machine learning engineering

4:40

or whether you're just trying to improve

4:42

the profitability of let's say

4:44

paper click ad campaign. But first,

4:45

let's make sure we all know how to

4:47

actually use this thing. So, the way

4:49

that auto research works, to make a long

4:51

story short, is we start with an

4:53

experiment. And just like in science,

4:55

everything begins with some sort of

4:57

hypothesis, okay? So my hypothesis might

5:00

be, hey, if I make a slight adjustment

5:03

to the copy of this campaign so that

5:06

it's a little bit punchier, I think it's

5:08

going to go well. You insert that using

5:10

this little test.md. It's your goal,

5:12

metric, and some high-level

5:13

instructions. From there, the auto

5:16

research agent will go through, employ

5:19

the experiment usually using API calls.

5:21

In my case, in the example we just saw,

5:24

um to instantly, in Karpathy's specific

5:26

example we saw, he's doing it through

5:29

adjusting what are called hyper

5:30

parameters. And then after that, we

5:32

measure the results. Now, in order for

5:34

us to make sure that this works, you

5:36

know, the hypothesis isn't enough. We

5:37

need some sort of metric that we're

5:38

tracking. Now in my case, the metric was

5:41

obviously pretty simple. It was reply

5:42

rate. In Karpathy's case, it was pretty

5:44

simple. It was something called

5:45

validation loss. As long as you have

5:47

that, you can then just pick the winner

5:50

and then make a slight change before

5:51

looping back. And depending on how tight

5:54

this feedback loop is, you could

5:55

theoretically do this in a minute or

5:57

two. I mean, if he had more

5:59

infrastructure when he's training his

6:00

models, he could probably do in 5

6:01

minutes what he does in one. And then in

6:03

that way, you know, progress really,

6:05

really quickly over to some, you know,

6:07

desired goal. In my case, if I had more

6:09

cold email infrastructure, I could do

6:10

the same thing. So, at this point, scale

6:12

is more or less all you need. This

6:13

allows you to run hundreds of tests with

6:15

literally zero human involvement. I

6:17

mean, I'm not even in the loop anymore.

6:19

And to be clear, like if I was in the

6:21

loop, would I be making better decisions

6:23

than the AI model? Like probably. I'd be

6:25

a much more efficient optimizer. But

6:27

that doesn't really matter because the

6:28

reality is I take a lot more time to

6:31

optimize than a model does. I also eat,

6:33

sleep, have to go to the washroom, and

6:36

do a variety of other things with my

6:37

day. AI agents don't. You could very

6:39

quickly and easily set this up on,

6:41

again, an hourly loop and have this run

6:43

24 times a day, whereas realistically,

6:46

if you were to try and do it all

6:47

yourself, you could only do it a couple

6:48

times. And so in that way, whatever

6:50

metric that you're tracking goes up over

6:52

time, right? In my case, reply rates

6:54

significantly go up. You know, test one,

6:56

I might be at a 1.5%, test 12, I might

6:59

be at a 2.7%. Before you know it, I

7:01

reach literally like the optimal quality

7:04

possible for my set of cold emails and

7:07

then their audiences. And you can apply

7:08

this, as mentioned, to a bunch of other

7:09

strategies. So, what are those

7:11

strategies? The requirement that you

7:13

need is anything that has an objective

7:17

metric you can track

7:18

and an API or application programming

7:21

interface that you can send a request to

7:24

to get. Okay? So, some brief examples of

7:27

this. Cold email copy. Obviously,

7:30

fantastic. Why? Well, because in our

7:32

case, we have the Instantly API. The

7:35

Instantly API allows us to query

7:37

metrics, and so I can give the agent the

7:39

ability to call a quick tool, call up

7:41

the Instantly API, see how the

7:43

performance was relative to you know the

7:45

the challenger in the base campaign.

7:47

At the same time, you know, I have a

7:49

very clear metric, which in my case is

7:51

reply rate.

7:52

Okay, how about landing pages? Let's say

7:55

you're doing some form of CRO, which is

7:57

conversion rate optimization, and you

7:59

want to test to see how you can make

8:01

your landing pages as efficient as

8:02

humanly possible. Well, you can now

8:04

completely automate it with auto

8:06

research. What you do is you pick the

8:08

metric that you want, which in our case

8:10

would literally just be conversion rate,

8:13

okay?

8:14

And then if your website is hosted

8:15

locally or it's hosted using some API or

8:18

something like that, let's say a website

8:19

builder like Wix or or or or WordPress

8:22

or Webflow, what you can do is you can

8:24

give it access to the API, and then you

8:27

can say, "Hey, change this according to

8:29

this resource of best practices that

8:31

other agents have done. Make your

8:32

change, test that for, I don't know, a

8:34

day, depending on how much volume you

8:36

have, and at the end

8:38

consolidate the winner and then get rid

8:39

of the loser." You can do the exact same

8:41

thing for ad creatives, okay? What's the

8:43

main thing that you want for ad

8:45

creatives? Obviously, it's going to be

8:45

some form of conversion rate as well,

8:47

whatever specific type of conversion

8:49

rate is, that's up to you, okay? But all

8:51

you need to do is query some sort of

8:53

API. Now, you know, a lot of these ad

8:56

platforms like Facebook and Google

8:58

basically already do this for you. Mind

9:00

it, granted I don't think they do it

9:02

anywhere near as effectively as you can

9:03

with modern models like Opus 4.6 or GPT

9:06

5.4. What you can do is you can give it

9:08

the API to call a specific ad resource,

9:11

and then you could also just give it the

9:13

metric to optimize for, which is CVR,

9:15

and then it'll crush.

9:17

How about some form of customer

9:18

satisfaction for chatbot scripts? Maybe

9:21

use some sort of customer satisfaction

9:23

score, and then, you know, now you just

9:25

adjust the main template, okay, that all

9:28

customer service agents, whether human

9:30

or AI, are are going off of. That's

9:32

super simple and easy to do. How about

9:34

product descriptions for some sort of

9:36

e-comm? If you have like, I don't know,

9:38

Amazon FBA or something like that, you

9:41

know, maybe they don't necessarily have

9:42

APIs, but maybe now you set up what's

9:45

called Chrome DevTools MCP,

9:48

give it a very tightly scoped list of

9:50

steps that has to do to update the

9:51

actual body of the landing page, and

9:54

then based off of metrics like, I don't

9:56

know, how many freaking dollars you've

9:58

sold in the last little while, you can

9:59

very quickly optimize and make your

10:01

product landing page better and better

10:02

and better. You know, in my case, I make

10:04

a lot of YouTube content thesis. I could

10:06

do this automatically with YouTube

10:07

titles and the YouTube data analytics V3

10:09

API. You know, you could optimize

10:11

subject lines for your newsletters in

10:12

the same way. You could optimize pricing

10:14

pages the same way. You could optimize

10:15

literally whatever you want. And so

10:17

hopefully it's clear that at least for,

10:19

you know, most sales and marketing

10:21

purposes, and we're not even going into

10:22

the back end here, Auto Research allows

10:24

you to build a consolidated set of

10:27

knowledge on what works, what doesn't,

10:29

and then have that running in the

10:30

background for you 24/7 with no human

10:32

involvement. But how the heck does this

10:34

actually work? Well, three simple steps.

10:36

The first is we're going to clone the

10:37

repo. I'll show you how to do that in a

10:38

moment. We're then going to write some

10:40

sort of test, okay? And you can call it

10:42

test.md, you can call it whatever you

10:43

want. But this only needs to include a

10:45

goal, a metric, and a test method. And

10:48

then you just give the agent the ability

10:50

to run this on autopilot. In my case,

10:52

I'm using a service called GitHub

10:54

Actions, which allows me to store this

10:56

in the cloud and then run this on

10:57

regular intervals, like 4 hours. You can

10:59

use GitHub Actions, you could use Modal,

11:02

you could use a billion other providers,

11:03

and I'll show you how to do all of that

11:04

right now. So the first thing you need

11:05

to do is you just need to get the Auto

11:06

Research repo. Now I have a link, it's

11:09

the top one or top two in the

11:11

description, so click on that, you'll

11:13

head over to this page. This will

11:14

include all the information, including

11:16

the Python training scripts, the project

11:18

description, a bunch of other scripts,

11:20

and then what he's calling program.md,

11:23

where you provide the model everything

11:25

that it needs in order to manage this

11:26

whole research process. So you see in

11:28

his case he says, "This is an experiment

11:29

where you're going to do your own

11:30

research. Work with the user to agree on

11:32

this, create this, read that, verify

11:35

this exists, and so on and so forth. And

11:37

I want you to know this stuff is not

11:38

super important. He's actually

11:39

explicitly said that his prompt is

11:41

probably pretty crappy and that it'd be

11:43

very easy to make a better one. So, with

11:45

all that in mind, now we need to go over

11:47

to our agent. Next, head over to an

11:48

integrated development environment or

11:50

some sort of tool that allows you to run

11:52

Claude code. In my case, I'm using

11:54

what's called Antigravity. You guys

11:56

could use Visual Studio Code. You guys

11:57

could use like a hundred different apps,

11:58

to be honest. Um by the way, if this

12:00

seems like magic to you, you don't know

12:02

what any of the buttons on the page are,

12:03

I literally run through all of it in an

12:05

extensive 4-hour Claude code course that

12:07

even teaches you like what the different

12:08

icons are and so on and so forth. Really

12:10

holds your hand through it. So, just

12:12

head to the top uh right-hand corner of

12:13

the video for that. Anyway, assuming you

12:15

have all this stuff open, we're going to

12:16

want to create a new folder. So, I'm

12:18

going to go here to open folder. Then

12:21

I'm going to go new.

12:22

I'm going to say Carpathia Auto Research

12:24

Demo.

12:25

And then I'll click create. Then I'm

12:27

going to open this folder. Okay, and now

12:29

in order to open up Claude code, I'm

12:30

just going to double-click anywhere in

12:31

here. Click on my little Claude code

12:33

button. And then what I want to do is I

12:35

basically want to clone this. So, I'll

12:37

say, "Hey, clone this in the current

12:41

working directory."

12:43

What this is going to do is it's going

12:44

to make an HTTP request over to GitHub

12:47

and then clone this service, store that

12:50

down below in a folder called Auto

12:51

Research. And the reason why we're doing

12:53

this is cuz we just want all of the

12:54

context of this whole repo before we go

12:56

ahead and actually define, you know,

12:58

what it is that we're going to do on

12:59

this. And so, what I want to do, just

13:01

for a demonstration sake, is I'm just

13:02

going to reproduce my cold email

13:03

example. After that, I'm going to give

13:05

myself a little bit of space. And now,

13:06

because I have access to a voice

13:08

dictation tool called uh WhisperFlow

13:09

down over here, I'm just going to hold

13:11

my FN key and then tell it what I want.

13:14

Hey, I want you to use the context in

13:16

the Auto Research folder to help me

13:18

build a very similar idea, except

13:21

instead of testing for validation loss

13:23

and iterating on a machine learning

13:24

model, I want you to do all of this, for

13:27

cold email. The metric I'm interested in

13:29

optimizing for is my reply rate. The

13:32

platform I'm going to be doing all this

13:33

stuff on is Instantly, and I'll give you

13:35

the API credentials and everything that

13:37

you need in a moment. And finally, the

13:39

thing that you're going to change

13:40

between one experiment and the other is

13:42

going to be the copy of the cold emails.

13:45

Finally, I want you to take all this and

13:47

then put this on the cloud using GitHub

13:49

Actions, so it runs once every hour and

13:51

it has everything it needs to work on

13:54

autopilot. Once I pasted that in, press

13:56

enter.

13:57

Now it's going to go through all of the

13:58

auto research documentation. You know,

14:01

it has a few things here that's probably

14:02

not super important like this image

14:04

which shows

14:05

I don't know, the progress on Karpathy

14:07

side. You can see here his baseline was

14:09

validation BPB. It's some form of

14:12

basically accuracy, how good the model

14:14

is. Started up here, and then after just

14:16

a few runs it got all the way down over

14:18

here by adjusting various parameters.

14:20

This is more or less everything that's

14:22

going to occur except with our cold

14:23

email. So it'll be like um, you know,

14:25

invert this graph. Reply rate will start

14:27

here, and then the idea is the reply

14:29

rate will go up over time.

14:31

Anyway, I'm going to let it run for

14:32

however long it needs to before it does

14:34

everything that it has to. And then at

14:35

the end of it, we're going to have a

14:36

fully functional auto research campaign.

14:38

It's now asking me some questions. How

14:40

should the system generate new email

14:42

copy variants? So I'll say Claude. Do

14:45

you already have campaigns running in

14:46

Instantly or will this create everything

14:48

from scratch? So I'm going to say from

14:49

scratch, then click submit answers. And

14:52

it's now going through and building the

14:53

email-optimizer. For simplicity, I'm

14:56

naming it similar to the other one just

14:58

so you guys could see what's going on.

15:00

Now it's actually building an Instantly

15:02

client which will contain all of the API

15:04

calls that it needs to make to Instantly

15:06

to get the information. We also have the

15:08

orchestrator. Now orchestrator, just for

15:10

anybody that doesn't isn't inherently

15:13

familiar with the language, is basically

15:15

almost always going to be like your top

15:17

top top level agent. And the idea is

15:19

it's the orchestrator which

15:20

orchestrates, okay, kind of like a

15:22

conductor in a symphony or something,

15:24

the function of a bunch of lower level

15:26

agents

15:27

or tools. And so in this case, what this

15:29

orchestrator is doing, I'm going to try

15:31

and draw a little blue cloud code logo.

15:34

Didn't do a very good job there. But

15:35

basically what's occurring is this is

15:37

orchestrating any sub-agents that we'll

15:39

need for maybe the purposes of writing

15:41

copy.

15:42

Um it'll orchestrate the calling of like

15:44

the instantly

15:45

API. It'll orchestrate the I don't know

15:48

storing of documents and

15:51

uh I don't know JSON results and

15:52

obviously you could build in a database.

15:53

You could do whatever the heck you want

15:54

there.

15:55

And so this is what is essentially going

15:57

to be us just speaking to the

15:58

orchestrator saying, "Hey man, here's

16:00

what you are. You're an email optimizer

16:02

orchestrator and you have access to all

16:04

this stuff." Next, the utility scripts

16:06

are just little one-off API calls like

16:08

tools that allow it to do things like

16:09

purge old leads, deploy in batch, test

16:12

my parsers, and so on.

16:13

>> [gasps]

16:14

>> The config files here like baseline,

16:16

resource, and in this case I fed it some

16:18

additional documentation from a big

16:20

course I did inside of Maker School that

16:22

teaches people how to write good quality

16:24

cold emails.

16:25

This is just things that I have the

16:27

ability to change, so I can change my

16:28

baseline test. That's the first test the

16:30

cold email optimizer will ever test

16:33

against. I could change what's in

16:34

resources, although obviously that's

16:36

going to be added to.

16:37

And then I also have little tokens over

16:39

here so I can access the APIs. And then

16:42

finally the GitHub actions workflow. All

16:43

right, and I'm scrolling through here.

16:45

It's doing the vast majority of the

16:46

work, which is pretty nice.

16:48

And in in this case it's actually

16:50

creating some sub-agents to do it for

16:51

me. If I open this up, you could see we

16:53

actually have a bunch of data. So this

16:55

is a .env.example,

16:57

so um I'm going to ask it to basically

16:59

set this up as a demo, meaning you guys

17:01

can just pump in whatever the heck you

17:02

want. And then also I'm going to add a

17:04

Slack webhook. The reason why I'm doing

17:06

that is because I basically just want it

17:08

to be able to tell me how it's doing

17:09

whenever it makes the changes. Now that

17:11

it's doing some testing, we can

17:12

basically go ahead. So just for

17:13

demonstration purposes I'll say, "Great.

17:16

Create a baseline and a challenger and

17:19

show me dry run this is a demo. You can

17:22

see what it's written over here as well.

17:24

The way it works is it runs every hour

17:26

via GitHub Actions Cron. This is a

17:28

scheduling tool that triggers once per

17:30

hour. There's three steps. It's going to

17:32

harvest by collecting results from the

17:34

previous experiment. It'll generate by

17:36

creating a new challenger and then it'll

17:38

deploy by creating the campaigns,

17:40

drawing the leads from a pre-existing

17:41

pool or database that I've given it and

17:44

then finally activating everything. So

17:46

you see the leads are over here. We have

17:49

uh the usage. Then obviously we have

17:51

like the big fat long scripts as well. I

17:53

didn't have to write any of it. And this

17:54

all follows very similar logic to what

17:56

Carpathia was doing. It's just instead

17:58

of doing this for like machine learning

18:00

purposes, we're obviously doing this for

18:01

financial purposes, better reply rates.

18:03

Now because so much of this stuff occurs

18:05

completely autonomously, I would

18:06

recommend you always have a way to

18:08

visualize or at least keep track of

18:10

things as they go. And so what I've done

18:12

is I've set up a little Slack uh ping

18:14

via webhook that notifies me every time

18:16

a new challenger or a baseline variant

18:19

test is created. And so what happened is

18:21

the other day we actually tested three

18:22

different ones. You could see some of

18:24

these tests were pretty small and pretty

18:25

minor. We just made adjustments to the

18:27

subject line and so on and so forth, but

18:29

it stores things like the baseline and

18:31

the challenger. And then whenever a

18:32

harvest occurs, it tells us more or less

18:34

which one won. Okay, and we now have the

18:35

baseline which is a subject of quick

18:37

question. Gives me a bunch of uh

18:39

baseline copy here. So I actually wrote

18:41

this initial first email.

18:43

And then it's generating the challenger.

18:44

The hypothesis is the baseline is too

18:46

long. It buries the offer and it also

18:48

lacks a specific CTA time. So it's going

18:50

to try rewriting it to sub-75 words,

18:52

leading with relevance, front-loading

18:54

the risk reversal, and ending with a

18:55

concrete time ask. You can see it's

18:57

quite the significant change here. Hey

18:59

first name, I drive PPC leads for a

19:01

two-million-a-year dental marketing firm

19:02

in Calgary. I've sent over 10 million in

19:03

business to agencies like yours through

19:05

cold outbound alone. Got a backlog of

19:07

people wanting PPC right now a variety

19:08

of verticals. I'd send you booked

19:09

appointments and only charge if we hit a

19:11

number you and I agree on beforehand.

19:13

Zero risk on your end. Is this worth a

19:14

quick call or even then gives a specific

19:16

time. So, I mean it remains to be seen

19:18

whether the challenger is going to be

19:19

better than the the baseline, of course,

19:21

but that's just part of the game. And

19:22

you can see this is now actually been

19:23

deployed. We have uh that same copy over

19:26

here. And then if we go over to our

19:28

baseline, we also have the baseline copy

19:30

over here, which is that old cold email.

19:33

And basically what's going to occur now

19:34

is they're just going to test against

19:35

each other until we figure out which one

19:37

is better. Now, on net because this is

19:39

an AI model we're working with, in my

19:41

experience most challengers are not up

19:43

to the task of the baseline. Usually the

19:45

baseline is better because I wrote it,

19:47

but eventually the challengers do become

19:50

better and you start seeing significant

19:52

improvements in the reply rate relative

19:54

to the original, um which then you know

19:56

makes them higher and higher and higher

19:57

and higher over time. Then the

19:59

challenger becomes the new baseline and

20:01

then you just repeat. And so basically

20:02

what this is, to be honest, is like the

20:04

automation of like scientific

20:05

experiments.

20:07

Um

20:07

you know, this is something where right

20:09

now there's so much logistical overhead

20:11

and friction involved in like running

20:13

any sort of experiment, whether you're a

20:14

marketer, a salesperson, somebody doing

20:16

some back-end function or business or

20:17

whatever. And this just eliminates all

20:19

that friction. I no longer have to like

20:21

copy and paste the leads. I no longer

20:22

have to like do anything manually. Um

20:24

it's all done via simple API calls. And

20:26

now that we can put this thing on a

20:28

loop, even though every time I run the

20:29

orchestrator it's technically like a

20:30

different agent, it has all the context

20:32

from all of the previous runs, which

20:34

allows it to grow more intelligent over

20:35

time. I anticipate that eventually after

20:38

something like 500 to maybe 1,000 runs,

20:41

you'll probably have to consolidate some

20:42

of the previous learnings so that that

20:44

document doesn't get super long, but

20:46

whatever you're using this for, whether

20:47

landing pages, PPC, uh newsletter copy,

20:51

whatever the heck, you know, SEO pages,

20:53

hopefully you guys understand that as

20:54

things get better, the new challengers

20:57

are just going to be millions upon

20:59

millions of times more profitable and

21:01

efficacious than uh what your initial

21:03

baseline was. Now, I should note there's

21:05

There's other things that have to do in

21:06

order to set this up completely, like

21:08

for instance, I actually had to go grab

21:09

my API keys. The way you do this on

21:10

Instantly is pretty straightforward,

21:12

settings, then you go integrations, then

21:13

you go API keys down here, then you

21:15

create an API key, say whatever the heck

21:17

you want, select scopes all, and then

21:18

actually copy it over. Um, you obviously

21:20

need to do that as well with whatever AI

21:22

model you're using to do the

21:23

orchestration. In my case, I was using

21:25

Claude Opus 4.6, so I just went over to

21:27

Anthropic, got their API key. Um, and

21:28

then, you know, if you have any other

21:29

other services you want to use like

21:31

GitHub for instance or whatever, you

21:33

also have to push that up. But, agents

21:35

will handle all that stuff for you. Just

21:37

ask them, "Hey, you know, where do I go

21:38

to get my API key? Okay, can you sign me

21:40

in?" and so on and so forth, and you'll

21:41

be good to go. The final thing I want to

21:43

talk about are use cases that I would

21:44

consider not ideal for some form of auto

21:47

optimization. Um, in general, things

21:49

that work really well are things that

21:51

have fast feedback loops, okay? So, why

21:54

did Karpathy's um, AI agent or like nano

21:57

GPT loop work so well? Because it was

22:00

literally a five-minute loop.

22:02

You know, if you have a five-minute

22:03

loop, technically speaking, that means

22:05

that in 60 minutes, you could run 12

22:08

experiments. And so, obviously, 12

22:10

experiments is a lot of data, and

22:12

assuming that, you know, you're running

22:13

it on your own servers or whatever, you

22:14

can just have that thing churn. Um, but

22:16

basically, that means that your your

22:17

iteration loop will be much faster

22:20

because you'll be able to kind of draw

22:21

like this as opposed to like this, you

22:23

know?

22:24

It's going to take a lot longer to

22:25

figure out what works and what doesn't

22:27

if you're all the way down here.

22:28

Another good thing to keep in mind is

22:30

you need a clear metric. So, in my case,

22:32

reply rate was a fantastic metric. Why?

22:34

That's objective. How many people

22:35

actually my email campaigns?

22:37

Click-through rate, very, very objective

22:39

cuz, you know, obviously, this is people

22:41

clicking through an email. All this

22:42

stuff is automatically tracked. But, if

22:43

you had something that was way fuzzier

22:46

in addition to way slower, you know, the

22:48

probability of you actually making this

22:50

work uh, is is much lower because how do

22:52

you subjectively measure like warmth,

22:55

you know? You can't. It's like

22:57

happiness. It's like you can't. What you

22:58

have to do is you have to find proxies

23:00

for all these things, which are usually

23:01

like scales and metrics and analytics

23:04

and so on and so forth.

23:05

And then the third thing is you need

23:07

some sort of API access to change the

23:08

inputs. Um and if you don't have the API

23:10

access, you could build some sort of

23:12

Chrome DevTools or CLI based flow, but

23:14

like you need to have that because if

23:16

you don't, how the heck is the agent

23:17

supposed to make any changes? What are

23:18

they going to do? Just give you a list

23:19

of changes to manually go in? You can do

23:21

that, but that sort of defeats the whole

23:22

purpose.

23:23

Anyway, so what I'm going to do with

23:25

this is I'm going to provide everything

23:26

that you guys need, including the email

23:28

optimizer repo, uh the Carpathy auto

23:31

research GitHub repo, and everything

23:33

else down below. Feel free to take a

23:35

look at it, give it a click, explore it,

23:37

and use it for your own use case.

23:38

I'd be really interested to hear what

23:40

you guys end up using this on.

23:42

Um this is what all major labs that are

23:44

working on machine learning models

23:45

around the world are currently doing, by

23:47

the way, in case it wasn't clear.

23:48

They're constantly running many, many,

23:50

many experiments behind the scenes

23:52

overnight to like make their models

23:53

better and so on and so forth. So, the

23:55

fact that we're able to democratize that

23:56

and now do that for ourselves, for our

23:58

own businesses, and for our own own

23:59

models is now like incredible. But I'd

24:02

be really curious to hear what sort of

24:03

use cases you guys have with us. And,

24:05

you know, if it makes sense, I could

24:06

compile a list of these use cases and

24:08

then I could make another follow-up

24:09

video that just goes through every

24:10

single one and then even gives like real

24:12

examples of them. Um because that'd be

24:13

really dope.

24:15

Aside from that, if you guys could do me

24:15

a big solid, something like 73% of you

24:18

are not subscribed to the channel, which

24:19

really hurts cuz I try and make

24:20

high-quality content for both

24:22

subscribers and non-subscribers, but

24:23

YouTube pushes my content way more

24:25

heavily when that ratio improves. So, if

24:27

if I gave you any value today

24:28

whatsoever, please do click the

24:29

subscribe button. I hate asking for it,

24:31

but it just makes a difference on

24:32

YouTube, so I'll do what works. If you

24:33

guys want more on Claude Code and so on

24:35

and so forth, definitely check that out.

24:37

And yeah, I mean, I will catch all y'all

24:38

in the next video. Thanks so much for

24:40

watching, guys, per usual. See you.

Interactive Summary

This video introduces a powerful open-source project called 'Auto Research,' originally created by Andre Karpathy, which leverages AI to automate experimentation pipelines. By providing an AI agent with an objective metric and the ability to modify inputs through an API, users can build self-improving systems. The creator demonstrates how to apply this to business tasks like cold email campaigns, where the system autonomously generates, tests, and optimizes copy based on reply rates, effectively creating a 24/7 automated loop for continuous improvement.

Suggested questions

3 ready-made prompts