And just before we take this thing for a drive, let me just mention that I made a little mistake here 在我们试驾之前，让我提一下我在这里犯了一个小错误
when I was changing the tools I left off those brackets. 当我更换工具时，我去掉了那些括号。
Uh, and that caused it to crash. 呃，这导致了它崩溃。
So you may have spotted that, in which case you should have shouted, uh. 所以你可能已经发现了这一点，在这种情况下你应该大喊，呃。
I, uh, have now fixed that after a few minutes of messing around and, uh, remember, when things 我，呃，经过几分钟的混乱现在已经解决了这个问题，并且，呃，记住，当事情发生时
stop working, the first thing he should be suspicious of is what did you change? 停止工作，他首先应该怀疑的是你改变了什么？
Uh, so now let's run this. 呃，现在让我们运行这个。
So we run it by bringing up our terminal control and the backtick, and then we move into the fourth 因此，我们通过调出终端控制和反引号来运行它，然后进入第四个
directory, and then we don't do Python. 目录，然后我们不做Python。
Uh, we do. 呃，我们愿意。
You've run and then app dot Pi to bring up our application. 您已运行 app dot Pi 来启动我们的应用程序。
And here it is. 就是这样。
Here is the sidekick personal co-worker at your disposal. 这是您可以使用的私人同事。
And I'm rather hoping that what you see is a bit different to this, because I'm loving this project 我宁愿希望你所看到的与此有所不同，因为我喜欢这个项目
and I'm fully planning to keep working on it, uh, and to keep improving it in time. 我完全计划继续努力，呃，并及时改进它。
And so don't worry if what you see doesn't match this video, because you should revel in the fact that 因此，如果您看到的内容与此视频不符，请不要担心，因为您应该陶醉于以下事实：
it'll have more functionality, more ability, and and if it doesn't, then please help. 它将有更多的功能，更多的能力，如果没有，那么请帮忙。
Come and help me contribute. 快来帮我贡献一下吧。
Make some tools, make some features and push them so this can look better and better. 制作一些工具，制作一些功能并推动它们，这样看起来就会越来越好。
Uh, anyways, now let's set some challenges. 呃，无论如何，现在让我们设定一些挑战。
Okay, let's start with what is pi times three? 好吧，我们先来看看 pi 乘以三是多少？
Let's let it have a think of that. 让我们考虑一下。
And the funny thing is that, uh. 有趣的是，呃。
Well there we go. 好吧，我们开始吧。
Uh, this is, um. 呃，这是，嗯。
Well, that's interesting response. 嗯，这是一个有趣的回应。
Addressing the previous mistakes about rounding. 解决以前有关舍入的错误。
So, uh, what we're seeing there, I haven't seen this before, and this is something that we'll have 所以，呃，我们在那里看到的，我以前从未见过，这是我们将会看到的
to, uh, have to, uh, look into, but the. 去，呃，不得不，呃，调查一下，但是。
So we're seeing a value of pi, um, which is great. 所以我们看到了 pi 的值，嗯，这很棒。
And I like the way it's put pi with the Greek symbol and of pi times three. 我喜欢它用希腊符号和 pi 乘以三的方式。
And we're seeing in the feedback, the final response accurately states that it's that this is correct 我们在反馈中看到，最终的回应准确地表明这是正确的
and precise, addressing the previous mistakes around rounding. 并且精确，解决了之前关于舍入的错误。
So I wonder what that even means. 所以我想知道这意味着什么。
It sounds like, unbeknownst to us, the agent and the evaluator had a conversation about this. 听起来，在我们不知情的情况下，代理人和评估员就此事进行了对话。
Let's go and take a look. 我们去看看吧。
Wowser there's a lot of information here. Wowser 这里有很多信息。
It had it. 它有它。
It really went to town on calculating pi times three. 它在计算 pi 三倍时确实很有效。
Uh, and, uh, see that, uh, it's still we still ended up spending, uh, about 0.1 of a cent, so 呃，呃，你看，呃，我们最终还是花了，呃，大约 0.1 美分，所以
a thousandth of a dollar. 一美元的千分之一。
It didn't cost us very much. 我们并没有花多少钱。
But, uh, it's interesting that it had it went, went on quite, quite a rigmarole here. 但是，呃，有趣的是，它已经过去了，在这里进行得非常非常冗长。
So let's see what happens. 那么让我们看看会发生什么。
Uh, so this is, uh, so first of all, it went to, um, wow. 呃，所以这是，呃，所以首先，它去了，嗯，哇。
It did some looking on online first of all. 它首先在网上做了一些查找。
And then I think and then it gets to, uh, using, uh, the Python, the Python wrapper and it gets 然后我想，然后就开始，呃，使用，呃，Python，Python 包装器，然后它就得到了
that. 那。
So it, um, it uses, it uses print results. 所以它，嗯，它使用，它使用打印结果。
So it does follow my instructions because previously it would have got just an empty string there. 所以它确实遵循了我的指示，因为以前它那里只有一个空字符串。
So it gets something back there. 所以它会得到一些东西。
9.4477. 9.4477。
Is that what what we see when we, uh, look in the. 这就是我们，呃，看时所看到的。
Yes it is. 是的。
Okay. 好的。
So it did it did faithfully get there in the end. 所以它最终确实忠实地到达了那里。
Uh, so now we keep going down. 呃，所以现在我们继续往下走。
Let's see what happens when the evaluator evaluated this. 让我们看看评估者评估时会发生什么。
So, um, based on this, it says the answer provided by the assistant is incorrect. 那么，嗯，据此来说，助理提供的答案是错误的。
The result of this should be approximately that, not 9.425. 结果应该大约是 9.425，而不是 9.425。
Let's see. 让我们来看看。
So. 所以。
Oh yes, it replied approximately 9.45. 哦，是的，它回复了大约 9.45。
The assistant rounded the answer too early or incorrectly. 助理太早或错误地四舍五入了答案。
Therefore, while the intention was to provide an approximate value, the precision was lacking. 因此，虽然目的是提供近似值，但缺乏精度。
And so that's great. 这太好了。
That's this is amazing. 这就是了不起。
So, uh, Were the, um, the the assistant gave an answer that was too imprecise. 那么呃,是不是那个,呃,助理给的答案太不精确了,.
It wasn't to enough decimal places, which annoyed the evaluator that rejected it. 它没有达到足够的小数位，这惹恼了拒绝它的评估者。
And so then, uh, for some reason, the the assistant decides it's going to go back and run the tool 然后，呃，出于某种原因，助手决定返回并运行该工具
a second time. 第二次。
It gets a syntax error. 它出现语法错误。
Let's see that syntax error. 让我们看看这个语法错误。
Look at that. 看看那个。
It ends with a curly instead of a closed bracket. 它以花括号而不是闭括号结尾。
So it makes a mistake. 所以它会犯错误。
It uses it again. 它再次使用它。
This time it gets it right and it gets a good output. 这次它做对了并且得到了很好的输出。
And that is then what it what it sends back. 这就是它返回的内容。
And now we see the evaluator, uh, and uh, the response is what we already saw in the screen. 现在我们看到了评估器，呃，呃，响应就是我们已经在屏幕上看到的。
Uh, that and that now explains exactly why. 呃，那现在就解释了原因。
Because the evaluator, of course, sees the whole history of this backwards and forwards, which we 因为评估者当然可以看到整个前后的历史，我们
don't see. 没看到。
Um, and, uh, so, um, yeah. 嗯，嗯，所以，嗯，是的。
And if you look at what the evaluator got to evaluate, this is the result of that function. 如果您查看评估器要评估的内容，就会发现这就是该函数的结果。
I wrote that utility function with the user assistant, user assistant. 我用用户助手用户助手编写了这个实用函数。
And you can see that it says user. 你可以看到它说的是用户。
What is pi times three? pi 乘以三是多少？
Assistant uses the tools and then gets that approximate thing. 助理使用这些工具，然后得到近似的东西。
And the evaluator feedback says that's no good. 评估者反馈说这不好。
The assistant uses the tools and gets a syntax error. 助手使用这些工具时出现语法错误。
Uses the tools again and gets the accurate number and then gets the value right there. 再次使用工具并获取准确的数字，然后立即获取值。
So this is really fascinating. 所以这真的很有趣。
What what a journey to see this happen. 目睹这一切的发生是多么美妙的旅程啊。
It all happened in a couple of seconds. 这一切都发生在几秒钟之内。
So we weren't aware that this uh this syntax error this this feedback was happening and we got to the 所以我们没有意识到这个呃这个语法错误这个反馈正在发生，我们得到了
right answer. 正确答案。
So, uh, that's that's a very, very cool to see. 所以，呃，这是非常非常酷的事情。
Okay, I press the reset button, which creates a new instance of sidekick and it rebuilds the graph. 好的，我按下重置按钮，这会创建一个新的 sidekick 实例并重建图表。
So we've got a completely fresh one here. 所以我们这里有一个完全新鲜的。
And I'm going to paste in a question I'd like to go to dinner tonight in a French restaurant in New 我要粘贴一个问题 我今晚想去新的一家法国餐厅吃晚饭
York. 约克。
Please find a great French fresh restaurant great French restaurant and write a report in markdown to 请找到一家很棒的法式新鲜餐厅很棒的法式餐厅并用markdown写一份报告给
dinner, including the name, address, menu and reviews. 晚餐，包括名称、地址、菜单和评论。
Send me a push notification with the restaurant name and phone. 向我发送包含餐厅名称和电话的推送通知。
Let's make that tomorrow. 让我们明天做吧。
Let's be fair. 让我们公平一点吧。
It's getting late. 天色已晚了。
All right, let's, uh, let's give this a try. 好吧，让我们，呃，让我们尝试一下。
Now, there is a risk here. 现在，这里存在风险。
We will see what happens. 我们将会看看会发生什么。
The the risk is that. 风险就是这样。
And what's cool that it's just popped up a browser window. 更酷的是它只是弹出了一个浏览器窗口。
It could have used the Serpa API to be searching that way. 它可以使用 Serpa API 来以这种方式进行搜索。
Or it could bring up a browser and drive it this way. 或者它可以启动一个浏览器并以这种方式驱动它。
So I'm not sure what it's going to do. 所以我不确定它会做什么。
And it might bring up the browser, but decide not to use it as it appears to be doing now. 它可能会打开浏览器，但决定不像现在那样使用它。
So it's got. 所以就这样了。
Oh, and it's finished. 哦，它已经完成了。
It's finished. 完成了。
Uh, I've uh uh, hang on and see if I've got that pushed. 呃，我呃呃，坚持一下，看看我是否已经推动了。
I have my phone on silent so we won't have heard it. 我把手机调成静音，这样我们就听不到了。
And I have indeed got a push and it's pushed notified me about Le Bernardin. 我确实收到了推送，并且推送通知了我有关 Le Bernardin 的信息。
So. 所以。
Uh oh, it's chosen some snazzy French restaurants. 呃哦，选了一些时髦的法国餐厅。
I'll have, you know. 我会的，你知道的。
Um, so, um, let me see. 嗯，只是，嗯，让我看看。
It's compiled a report. 它已编制了一份报告。
It's named it. 就这样命名了。
The report includes detailed information about Le Bernardin, Balthazar and Daniel, such as their addresses, 该报告包含有关勒伯纳丁、巴尔萨扎和丹尼尔的详细信息，例如他们的地址、
menus and reviews. 菜单和评论。
And those, by the way, are phenomenal French restaurants. 顺便说一句，这些都是非凡的法国餐厅。
But, uh, Le Lebanon is like a three Michelin star or two. 但是，呃，黎巴嫩就像一两颗米其林三星。
Daniel is two, I think. 我想丹尼尔两岁了。
And, uh, Balthazar is obviously super famous and popular and celebrity haunt. 而且，呃，巴尔萨扎显然是超级有名、受欢迎和名人出没的地方。
So these are all like, uh, top French restaurants for sure. 所以这些肯定都像顶级法国餐厅。
Uh, it probably found like some website with, with top French restaurants. 呃，它可能像某些网站一样，有顶级法国餐厅。
Um, it did indeed send me the push notification with the name and the phone number, but we will need 嗯，它确实向我发送了带有姓名和电话号码的推送通知，但我们需要
to verify that the phone number is accurate, which we will do right now. 验证电话号码是否准确，我们现在就会这样做。
Um, and, uh, we will also go and, uh, uh, check the file. 嗯,还有,呃,我们也去,呃,呃,检查一下文件。
Let's do that right away. 让我们立即开始吧。
Okay. 好的。
Well, let's start with the phone number. 好吧，让我们从电话号码开始。
So I've got the my push notification in front of me. 所以我的推送通知就在我面前。
The phone number for Lebanon. 黎巴嫩的电话号码。
According to this push notification is 根据这个推送通知是
(212) 554-1515. (212) 554-1515。
Let's see what comes up. 让我们看看会发生什么。
If we Google that, we get Lebanon. 如果我们谷歌搜索，我们就会找到黎巴嫩。
Fantastic. 极好的。
So well done our sidekick. 我们的伙伴做得很好。
And now we need to see whether or not we've got a file. 现在我们需要查看是否有文件。
So if we go back to cursor and look at the file in the sandbox, there is indeed a file called dinner. 所以如果我们回到光标处查看沙箱中的文件，确实有一个名为dinner的文件。
Let's bring that up in a preview mode and let's get rid of the terminal. 让我们以预览模式显示它并摆脱终端。
Here it is. 这里是。
Dinner report French restaurants in New York City. 晚餐报道纽约市的法国餐厅。
Le Bernardin highlights and Daniel and a summary. Le Bernardin 的重点内容和 Daniel 的摘要。
There we go. 我们开始吧。
So that does seem to be a successful report, nicely formatted, nicely written to my file system. 所以这看起来确实是一个成功的报告，格式很好，很好地写入了我的文件系统。
And I know from from trying with this that I can then go back. 从尝试中我知道我可以回去。
I can then ask it to flesh out one. 然后我可以要求它充实一个。
Well let's do let's do a little bit more. 好吧，让我们再做一点吧。
Let's go one step further and then I'll leave with you to experiment with yourself. 让我们更进一步，然后我将与您一起进行实验。
Okay. 好的。
So I'm going to add in here. 所以我要在这里补充一下。
Please update the file to only contain information about Le. 请更新文件以仅包含有关 Le 的信息。
Bernardin. 伯纳丁.
Oops. 哎呀。
No, I didn't get that right. 不，我没听清楚。
and include as much information as possible. 并包含尽可能多的信息。
Retype it. 重新输入。
BR. BR。
There we go. 我们开始吧。
Get as much information as possible. 获取尽可能多的信息。
Um. 一。
And include maybe that's going a bit too far and include um, um, more details including, um, some 并包括可能有点太过分了，包括嗯，嗯，更多细节，包括，嗯，一些
extracts of reviews, a summary of reviews, a summary of reviews, and some menu items. 评论摘录、评论摘要、评论摘要和一些菜单项。
Okay, let's give this a shot. 好吧，让我们试一下。
Go. 去。
Let's give it a few seconds. 让我们等几秒钟。
Okay. 好的。
It says that it's been doing that. 它说它一直在这样做。
It also says it's sent me a push notification. 它还说它向我发送了推送通知。
See if that's true. 看看这是不是真的。
Yes. 是的。
It has. 确实如此。
Uh, okay. 呃，好吧。
Let's go and have a look in here, and we'll just re load this open preview. 我们去这里看看，然后重新加载这个打开的预览。
Hang on. 不挂断。
Maybe I need to, um, close the screen and open it up again. 也许我需要，嗯，关闭屏幕然后再次打开。
Try this one more time. 再尝试一次。
Hold on. 坚持，稍等。
It is indeed now just on Le Bernardin. 现在确实就在 Le Bernardin 上。
It has. 确实如此。
So it updated a file on the on the drive in its sandbox, which is pretty cool. 因此，它更新了沙箱中驱动器上的文件，这非常酷。
It updated it with more details. 它更新了更多细节。
The cuisine menu highlights ambience and summary of reviews. 美食菜单突出了氛围和评论摘要。
Impeccable service. 无可挑剔的服务。
It is three Michelin stars. 这是米其林三颗星。
So is, uh, right. 嗯，也是这样。
Good. 好的。
Uh. 呃。
And uh, yeah, it's got some menu highlights too. 呃，是的，它还有一些菜单亮点。
So it has improved the report. 因此它改进了报告。
But the thing that I really want to show you is that it knew how to update a file that it had written 但我真正想向您展示的是它知道如何更新它所写入的文件
before, and I also it shows that it understood the memory because I just said the file, I didn't name 之前，我也表明它理解内存，因为我只是说了文件，我没有命名
it. 它。
And of course it remembered that it had been called dinner, which it was getting from Landgraf's checkpointing. 当然，它记得它被称为晚餐，这是它从兰德格拉夫的检查站得到的。
So there you have it. 这样你就得到了。
There is our sidekick in action, uh, doing plenty of things. 我们的助手正在行动，呃，做了很多事情。
And, uh, and of course, it can do a lot more. 而且，呃，当然，它还可以做更多的事情。
You can keep experimenting. 你可以继续尝试。
It can do a lot more just with the tools it's already got. 只需使用已有的工具，它就可以做更多的事情。
It can build files, it can write reports. 它可以构建文件，可以编写报告。
The specific thing I did for a work thing is I had it go and search and browse a number of different 我为工作所做的具体事情是我让它去搜索和浏览许多不同的
sites, compile them and produce a report. 网站，对其进行编译并生成报告。
And it did all of that. 它做到了这一切。
Uh, and it was really impressive. 呃，这确实令人印象深刻。
If you want it to make PDF reports, you can add a tool that just converts markdown to PDF. 如果您希望它制作 PDF 报告，您可以添加一个仅将 Markdown 转换为 PDF 的工具。
That's the trick. 这就是窍门。
Uh, because the these, um, these, uh, llms are great at generating markdown and they would have 呃，因为这些，嗯，这些，呃，llms 非常擅长生成 markdown，他们会
a harder time building a PDF, although they could do it, but it would be harder. 构建 PDF 的难度更大，虽然他们可以做到，但会更难。
But make markdown and you can write a tool that just uses a Python library to convert markdown to PDF. 但是制作markdown，你可以编写一个只使用Python库将markdown转换为PDF的工具。
And so then you can build those kinds of reports as well. 这样您也可以构建此类报告。
And it can do real work. 它可以做真正的工作。
It really can. 确实可以。
And you should put it to the test. 你应该对其进行测试。