WEBVTT

00:00.200 --> 00:05.440
And just before we take this thing for a drive, let me just mention that I made a little mistake here

00:05.440 --> 00:09.400
when I was changing the tools I left off those brackets.

00:09.600 --> 00:11.480
Uh, and that caused it to crash.

00:11.480 --> 00:15.480
So you may have spotted that, in which case you should have shouted, uh.

00:15.800 --> 00:22.480
I, uh, have now fixed that after a few minutes of messing around and, uh, remember, when things

00:22.600 --> 00:27.120
stop working, the first thing he should be suspicious of is what did you change?

00:27.800 --> 00:30.040
Uh, so now let's run this.

00:30.040 --> 00:36.160
So we run it by bringing up our terminal control and the backtick, and then we move into the fourth

00:36.160 --> 00:39.360
directory, and then we don't do Python.

00:39.640 --> 00:40.320
Uh, we do.

00:40.360 --> 00:47.160
You've run and then app dot Pi to bring up our application.

00:47.160 --> 00:48.000
And here it is.

00:48.000 --> 00:51.680
Here is the sidekick personal co-worker at your disposal.

00:51.680 --> 00:57.560
And I'm rather hoping that what you see is a bit different to this, because I'm loving this project

00:57.560 --> 01:02.760
and I'm fully planning to keep working on it, uh, and to keep improving it in time.

01:02.760 --> 01:08.000
And so don't worry if what you see doesn't match this video, because you should revel in the fact that

01:08.000 --> 01:12.640
it'll have more functionality, more ability, and and if it doesn't, then please help.

01:12.680 --> 01:14.080
Come and help me contribute.

01:14.400 --> 01:18.400
Make some tools, make some features and push them so this can look better and better.

01:18.640 --> 01:21.400
Uh, anyways, now let's set some challenges.

01:21.680 --> 01:26.400
Okay, let's start with what is pi times three?

01:27.640 --> 01:29.000
Let's let it have a think of that.

01:34.360 --> 01:36.000
And the funny thing is that, uh.

01:36.040 --> 01:36.880
Well there we go.

01:37.280 --> 01:40.480
Uh, this is, um.

01:44.560 --> 01:46.040
Well, that's interesting response.

01:46.040 --> 01:49.320
Addressing the previous mistakes about rounding.

01:49.600 --> 01:54.600
So, uh, what we're seeing there, I haven't seen this before, and this is something that we'll have

01:54.600 --> 01:59.080
to, uh, have to, uh, look into, but the.

01:59.120 --> 02:02.320
So we're seeing a value of pi, um, which is great.

02:02.360 --> 02:07.370
And I like the way it's put pi with the Greek symbol and of pi times three.

02:07.530 --> 02:12.610
And we're seeing in the feedback, the final response accurately states that it's that this is correct

02:12.610 --> 02:15.770
and precise, addressing the previous mistakes around rounding.

02:15.850 --> 02:17.090
So I wonder what that even means.

02:17.090 --> 02:23.010
It sounds like, unbeknownst to us, the agent and the evaluator had a conversation about this.

02:23.010 --> 02:24.250
Let's go and take a look.

02:24.290 --> 02:26.610
Wowser there's a lot of information here.

02:26.970 --> 02:28.090
It had it.

02:28.290 --> 02:31.050
It really went to town on calculating pi times three.

02:31.330 --> 02:39.130
Uh, and, uh, see that, uh, it's still we still ended up spending, uh, about 0.1 of a cent, so

02:39.170 --> 02:40.530
a thousandth of a dollar.

02:40.530 --> 02:42.290
It didn't cost us very much.

02:42.410 --> 02:46.570
But, uh, it's interesting that it had it went, went on quite, quite a rigmarole here.

02:46.570 --> 02:47.810
So let's see what happens.

02:48.090 --> 02:53.250
Uh, so this is, uh, so first of all, it went to, um, wow.

02:53.290 --> 02:57.250
It did some looking on online first of all.

02:57.250 --> 03:05.490
And then I think and then it gets to, uh, using, uh, the Python, the Python wrapper and it gets

03:05.490 --> 03:06.210
that.

03:06.210 --> 03:10.050
So it, um, it uses, it uses print results.

03:10.050 --> 03:15.090
So it does follow my instructions because previously it would have got just an empty string there.

03:15.090 --> 03:17.050
So it gets something back there.

03:17.330 --> 03:19.850
9.4477.

