WEBVTT

00:00.200 --> 00:00.720
Hey there.

00:00.760 --> 00:01.440
Eden here.

00:01.480 --> 00:02.960
Hope you're enjoying the course.

00:02.960 --> 00:09.280
And in this section we're going to be diving deep into function calling, aka as tool calling.

00:09.320 --> 00:12.240
We're going to be using those terms interchangeably.

00:12.360 --> 00:15.800
And by now you should be familiar with the react prompt.

00:15.800 --> 00:17.720
And we saw how cool this prompt was.

00:17.760 --> 00:23.880
And this entire loop of reasoning and acting and how we can build with it some very advanced tech.

00:24.120 --> 00:31.320
However, the react prompt, you probably notice it's not that reliable, and it's enough that the LM

00:31.320 --> 00:38.080
is going to generate one wrong token and it can mess up our entire response, because link chain is

00:38.080 --> 00:40.560
going to parse it with regular expressions.

00:40.560 --> 00:46.240
While this prompt is the basis for a genetic behavior and AI agents.

00:46.400 --> 00:48.240
It's really not that reliable.

00:48.520 --> 00:56.280
And the natural evolution of this prompt and the natural evolution of this prompt into a production

00:56.280 --> 01:03.660
grade reliable solution, is the capability of Llms to do function calling or tool calling.

01:03.660 --> 01:06.900
And this is what we're going to be covering in this section.

01:06.900 --> 01:12.580
So function calling the really really gist of it is that instead of relying on this react prompt, we're

01:12.620 --> 01:16.900
actually going to be relying on the model provider, the provider.

01:16.940 --> 01:22.500
We're going to be relying on anthropic, on Google, on OpenAI, and the model is going to output us

01:22.500 --> 01:28.780
in a very special place in the response, the function call, which is going to be a beautiful JSON

01:28.780 --> 01:35.140
with the function name, the function argument, and we or link chain can simply take this JSON can

01:35.140 --> 01:39.860
parse it very, very easily without using any regular expressions because it's JSON.

01:39.860 --> 01:45.780
So we can simply access its fields, and then we can continue with our algorithm of our AI agent.

01:45.780 --> 01:51.780
And the results we're going to get with function calling are going to be much more reliable than using

01:51.820 --> 01:53.220
this react prompt.

01:53.220 --> 01:55.180
And this is what we're going to be demoing.

01:55.220 --> 01:58.180
This is what we're going to be showing in this section.

01:58.180 --> 02:04.140
And actually these days the best practice is to use function calling when building AI agents.
