WEBVTT

00:00.120 --> 00:05.720
All right, so let me now run everything and let me go and run it in debug mode.

00:08.040 --> 00:09.560
So we got a result.

00:09.600 --> 00:11.640
Let's go and check it so we can see.

00:11.680 --> 00:15.280
Now we extracted from structured response.

00:15.280 --> 00:18.360
This is um this is the key here in the results.

00:18.680 --> 00:21.240
And we have here by the way all the messages.

00:21.240 --> 00:25.320
So we have here all the information of of what happened.

00:25.480 --> 00:27.440
So we can really see the flow here.

00:27.440 --> 00:29.040
So first we send the message.

00:29.320 --> 00:34.120
Then the iMessage returned us with a tool call so we can check it out.

00:34.120 --> 00:38.560
We can have here here in the content box we can have here a tool call.

00:38.720 --> 00:42.960
And here interestingly enough we have three tool calls to be made here.

00:43.200 --> 00:51.280
So we invoked the um search for a bunch of times here three times.

00:51.720 --> 00:55.400
Then we go and we have three tool messages.

00:55.400 --> 00:57.240
So we have three tool results.

00:57.480 --> 01:00.600
And we finally go aggregate everything.

01:00.600 --> 01:05.820
And this is what I returned here, which is going to be the structured response.

01:05.820 --> 01:07.220
So we have here the answer.

01:07.620 --> 01:10.900
So this is going to be a string with all the job postings.

01:11.300 --> 01:14.100
Let me show you the sources here.

01:14.860 --> 01:15.220
Right.

01:15.220 --> 01:17.820
So we can see now those are the sources.

01:17.820 --> 01:19.780
Those are the LinkedIn URLs.

01:19.820 --> 01:22.140
Let me go now and continue the run.

01:22.380 --> 01:24.700
And here we simply printed everything.

01:25.180 --> 01:25.540
All right.

01:25.540 --> 01:27.580
So now let me go to transmit here.

01:27.580 --> 01:29.420
And here we have the search agent.

01:30.340 --> 01:33.460
And here we can see now the flow here of the run.

01:33.620 --> 01:37.500
And notice here that here we have lane graph.

01:37.580 --> 01:42.460
So lane graph here is going to be our engine which is going to be running everything.

01:42.460 --> 01:48.500
So it's going to be replacing the agent executor that that we saw here with lane graph primitives.

01:48.660 --> 01:52.420
And we'll be diving very deep into this later in this course.

01:52.820 --> 01:58.620
And because it's going to be using graph now under the hood, it's going to give us the ability to use

01:58.620 --> 02:05.400
the graph debugger, which I'm going to show you in the next video, let's quickly skim the trace.

02:05.600 --> 02:12.080
Now, in contrast to traces that we've seen before, this trace is actually a line graph trace.

02:12.280 --> 02:15.640
So this means it runs in the graph runtime.

02:15.880 --> 02:24.040
Now I'm not going to dive deep into explain any of the graph components here, because we have enough

02:24.040 --> 02:26.040
room to do it later in this course.

02:26.280 --> 02:30.960
I am just wanting to show you what we've already saw in the previous implementation.

02:30.960 --> 02:33.240
I just want to show you the flow here.

02:33.480 --> 02:40.400
And this is a quick introduction and a quick glimpse into the graph trace and the function calling trace

02:40.440 --> 02:44.480
trace which we're going to elaborate on this course in later sections.

02:44.840 --> 02:47.600
So the first call was to open AI.

02:47.960 --> 02:50.280
And notice here we have two tools.

02:50.320 --> 02:52.240
The first tool is the search.

02:52.400 --> 02:56.200
And the second tool is the agent response schema.

02:56.720 --> 03:04.220
So we can see here that the model selected with function calling the tool to be executed to be, to

03:04.220 --> 03:04.940
really search.

03:05.380 --> 03:10.140
And we can see that the output was a bunch of search queries.

03:10.140 --> 03:13.380
So we can see that it wanted to invoke the search.

03:13.540 --> 03:16.380
And it had a bunch of different queries.

03:16.580 --> 03:23.900
The models to tool step here is simply land graph orchestration here, where land Graph now is going

03:23.900 --> 03:32.180
to take every search query and it's going to send it to execute in land graph into different nodes.

03:32.180 --> 03:33.740
Those are primitives in land graphs.

03:33.740 --> 03:36.900
And we're going to be covering that later in this course here.

03:37.180 --> 03:41.740
At this point of the course, I'm not expecting you to know exactly what's happening here.

03:41.740 --> 03:43.940
In each step here of the trace.

03:44.100 --> 03:47.180
You are going to know that later in this course.

03:47.780 --> 03:52.300
Anyways, now we can see that we have here three invocations of the tools.

03:52.540 --> 03:55.820
So those are invocations that are going to run in parallel.

03:56.060 --> 03:59.340
And each one is going to run a different query into villi.

03:59.820 --> 04:06.520
And lastly we have the final call to the model after we have the two results, and the model is going

04:06.520 --> 04:10.960
to decide that it has enough information and it can output us an answer.

04:11.200 --> 04:16.280
And that answer is going to be an agent response object.

04:16.400 --> 04:19.320
So we're going to see that.

04:19.320 --> 04:21.680
Now this is being called as a tool.

04:21.680 --> 04:25.120
And don't worry I will be explaining how everything here is working.

04:25.400 --> 04:32.680
But the tldr of it is that the final response that we're going to be getting is the same agent response

04:32.680 --> 04:39.560
that we got from earlier, but this time it's going to be using function calling under the hood to call

04:39.560 --> 04:46.560
the tool, and also to format us the output as the agent response object.

04:46.720 --> 04:47.160
All right.

04:47.160 --> 04:52.000
So the answer here is going to be here under the structured response here.

04:52.240 --> 04:58.960
And this is going to be an object of agent response that we defined earlier in here popping out.

04:58.960 --> 05:02.080
And I know I'm being pretty vague here in this trace.

05:02.080 --> 05:05.020
And we're not going over it fully.

05:05.020 --> 05:08.460
So we're not going over into every part of this race.

05:08.580 --> 05:15.340
And this is simply because at this point of this course, I think it would be a bit overwhelming introducing

05:15.340 --> 05:17.540
a bunch of landgraaf primitives.

05:17.540 --> 05:23.700
We have plenty of time to learn about landgraaf and diving deep into landgraaf, but before we do that,

05:23.700 --> 05:28.780
we really need to understand how the react algorithm is working underneath the hood.

05:28.780 --> 05:31.940
And this is what we're going to be doing in future sections.

05:31.940 --> 05:38.300
After that, we'll be reviewing function calling, and then it would be the correct time to go and move

05:38.300 --> 05:39.660
into Landgraaf.

05:39.740 --> 05:42.620
So we have a bit of a way to go through here.

05:42.780 --> 05:44.900
And trust me, I know what I'm doing here.

05:44.900 --> 05:52.820
So if you want, you can maybe put a bookmark here on this video and on this trace specifically.

05:53.060 --> 05:58.940
And I promise you that in a couple of sections you will be able to fully read it and understand every

05:58.940 --> 06:00.580
part that's going on here.

06:01.140 --> 06:05.660
So I will be publishing this trace and sharing it in the videos.

06:05.660 --> 06:06.340
Resources.