03:19.890 --> 03:22.770
Is that what what we see when we, uh, look in the.

03:23.290 --> 03:23.970
Yes it is.

03:23.970 --> 03:24.330
Okay.

03:24.370 --> 03:24.690
Okay.

03:24.730 --> 03:27.290
So it did it did faithfully get there in the end.

03:27.610 --> 03:30.450
Uh, so now we keep going down.

03:30.690 --> 03:34.050
Let's see what happens when the evaluator evaluated this.

03:34.370 --> 03:43.130
So, um, based on this, it says the answer provided by the assistant is incorrect.

03:43.130 --> 03:47.170
The result of this should be approximately that, not 9.425.

03:47.450 --> 03:48.050
Let's see.

03:48.130 --> 03:48.290
So.

03:48.330 --> 03:51.730
Oh yes, it replied approximately 9.45.

03:51.970 --> 03:54.890
The assistant rounded the answer too early or incorrectly.

03:54.930 --> 04:00.770
Therefore, while the intention was to provide an approximate value, the precision was lacking.

04:01.050 --> 04:02.610
And so that's great.

04:02.610 --> 04:04.010
That's this is amazing.

04:04.010 --> 04:10.100
So, uh, Were the, um, the the assistant gave an answer that was too imprecise.

04:10.100 --> 04:14.580
It wasn't to enough decimal places, which annoyed the evaluator that rejected it.

04:14.580 --> 04:19.980
And so then, uh, for some reason, the the assistant decides it's going to go back and run the tool

04:19.980 --> 04:20.860
a second time.

04:21.060 --> 04:22.700
It gets a syntax error.

04:23.340 --> 04:24.700
Let's see that syntax error.

04:24.940 --> 04:25.420
Look at that.

04:25.420 --> 04:27.740
It ends with a curly instead of a closed bracket.

04:27.740 --> 04:29.100
So it makes a mistake.

04:29.500 --> 04:30.940
It uses it again.

04:31.140 --> 04:34.100
This time it gets it right and it gets a good output.

04:34.220 --> 04:36.860
And that is then what it what it sends back.

04:37.140 --> 04:45.660
And now we see the evaluator, uh, and uh, the response is what we already saw in the screen.

04:45.940 --> 04:48.380
Uh, that and that now explains exactly why.

04:48.420 --> 04:52.780
Because the evaluator, of course, sees the whole history of this backwards and forwards, which we

04:52.820 --> 04:53.500
don't see.

04:53.780 --> 04:57.860
Um, and, uh, so, um, yeah.

04:57.860 --> 05:02.980
And if you look at what the evaluator got to evaluate, this is the result of that function.

05:02.980 --> 05:06.420
I wrote that utility function with the user assistant, user assistant.

05:06.420 --> 05:07.980
And you can see that it says user.

05:08.020 --> 05:09.300
What is pi times three?

05:09.340 --> 05:12.500
Assistant uses the tools and then gets that approximate thing.

05:12.540 --> 05:14.940
And the evaluator feedback says that's no good.

05:15.180 --> 05:17.660
The assistant uses the tools and gets a syntax error.

05:17.700 --> 05:23.180
Uses the tools again and gets the accurate number and then gets the value right there.

05:23.900 --> 05:26.060
So this is really fascinating.

05:26.060 --> 05:28.340
What what a journey to see this happen.

05:28.340 --> 05:29.860
It all happened in a couple of seconds.

05:29.860 --> 05:36.060
So we weren't aware that this uh this syntax error this this feedback was happening and we got to the

05:36.060 --> 05:36.980
right answer.

05:36.980 --> 05:39.900
So, uh, that's that's a very, very cool to see.

05:39.940 --> 05:44.740
Okay, I press the reset button, which creates a new instance of sidekick and it rebuilds the graph.

05:44.780 --> 05:46.860
So we've got a completely fresh one here.

05:46.860 --> 05:50.940
And I'm going to paste in a question I'd like to go to dinner tonight in a French restaurant in New

05:50.940 --> 05:51.140
York.

05:51.180 --> 05:58.580
Please find a great French fresh restaurant great French restaurant and write a report in markdown to

05:58.620 --> 06:02.300
dinner, including the name, address, menu and reviews.

06:02.340 --> 06:05.140
Send me a push notification with the restaurant name and phone.

06:05.140 --> 06:06.540
Let's make that tomorrow.

06:06.940 --> 06:07.830
Let's be fair.

06:07.870 --> 06:09.390
It's getting late.

