WEBVTT

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

00:00.800 --> 00:01.520
Ethan here.

00:01.760 --> 00:03.440
Super glad you got so far.

00:03.440 --> 00:07.960
And in this video I want to discuss what we will be building in this section.

00:08.280 --> 00:16.040
And we'll be implementing an advanced complex Rag workflow that is going to yield us much more quality

00:16.040 --> 00:22.320
results than we're used to in regular Rag systems, all by leveraging land graph.

00:22.440 --> 00:28.480
So this project is inspired by the Long Chain and Mistral Cookbook, where they introduced this topic,

00:28.520 --> 00:31.160
and their code is listed in the courses repository.

00:31.160 --> 00:33.640
And they also have a very good YouTube video.

00:33.880 --> 00:39.560
But what I felt lacking in their cookbook is the software engineering perspective.

00:39.760 --> 00:47.720
So what I did is to take their code and change it and refactor it, so it would be more production oriented.

00:47.840 --> 00:54.600
That is, it will be more maintainable, more readable, more testable, and it's easier to extend if

00:54.600 --> 00:56.400
you want to add new functionality.

00:56.560 --> 01:03.400
What I also did is also to gradually build the system from zero, and to show you the software engineering

01:03.400 --> 01:06.320
perspective while building an advanced workflow.

01:07.280 --> 01:11.240
So what is this advanced Rag workflow I keep talking about?

01:11.400 --> 01:17.680
It's based on three papers research papers, Self Rag, Corrective Rag, and Adaptive Rag.

01:17.840 --> 01:23.790
And we'll be covering the gist of those papers further in the videos, but the general idea of those

01:23.790 --> 01:27.550
papers is to add reflection into our workflow.

01:27.670 --> 01:33.630
So we want to reflect on the documents that we retrieve and to see if they are indeed correct for us

01:33.630 --> 01:34.230
or not.

01:34.270 --> 01:38.670
We want to curate those documents and add new information if it's not enough.

01:38.830 --> 01:42.470
After our reflection, we also want to reflect on the answer.

01:42.470 --> 01:48.870
So we want to check if the answer is indeed grounded in the documents, and that the answer indeed answers

01:48.870 --> 01:49.630
the question.

01:49.630 --> 01:52.430
So a lot of reflection is going to be added here.

01:52.950 --> 01:59.950
And also there is a routing element where we're going to route our request to the correct data store

01:59.990 --> 02:02.430
that is going to have the information for our answer.

02:02.790 --> 02:06.070
So that's a very quick overview of what we're going to be implementing.

02:06.670 --> 02:12.870
And all of the code for this section is in a public GitHub repository, which you can reference at any

02:12.910 --> 02:15.110
time when you're watching the videos.

02:15.310 --> 02:20.350
So I've arranged it so each video will match its corresponding branch.

02:20.470 --> 02:26.510
And you can even find the code at the end of each video, which is going to match the code in the repository.

02:27.070 --> 02:31.950
So feel free to check it out and I hope you'll enjoy this section.

02:31.950 --> 02:36.870
And let's start with the first part of implementing the research paper of Corrective Rag.