06:09.430 --> 06:12.110
All right, let's, uh, let's give this a try.

06:12.350 --> 06:14.550
Now, there is a risk here.

06:14.550 --> 06:16.190
We will see what happens.

06:16.550 --> 06:18.990
The the risk is that.

06:19.310 --> 06:21.910
And what's cool that it's just popped up a browser window.

06:21.910 --> 06:25.390
It could have used the Serpa API to be searching that way.

06:25.390 --> 06:28.230
Or it could bring up a browser and drive it this way.

06:28.230 --> 06:29.430
So I'm not sure what it's going to do.

06:29.470 --> 06:32.910
And it might bring up the browser, but decide not to use it as it appears to be doing now.

06:33.590 --> 06:34.990
So it's got.

06:35.030 --> 06:35.910
Oh, and it's finished.

06:35.910 --> 06:36.670
It's finished.

06:37.470 --> 06:42.070
Uh, I've uh uh, hang on and see if I've got that pushed.

06:42.070 --> 06:44.310
I have my phone on silent so we won't have heard it.

06:44.310 --> 06:48.830
And I have indeed got a push and it's pushed notified me about Le Bernardin.

06:49.030 --> 06:49.470
So.

06:49.550 --> 06:51.870
Uh oh, it's chosen some snazzy French restaurants.

06:51.870 --> 06:52.830
I'll have, you know.

06:53.030 --> 06:55.790
Um, so, um, let me see.

06:55.790 --> 06:56.990
It's compiled a report.

06:57.030 --> 06:57.670
It's named it.

06:58.470 --> 07:02.990
The report includes detailed information about Le Bernardin, Balthazar and Daniel, such as their addresses,

07:02.990 --> 07:04.030
menus and reviews.

07:04.270 --> 07:07.750
And those, by the way, are phenomenal French restaurants.

07:07.750 --> 07:12.150
But, uh, Le Lebanon is like a three Michelin star or two.

07:12.670 --> 07:14.270
Daniel is two, I think.

07:14.350 --> 07:18.750
And, uh, Balthazar is obviously super famous and popular and celebrity haunt.

07:18.750 --> 07:21.910
So these are all like, uh, top French restaurants for sure.

07:22.110 --> 07:25.510
Uh, it probably found like some website with, with top French restaurants.

07:25.670 --> 07:30.310
Um, it did indeed send me the push notification with the name and the phone number, but we will need

07:30.310 --> 07:35.110
to verify that the phone number is accurate, which we will do right now.

07:35.470 --> 07:41.590
Um, and, uh, we will also go and, uh, uh, check the file.

07:41.710 --> 07:43.390
Let's do that right away.

07:43.750 --> 07:44.070
Okay.

07:44.070 --> 07:45.750
Well, let's start with the phone number.

07:45.750 --> 07:48.310
So I've got the my push notification in front of me.

07:48.310 --> 07:50.110
The phone number for Lebanon.

07:50.150 --> 07:51.910
According to this push notification is

07:51.910 --> 07:58.550
(212) 554-1515.

07:58.590 --> 07:59.510
Let's see what comes up.

07:59.510 --> 08:01.550
If we Google that, we get Lebanon.

08:03.070 --> 08:04.190
Fantastic.

08:04.190 --> 08:06.990
So well done our sidekick.

08:07.230 --> 08:10.750
And now we need to see whether or not we've got a file.

08:10.750 --> 08:17.550
So if we go back to cursor and look at the file in the sandbox, there is indeed a file called dinner.

08:18.470 --> 08:23.190
Let's bring that up in a preview mode and let's get rid of the terminal.

08:24.750 --> 08:25.710
Here it is.

08:25.710 --> 08:28.070
Dinner report French restaurants in New York City.

08:28.110 --> 08:33.190
Le Bernardin highlights and Daniel and a summary.

08:33.190 --> 08:34.070
There we go.

08:34.430 --> 08:40.830
So that does seem to be a successful report, nicely formatted, nicely written to my file system.

08:41.150 --> 08:44.710
And I know from from trying with this that I can then go back.

08:44.750 --> 08:46.510
I can then ask it to flesh out one.

08:46.550 --> 08:48.270
Well let's do let's do a little bit more.

08:48.310 --> 08:52.750
Let's go one step further and then I'll leave with you to experiment with yourself.

08:52.790 --> 08:53.110
Okay.

08:53.110 --> 08:54.430
So I'm going to add in here.

08:54.470 --> 09:04.270
Please update the file to only contain information about Le.

09:06.670 --> 09:07.750
Bernardin.

09:08.830 --> 09:09.430
Oops.

09:09.630 --> 09:10.990
No, I didn't get that right.

09:12.920 --> 09:19.000
and include as much information as possible.

09:21.560 --> 09:22.240
Retype it.

09:22.240 --> 09:22.800
BR.

09:22.960 --> 09:23.400
BR.

09:24.200 --> 09:24.760
There we go.

09:25.240 --> 09:27.160
Get as much information as possible.

09:27.600 --> 09:27.960
Um.

09:30.280 --> 09:41.360
And include maybe that's going a bit too far and include um, um, more details including, um, some

09:42.320 --> 09:52.240
extracts of reviews, a summary of reviews, a summary of reviews, and some menu items.

09:54.960 --> 09:56.560
Okay, let's give this a shot.

09:56.920 --> 09:57.400
Go.

10:02.440 --> 10:03.880
Let's give it a few seconds.

10:07.880 --> 10:08.560
Okay.

10:08.600 --> 10:10.000
It says that it's been doing that.

10:10.040 --> 10:11.760
It also says it's sent me a push notification.

10:11.800 --> 10:12.680
See if that's true.

10:13.280 --> 10:13.760
Yes.

10:13.760 --> 10:14.400
It has.

10:14.800 --> 10:15.800
Uh, okay.

10:15.840 --> 10:23.080
Let's go and have a look in here, and we'll just re load this open preview.

10:24.240 --> 10:24.600
Hang on.

10:24.600 --> 10:29.120
Maybe I need to, um, close the screen and open it up again.

10:33.800 --> 10:34.920
Try this one more time.

10:34.920 --> 10:35.600
Hold on.

10:37.960 --> 10:41.320
It is indeed now just on Le Bernardin.

10:41.400 --> 10:41.840
It has.

10:42.080 --> 10:47.080
So it updated a file on the on the drive in its sandbox, which is pretty cool.

10:47.240 --> 10:49.040
It updated it with more details.

10:49.040 --> 10:53.080
The cuisine menu highlights ambience and summary of reviews.

10:53.120 --> 10:54.200
Impeccable service.

10:54.240 --> 10:55.280
It is three Michelin stars.

10:55.320 --> 10:56.120
So is, uh, right.

10:56.160 --> 10:56.480
Good.

10:56.680 --> 10:57.040
Uh.

10:57.240 --> 11:00.320
And uh, yeah, it's got some menu highlights too.

11:00.480 --> 11:02.720
So it has improved the report.

11:02.720 --> 11:07.480
But the thing that I really want to show you is that it knew how to update a file that it had written

11:07.480 --> 11:12.120
before, and I also it shows that it understood the memory because I just said the file, I didn't name

11:12.120 --> 11:12.240
it.

11:12.240 --> 11:18.850
And of course it remembered that it had been called dinner, which it was getting from Landgraf's checkpointing.

11:19.010 --> 11:20.490
So there you have it.

11:20.490 --> 11:25.130
There is our sidekick in action, uh, doing plenty of things.

11:25.130 --> 11:27.730
And, uh, and of course, it can do a lot more.

11:27.770 --> 11:29.370
You can keep experimenting.

11:29.370 --> 11:31.770
It can do a lot more just with the tools it's already got.

11:31.810 --> 11:34.370
It can build files, it can write reports.

11:34.370 --> 11:38.930
The specific thing I did for a work thing is I had it go and search and browse a number of different

11:38.930 --> 11:41.530
sites, compile them and produce a report.

11:41.530 --> 11:42.650
And it did all of that.

11:42.890 --> 11:44.530
Uh, and it was really impressive.

11:44.530 --> 11:50.570
If you want it to make PDF reports, you can add a tool that just converts markdown to PDF.

11:50.610 --> 11:51.410
That's the trick.

11:51.570 --> 11:58.010
Uh, because the these, um, these, uh, llms are great at generating markdown and they would have

11:58.050 --> 12:01.290
a harder time building a PDF, although they could do it, but it would be harder.

12:01.290 --> 12:07.330
But make markdown and you can write a tool that just uses a Python library to convert markdown to PDF.

12:07.490 --> 12:10.570
And so then you can build those kinds of reports as well.

12:10.810 --> 12:12.450
And it can do real work.

12:12.490 --> 12:13.450
It really can.

12:13.450 --> 12:15.010
And you should put it to the test.
