22. Understanding Goldens Datasets
Explains goldens as ground-truth datasets containing queries, expected answers, and expected context, and who writes them.
So, let's go to the demo.Here, if I go and here if we understand it one by one now.So, what we have inside this knowledge base?Inside this knowledge base I've already explained you that uh firstly, we have the knowledge base of the data which is going to insert or ingest inside the vector store.So, this you understand.This is just the documentation which we are going to uh ingest inside the rag pipeline.Now, here we have goldens.So, what is actually goldens?Let me explain you that with the uh example, okay?So, goldens you can understand is the basis on the base uh on the thing which you are going to evaluate.What do we mean by basis?It is the truth, okay?So, let's take an example of rag itself, right?So, here uh when I am going to basically run this particular run this particular example.
So, I asked what is attention?And it just gave a result, okay?But someone has to define that what is the right result for this particular query.Okay?So, it can be defined by industry experts, okay?For example, your product is present uh is uh is based on some medical use case.So, this particular right answers uh for the particular questions are going to be given by industry leaders, okay?Industry experts.Because they will know in the depth.You as a developer would not know, okay?But in that that case will be expensive.Why it will be expensive?Because experts' times is not cheap, right?Will they will they give you time easily?Guys, tell me.If some uh person is there who is very deep inside health care, will they give you time uh their time in a very cheap and easy manner?Or you have to adjust the time, you have to schedule all these things.
Are you agreeing with me till this?Right?Right or wrong, guys?Tell me.Right?So, the best thing So, the best thing is that you generate these goldens with the help of the industry experts on the use case which you are targeting on, right?But that is not feasible every time, right?So, what you will do?You will use the combination.How the combination will work?The combination will work in this way that Okay?Firstly, you have some particular questions, okay?Particular questions.So, what a golden will consist of?So, let me write it here.So, a golden what it will consist of?Firstly, it will consist of the queries.Okay, queries.What is queries?Queries is the different type of queries which can be asked by the end users, okay?This is like that.So, I will make it a big.So, queries are there.
After that, what it will going to consist?It will going to consist the truth.Truth what is truth?The expected answer.Okay?Expected answer.So, what who will write these queries and expected answer, guys?Tell me.Quickly.Who will write this?Queries and expected answer?Inside the goldens?
Okay, industry experts, correct.Industry experts, okay?But there is a catch, okay?I have told you that industry experts can't every time give you time, right?So, you have to use their time very carefully.So, how will you do that?I will explain that.So, in in golden, just imagine golden as a data set.Inside that, firstly we have queries.The queries are the queries which going to cover all the different dimensions of your rag chatbot, okay?So, that you are going to take.Then you are going to write the expected answer.So, here in the case, what is attention?So, there is a particular actual output which is coming.But expected answer we have to write, okay?Then, what we can what we can write it here?Anything else which you can tell?Inside rag, what do what other information do we have?Tell me, guys.
Correct.We have context, right?So, see the in the context we are going to say that, okay, this is the expected context, okay, that I'm going to answer.So, what is this expected answer will tell me?Expected context will tell me.Or I can also say chunks, okay?Or I can also say sources.So, these are the things.So, what I'm telling here?What I'm telling here for the particular query?So, this particular query, let's take example, what is attention?So, I stored it here inside the query.Then, in the expected answer, I am going to write the true answer which I'm going to say that, okay, this is the perfect answer.Then, in after that I'm going to say for constituting this particular answer, the rag pipeline should give this particular expected things about the It can be context, it can be the chunks, it can be the like sources, other
things also, right?So, this is up to you as a developer.But, you are getting the point of goldens, right?Goldens is the main raw data which we can use to validate our application for the different use cases.This is very similar to some machine learning machine learning algorithm.For example, you are training some XGBoost, okay, and some other machine learning algorithms which are there.Okay, so there what we do?We have some training data, okay, that is going to use for training that.But, we have to validate that, right?So, there we have validation data also.So, that is very similar to this.Validation data, what it will help?It will help us It will help us to see whether our algorithm which is going to train, our model which is going to which is trained, is it good or not?Is it uh responding according to uh the proper expectation or not, right?
Correct.So, yeah, whoever is not understanding, just note down the points which you are not understanding.You can ask me the doubt session in the last, okay?Uh I'm going to explain you that, okay?So, yeah.So, this was about goldens, guys.So, if you see here, now, inside our particular thing, if you go inside the golden, what things do I have here?So, you can see what is the Technic's return policy.So, this is kind of the query, right?Then, I have this particular uh reference.So, what is this reference?Reference is the uh expected answer, okay?Expected answer.Then, here we don't have the expected context, okay?Expected context.But, we can add that.Then, I have also given a information here, metrics focus.So, I am writing it explicitly that this particular uh query this particular golden will help us to uh evaluate this particular metrics, faithfulness.
So, I'm going to explain you what is faithfulness.Just currently we are understanding goldens.So, this this is how you will understand.So, here, for the sake of simplicity, I have kept only five goldens.And this five goldens will going to help us to evaluate our application from all sides.And what is our application?Our application is a simple rack.Okay?So, you got the point of goldens, guys?Goldens is nothing, just a simple data set which contains this information.And this information can be uh I have told you one way only that the humans can write it.Who are the humans?The experts, okay?But, there is another way of doing that also.So, I will explain that in the next, okay?Just uh tell me, is this particular golden thing is clear to you?Golden word is now clear to you why we are using it inside the evaluation?
Quick, yes or no, guys?Okay.Okay.Nice.
Yeah.Correct.Correct.Okay.Good.Good.So, uh many people are asking about the recording.So, see guys, this session is for the serious learners only.So, this uh the recordings will be not provided.This is a live only session.So, you are going to learn only here itself.So, be fully attentive and understand, right?Whatever you are not understanding, so you are just going to uh you can ask me inside the uh doubt clearing session.The doubt clearing session is going to start when we end this session.Means, I will say that, "Okay, the I will not uh tell any new things.You can raise your hands and then uh we can start the doubt session, right?"So, there you can understand.Okay?So, yeah.Okay.Okay.So, see guys, this was about the golden.And many people uh like asking me about the code of it.
So, you this basically is uh running on some Streamlit app cloud, okay?So, you can just go on on the GitHub.I will share the link also.So, if I click on this GitHub, so this project basically is uh uh uh developed by the Divesh.Divesh is another amazing mentor.Uh so, he has uh helped me in creating that.So, here you can access this uh code.Okay?So, this code is basically running this particular thing inside the Streamlit cloud.So, that is there.Okay?So, yeah.And okay, many people are also asking to understand it.So, see guys, here in this class we are going to get the overview, but you are going to if you want to understand these things in a deeper manner, all these things, right?So, what you can do is uh you can check this amazing website, uh this krishnak.in website.
Here like we have uh like given all these things in a very proper manner.So, what the things are useful for you guys is you can just go to the road map site.This is very amazing, as you can see.So, the road maps many people are also asking about the road maps.So, this road map is actually set up by Krish sir itself.Okay?So, you can see and you can understand where you are standing and what the next uh things you you take.So, yeah, you can always visit this website to get proper references for your resources of learning related to AI.So, let me quickly share this link with you also.Okay?Yeah.And one more bonus bonus for you guys that currently there there is like on 7th June basically we are going to have the second anniversary of Krish Naik Academy.
So, for that we are we are running the proper discount for all the courses which are there.Okay?So, you can use this particular code.Okay?And you can get the 15% discount.I have shared you in the chat.Okay?So, let's get started with the learning itself.Yeah.So, goldens are basically done.You are clear about the goldens.Don't worry about GitHub link.Okay, let me share that GitHub link also.There's no issue.Yeah.You can check that GitHub link.Okay.So, GitHub link of that particular demo which we are referring to for understanding.So, goldens are clear guys?Yes or no?Final?Whoever has doubt we can understand in the doubt clearing session.Just note down the particular doubts.Okay?So, yeah.
24. LLM as Judge and Cooldowns
Introduces using a state-of-the-art LLM as judge, explains why one metric per call, and how sample and experiment cooldowns avoid rate limits.
LLM as a judge will come.So, what will the what will happen, guys?Just imagine LLM is here, okay?Now, which LLM we are going to use it here?We are going to use a very good model, right?We are going to use a SOTA model.SOTA model, what do you mean by SOTA model?SOTA model I mean by state-of-the-art model.Okay.What are the example of some state-of-the-art models right now?Can anyone tell?
Quickly, guys.The big model which are there, correct.GPT, okay, Opus.Right?So, that are there, right?So, correct.So, these are the models.So, we are going to consume them.We are going to use them for this evaluation.So, this is a best case.This is a best case, right?But also you can use some like your evaluation is very simple, right?So, you don't need a LLM there.You can maybe use some embedding comparison, right?So, you can use a embedding model to generate the embeddings of both the actual answer and expected answer.You can compare that, right?But that will not be give you a proper good evaluations if your queries are complex.The best answer will come by your LLMs, by your LLMs.But there is a catch.LLMs are expensive and the sort of models are very, very expensive, okay?
But they they are less expensive than the human expert.Are you agreeing with me or not?Correct?So, that is kind of the case which you are going to prefer that, right?But for optimization of your rack evaluation pipeline, you can move towards embedding.You can see that, okay, for this comparison, I can use embed a simple embedding comparison semantic search, okay?So, all that things, right?So, there I have given you an idea.Whoever that information, they can imagine that.But for now, let's forget about this embedding thing.Let's focus that, okay, we are just using LLMs.LLMs is what in simple terms is just an simple intelligence, simple brain, human brain which is there.So, who can understand that okay, who can take this expected answer, who can take this particular query, and who can tell that, okay, this particular actual answer is near to this or not.
Right?But isn't this is like isn't you like think that there is lack of a structure here?There is lack of a structure that, okay, uh for the for checking the uh answer relevancy, okay?For checking that the answers are relevant or not, we have to uh take some information.For checking the context, we have to take some information.We have to leave some information.We have to compare that.We have to tell this it again and again, right?Are you are you understanding that what I'm saying?Yes or no, guys?Correct?So, there is a lack of a structure here.Right?So, we need to define a structure that, okay, for particular checking that, okay, if the answer is relevant or not, we will do this particular things.So, for that for that we have all these metrics.We have all these metrics.Okay?
So, I will understand I explain you all these things one by one.I will properly explain you in a simple manner.So, this is basically the structure that okay, answer relevancy to check whether the answer which is coming by our rag pipeline, okay, by our rag pipeline, it is it is relevant to the particular query or not.So, here we have properly defined uh flows that okay, we have to compare these things in this manner, right?So, isn't this thing will do your job easier as a developer of your of the rag pipelines?Tell me, guys.Yes or no?Isn't this will be a good good thing to have?Right?Otherwise, if these things are not there, you have to again and again think that okay, what things are required, all these things.So, we need these things kind of information information.We need this kind kind of metrics, all these things.
And who will give that?Who will give that?This will be given by the frameworks which are there for the evaluation.I have told you, right?In the start of the session that we have Ragas, we have Deep Evals, right?So, Ragas actually for this particular class, I am going to take reference of the Ragas metrics.So, I'm also going to tell you that here.So, here you can see the metrics which is coming here.Context recall.What is context recall?I will explain you, but you can see this context recall, where it is defined?I have not defined that.It is actually defined inside this Ragas framework that okay, this context recall is this thing, the formula is this, how can you implement that, all these things are there, right?So, that is there.So, I will also share this link with you.
Yeah.So, this particular frameworks basically they have two types of things.If you want to use them directly from the hosted version, for example, Ragas also have some hosted version you which you can use directly.So, you don't have to run their libraries in local manner.So, there you will find it paid.Okay, there you will find paid version.But, for your local developments all these things you can install this Ragas libraries inside your projects and you can use them.So, that is that.Same for the DB ones.Right?So, this is the thing.So, yeah.So, these things are there, right?So, these particular metrics are there.Now, see guys, these particular metrics are actually already implemented inside this project which I've tell you, right?So, here we are in the phase two.We have Ragas metrics.Okay, Ragas metric is scoring.So, here you can see two three things are there.
Let me explain you one by one.Okay?So, judge model are there.So, what is this judge model?Can anyone tell?
Correct.This is the LLM basically which we are using as a judge.Okay?So, LLMs has different different types of LLMs are there, right?So, if I go towards the Grok itself from where I'm basically using the LLM model.Okay?From where I'm using the LLM model.So, you can see if I go that.So, here you can see there are multiple types of LLM model which are available.So, I'm going to use this one.Okay?Llama 3.1.So, it is not using.See, Llama 3.1 8 billion instance, right?So, this one I'm going to use as a judge.You can use another one also.Right?So, this is there.Now, you can see some sample cool downs and experiment cool downs are there.So, why I am keep there, right?Because see guys, evaluation is a extensive exhaustive process for the uh basically API calls and all these things.
Why?Let me give you an uh feel of that.So, imagine you have uh imagine what what to imagine?We have this five particular goldens are there, right?Golden one, golden two, golden three.All these goldens are there.Means five queries which we have.What is this queries?I've already explained you.These queries are basically the uh this thing which is present inside the goldens.After that, what we are going to do?We are going to then run this particular golden for inside our rag pipeline.After that, we are going to get this particular uh actual answer and retrieve context.Then, what we are going to do, we are going to get all this information plus this information and we are going to give it to LLM.Okay.Now, this LLM will have to give us some metrics.This I've told you, but imagine the job the LLM has to do one by one.
This particular LLM has five metrics here.Uh you can see what are these metrics I will tell you, but see here queries how many queries do we have?Tell me, guys.Quickly give me the number.How many we are considering?Correct, five we have.So, this is the five five queries are here.So, for each query, right?For each query, first for first query, this will go to the LLM plus this uh the information related to this queries will go to the LLM.For every metrics, we are going to run each LLM call.Okay.So, for each query, how many LLM call will be there?Five.Is it clear?Why it will be five?
Yes or no, guys?Is it clear why it will be five?Right.Because because we have to we have to calculate the metrics, okay, using one LLM call.So, let's let's take an example that what is the return policy.Okay, that is one thing which is there inside your Uh so, let's me take like this.So, let me take the screenshot of this.Here, if I go here, if I write it like this, so see we have five queries here.Now, what will happen?Firstly, for this particular query, this this things, okay, this golden data set, all these things we are going to which are going to go inside the LLM.Then, the answer relevancy for answer relevancy metrics, this information will go and LLM will give results.Similarly, for this particular golden, we are going to calculate the contest vision.This is another LLM call.
For this particular golden, we are going to get the contest recall for another LLM call.So, for each query, for each golden, we have five particular LLM call.So, for five goldens, uh for calculating five metrics for each five goldens, how many calls do we have?We have 25 LLM calls.Right?And imagine if we hit all these calls at once to the Grok in a free time, what will happen?Tell me, guys, what will happen?
It will going to give rate limits, right?It will going to hit us rate limits.Okay, someone is saying, "Why not a single LLM Why not to give it in a single uh call?"Okay.Why not to do it in a single LLM call?So, that is not efficient, guys, right?That is not efficient because if you understand the working of LLM, it will work best because see, guys, how complex these evaluations are, how uh scoring and all these things.If you do it all at once inside one call, it will not going to give us that accurate results, right?Because see, LLMs, now LLMs have one habit, which is very similar to humans.Imagine the situation if I have given you lots of context to handle.I have given you 10 projects to handle.Will you handle it well?Will you handle it well?
Tell me, guys, yes or no?No, why?Because your context window is full.You have some capacity to handle, some information capacity to handle, right?If you have only one to two project to handle, one to two things to take care of, you will take care of it better, right?Or you will take care of it better when you have 10 things in your mind?Tell me.In which case you will find it better?When you have one to two things, right?Similarly, for the case of LLMs, guys, LLMs perform Imagine this is the context context window, right?LLMs usually perform best during these ranges, okay?When they have 20% of their contest window full.And here here our LLM is going to judge our application.Okay, judge our application.So, this is a very crucial thing to do.So, we don't want this judge to be hallucinated.
Right?Imagine you're you're going to the court, okay, and the judge is already hallucinated.It's biased to one side and it's not giving proper responses.How uh bad that is, right?For the judiciary system, right?So, similarly here also, you want this LLM to perform in a best manner.So, that's why we can't feed every information at once inside the contest window.Are you agreeing with me till this or not, guys?Right?So, for that we need that our LLM contest window is on a emptier side so that it can think it properly.It can It can tell it properly, right?So, that's why That's why we are going to do it call wise.Okay, per call wise.So, what is happening?This for each golden for each golden, we are going to have five LLM call.What are these LLM call associated to for each metrics, okay?
We have five goldens, so we will have 25 LLM calls.And if you push 25 LLM calls at once to any server which is there in the production.Okay, in the Grok also.What will happen?Tell me, guys.What will we face?Quickly.We'll face rate limit, correct?So, for escaping this rate limit again and again, we are going to define some cool down that okay, sample cool down.What is the sample cool down?25 seconds, okay?Then experiment cool down.So, after each sample for your like metrics calculation, we have this like we have we will wait for 25 seconds.And for after each experiment, after each golden, we are wait 35 seconds.So, this is basically kind of configurable by the GitHub repo itself, right?So, this is there.Yes.So, it is kind of a simple sleep call.So, we are saying that okay, now pause for 25 seconds.
Let the system cool down.Okay, let the API limits raise to its normal level.Then we are going to give the call.Right?So, this is this is why I have done that.So, similarly, when you are going to implement evaluation pipeline inside your projects now, you have to do it.You have to add some cool downs, all these things.Otherwise, you will face issues, a lot of issues.Right?You are clear, guys?Why we have put down this cool down numbers, all these things?
25. Faithfulness Metric Explained
Deep dive into faithfulness: extracting atomic claims from LLM responses and checking if they are grounded in retrieved context, with scoring formula.
This judge is also clear?Right?So, yeah.So, till now till now what we have understood, we have understood that okay, what are goldens, why it is required, why the actual answers are required for evaluation, all these things, right?Then we have also understood this one.Okay?Now, what we are going to do, we are going to run the evaluation now.Okay.So, this here I am going to run this particular thing.What this particular button will do, let me zoom in a bit.What it says, guys?This is basically running the phase two.What will happen is that the running phase two, the same thing.That each golden for each golden are five particular metrics will going to get calculated, okay?And then we are going to get get the result.Now, will it be a quick process, guys, or will it take time?
It will take time, right?When you do a simple query to an LLM, it will take some substantial amount of time like milliseconds and all, right?So, this is a huge amount of LLM calls.This is a huge amount of data also.So, this will going to take time.So, what we are going to do, we are going to do parallelization here, right?As a good developer.Okay, okay, we are going to do a sync a sync flow here.So, what we are going to do, I am going to run this particular pipeline, okay?And you can you will see one one one by one each of the matrices going to calculate and parallel we are going to understand them.Right?So, is it good where to understand?Yes or no, guys?Tell me.Okay.So, firstly, what it is calculating?It is calculating faithfulness.
Okay?So, faithfulness, what is faithfulness?Let's understand that with the help of this example.Right?So, basically, what is a gist of faithfulness?Faithfulness is just telling that the answer, okay, which is given by the LLM, the answer which is given by the LLM at the end of the rag pipeline, was it faithful to the context or not?Means, was it based on the context or not which is given by the rag.So, here if you understand it by this particular graphic, okay, you can understand it in a very easy manner.Right?Correct.So, is the particular information, okay, which is given by the LLM at the last, was it based on the context or not?Okay?So, if the context were factually correct, then the information which is given by the LLM will be factually correct.So, it is basically we are checking if the particular response coming from the LLM, is it based on the relevant retrieved chunks or not?
So, you can see here is a very clear example.Yeah.So, you can see chunk one is there.What is there in the chunk one?Uh so, some query were there.Okay?Some query related to some minimum balance, all these things.You can imagine.So, just question was this.You can understand.Can this claim be fully inferred?So, this is the just question.What is this?So, we are doing for a particular query.So, for that particular query or that particular golden, we are going to get the particular chunks.Here, from where we are getting that?Quickly answer me, guys.From where we are getting this chunk?Tell me quickly.Knowledge base, correct?So, we are going to get that from the knowledge base.After getting this chunk, we are also getting this knowledge, LLM response.So, all these things to two things we have, right?
Here.So, I have already told you we have this particular retrieve chunks, okay, and we have the particular actual answer also.So, you can see both the things are here inside the faithfulness.Right?Now, here you can clearly see we are the what is happening inside this particular matrix, we are going to this particular judge.What is a judge?Judge is a LLM.Judge is asking a question.Can this claim be fully inferred from the retrieved context?Okay, this is just a simple question from the judge, who is a LLM.Then, what will happen inside the processing of the LLM?The LLM will define atomic claims from this particular answer which is given by the LLM.So, firstly we are going to see that minimum balance is 10,000 for urban branches.So, is it coming?Is it based on the chunks?So, if you read the chunks also, it is grounded.
Similarly for this.But, for this thing LLM has said that, okay, you can also transfer funds online at no extra cost.This particular information is not there inside the chunk.So, this particular claim which is there inside the LLM, it is hallucinated.It is hallucinated.Similarly, here in the fourth claim, this is based on the chunk.So, here how many claims were there, guys?Four claims were there.How many were grounded?Two were grounded.And how many were not grounded?One were not.So, what we are going to say that, okay, three were grounded out of four, and one were not grounded.So, we are going to say that the score is 0.75.And, for example, the threshold which you have kept for the passing of the evaluation, we have kept it 80, 0.8.So, in this case it will face fail.But, if the threshold is less, it will pass.
Okay, if it less than 0.75.So, this is how the particular faithfulness is calculated.Right?So, this is how the particular things are arranged by the rack RAGs framework.Okay, the main thing which is done it will be done by the LLM as a judge or the LLM which we are using as a judge, right?So, that is a thing.So, is faithfulness clear, guys?Yes or no?Tell me.Yeah, so someone is asking who will set the threshold?Yeah, so you will you will set as a developer by seeing that how much extent you want to get the output at a correctness level, right?So, that is kind of a hyper parameter that you can do it off.Okay, so for for this calculation, guys, for this matrix calculation, we need all this information, right?We are going to perform this calculation based on the information that we have already have, this golden right?
This rack pipeline actual generated answers.
Yeah, so atomic claims someone is asking the judge question is yes or no.The judge question is yes or no, but how are atomic claim judged?Okay, so this is basically written inside the system prompt of the evaluate like this particular matrix.So, when you give this particular matrix to be judged by an LLM, it will going to do it in that way.So, if you go inside here, inside the ragas now, you will see every like you will use the particular models all these things from the ragas and you will see the particular uh responses are there in that way.So, that system prompt is handling actually.Right?So, yeah.I guess that is good.So, let's check with our application.So, you can see we got the faithfulness.Okay, the score of faithfulness is how much?0.97.So, that is good.Another matrix are calculating.
Calculating.So, faithfulness is there.So, we have also calculated that and you are already understood that, right?So, that is there.So, is this faithfulness clear to you, guys?Should I move ahead?Or should I repeat the explanation?Give me repeat or move ahead.Give me these keywords in the chat.Quickly.
Yeah.Okay.So, correct.So, many are saying move ahead and some are saying repeat.So, whoever not got the idea, now you can like okay, I will repeat it in a brief.No worries.So, what we are basically doing inside the faithfulness, guys?We are just checking if our LLM response which is coming from the particular rag pipeline, is it based on the context which is given by the vector store or not, which is given by the semantic search of thequery or not from the vector store.So, we are just checking that inside this faithfulness.So, it will help us when when it will help us?It will help us to check the hallucinations of your LLM model.Okay.So, in that cases it will be useful.How it will do?It will just firstly get the chunk, okay, retrieve chunk, get the LLM response.
It will find out the atomic like atomic claims from the LLM response.Then it will validate that for this particular claims if there any uh uh particular chunks are present or not.If it is yes, then it is grounded.This particular claim is grounded.If it is not, then it is hallucinated.Based on that, we have a formula, very very simple formula.I'm going to say that, okay, how many are grounded out of the total.So, I'm going to say three are grounded in this particular case.So, I'm just going to say three divided by four and I'm going to get the particular result.Right, guys?So, is this clear now?Is this clear why we are using that all these things?Okay.Cool.Now, see what is the next matrix which is which is calculated?So, if you go here, now if you go here inside the result, so you can see it is generating still.
So, let's give it a give it some time.So, here you will see proper observability of the data which is generated during the evaluation.So, we are going to see that also.So, understand each matrix carefully, then we are going to see that also, right?So, isn't this session going interesting, guys?You are going to You are going to see You are seeing the live things working also, and you are understanding it, right?Okay.Great.Great.Nice.Nice.Nice.Yeah.Correct.
30. Evaluation Results and DIY Setup
Reviews per-golden results and detailed metrics, then shows how to get Gemini and Groq API keys to run the evaluation app yourself.
Now, what is the uh next thing we should do?So, see guys, now, are you excited to see the complete uh observability of the evaluation which we have done?Right?Are you excited, guys?This tab which contains all the results, all the calculation which is done by uh LLM as a judge, all these things.Quickly, yes or no, guys?
Okay, cool.But, before that, before that, tell me the metrics which we have studied till now.
Okay, I'm sorry, I will speak slowly.Okay.Yeah.So, tell me, just name that.What what metrics we have studied?Name that.Yeah, answer correctness, correct.Other one?Give me, guys.I will write it here.You tell me, I will write it.Okay, so let me open my notes.Yeah?So, here I will say, okay, context precision is come.Faithfulness is there.
Okay?Then what we have?Answer relevancy is there.Okay?Then, context recall, correct.
How many are done, guys?One more remaining, which one?
Context recall is done.Answer correctness, correct.Correct.So, this many metrics you have understood, guys.This many metrics you have understood till now.Right?So, you can always go towards this particular documentations which I have shared with you, this Ragas, and you can also see how many uh like things are there, right?So, how many metrics are there, all these things, right?Ragas metrics.So, you can go and see about it.So, six I have explained you which are important and not explained you I will also tell you to how to run it, right?So, now one bonus thing I will give you, two bonuses actually.Firstly, you can also add your API key inside this application and you can run it yourself.So, that is a main thing.So, here uh you guys also can test it.So, this app you can also use.
Just that you have to add this Groq API key here and the Gemini API key.And then also you can do all these things by your end also.So, it's kind of a do-it-yourself also.Right?Then the bonus thing is See, guys, I am also going to give you uh another uh what I will say, Streamlit project, another GitHub repository where we have implemented guardrails with the rag, okay?And running instance of that with the GitHub repository.So, firstly, we understand the results.Let's look uh through the results.Then after that, we are going to I'm going to give you that link.Okay, guys.Is it good?Till now we are good?Yes or no?Quickly.
Okay.Cool.Yeah.So, now let's quickly see the results.So, if I go towards the result tab here you can see per golden score is there.Per golden score what is there?So, you can see for golden one, what was the faithfulness score?So, golden one was this thing, okay?So, metrics focus this means this particular golden what which was the golden one?If you can see.
Uh this was the first golden.What is a Tech Nest return policy?So, for this particular golden, this particular golden was there to check the faithfulness metrics.So, inside this faithfulness metrics our result is a bit less.It's 0.86.But answer relevancy is good there.Context precision is good, right?So, I can also zoom out a bit so you can see.The text is visible, guys, right?Yes or no?
Okay.So, you can see for this thing, you can see that is there.So, all these particular goldens, we have this summarized result here.So, you can clearly see where we are lacking.Can anyone tell me for which golden we are lacking and for which aspect we are lacking?Tell me.See how proper results are there.Previously when I show show you the first demo, the raw rag demo, there was not at all proper evaluation thing are there that okay, where this application is lacking.But if you have this kind of results in front of you, you have clear goal that okay, I have to work here in our in my application, in my rag pipe and all these things, right?So, that is the case.Right?So, this is the result.Then we have per golden detailed result per golden detailed result.So, for golden one, what was there?
So, see faithfulness, all these things which are coming from here, the rag response from here, the retrieved chunks are here properly given, the reference, the ground truth for this particular golden query is here.Right?Then the particular chunks.So, see all these things are present here.And then also you can uh download it inside a JSON format.Isn't it good, guys?Isn't it a complete thing from zero to start?
Right?So, this same thing you can also do it on your end.Okay, so you just have to add this Grok API key here and the particular models.Okay, the judge Grok, this is optional.So, why I have kept this judge Grok here?Because see, I've already explained you the API calls are exhaustively used during evaluation.So, for judging we need another LLM.Okay, so you can give another API key, parallel API key.Then this Gemini API key.So, we are using the inside the as a LLM we are using Gemini.Okay, so because why we are using that?Because uh we it is not a good practice to judge the use the LLM as a judge and the generator LLM as a generator from the same provider.Okay, so use different provider itself because there is a slight bias that will come in the picture.
Okay?So, that is there.So, yeah, you can try with this link.One more time I will share with you all guys.Okay?And then you can try it with that.So, should I tell you how to get this API key?Tell me yes or no.I I can show you that also.Okay.Many are saying no, many are saying yes.Okay, yes are good.Okay, okay, yes are more.Okay, okay, let's go.So, see, what you need to do is you need to go to your browser and for your Gemini Gemini what you need to do, you just need to write Gemini API key.Okay?And then here you can go to this first link, get your Gemini API key.I will say get started.Here you will go to this get API key on this thing.After that, see how many API keys do I have?
So, here you can just create a new API key.You can just name your API key.I will say live class.Live class.Okay, and then you just say Gemini API or whichever project.Okay, so I will say Gemini API and I will create the key.So, it is going to create the API key for that.Right?So, you can see my API is created.I can copy the key.So, now what you will do?You will just copy this key.You will go to the Streamlit application and you will just paste it here and you will press enter.Right?Now, how to do it for Groq?So, here again, I will go here.I will say Groq.Okay, so you just need to write Groq here inside the Google.So, you will go to this groq.com.So, let me share the link also.Okay, here you need to go to the start building.
I am already logged in actually.So, but you need to log in with Google or any your ID.Then, you can go to this particular draw red room or maybe uh your API key directly.You can create a new API key.Just name it, set some expiration and you are good, okay?And you will get the API key and you can paste it here and you are good to go.The same thing you need to do, right?So, yeah guys.So, this was all about the evaluation pipeline, that how actually what is evaluations, why it is important, all these things, right?And uh how it will help you to build confidence.So, does it does it has given you clarity about the evaluations guys?Will you use it inside your projects?Will you uh like use it?Will you suggest it, right?Inside your teams and all.
Correct.Because what is the thing is uh the evaluations, all these things, these are this will give confidence to you that okay, my application will serve well to all the users which are there.
Yeah.Okay, guys.So, yeah.This was uh all about it.Whoever has doubts and all these things, uh you can raise your hands.We will go move towards the doubt session now.But, before that, uh I have like let's take a uh 10 minutes of break and then we are going to move towards that.So, what I will do I will just go here.I will just write timer here.Okay.And I will say timer.10 minutes.And then I'm going to start it.So, this is there.After 10 minutes, I will see you guys.Okay.So, whoever has doubts, they can stay and other people can leave basically.So, yeah, I will not teach any new concepts here.So, someone is saying can you share me the ASCII diagram?So, uh Yeah, I can share that.Okay.So, you just go and you can look at the downside, okay?
This is the information which is there which you can use.So, I will just press share here.
Yeah.So, you can see this particular ASCII diagram, guys.
And that wraps up our look at evals.
31. Agentic Memory Introduction and Roadmap
Introduces agentic memory as a vast topic, outlines the memory lineage from buffer to temporal memory, and previews a GCP production project.
Now that we know how to measure model performance, let's pivot to agentic memory techniques.We will break down core memory frameworks, see how agents store and retrieve contextual data, and automate memory management for production.Let's get started.
Uh there are two data sources we are working on.We are working on two uh freely available open They're not freely available.Open source government databases by the US.One is the clinical trials.gov API and the other is PubMed.Okay.These are the two government databases which contain some really high-quality interesting uh research knowledge, okay?Uh clinicaltrials.gov contain half a million research studies.That is huge.This is published research studies by big organizations.And the other is PubMed which contains research papers.So, one is clinical trial study and the other is research papers.We're going to take this dump, okay, which is roughly we're going to deal with half a million clinical trials.This is where I say when we when we say production grade production grade, we also need to keep in mind the scale that we are talking about, yeah?We're going to then pull this into the injection layer.
We're going to have typically three files, which I'm going to work with injection, okay?Once the files are ingested, okay, they are taken care by the GCP storage layer.On the storage layer, I am I am I have personal I I have used cloud storage, Google cloud storage, okay, which includes my, you know, parsed data, processed data, all of that.Along with that, I'm using cloud SQL.Now, cloud SQL is a relational database management system, but it also couples up as a vector database available on the GCP, okay?And that is what makes it even cool, yes?Along with that, the next part is the processing layer.Now, processing layer I'm not going to go in here.This is the, you know, the basic chunking embedding kind of process.Let's not get there.But, what makes it even cooler is the memory part, okay?We'll be using LangMem here.
And in fact, I decided to incorporate all the three memories for different different use cases.When you actually follow this project, you will get a hang as to why are we following episodic memory, why we are following procedural memory, why are we following semantic memory as well.We are following or we are we are building or designing the episodic memory for the past sessions, okay?Whatever, for example, let's say if I am personally looking out for a research study or a clinical trial based on type 2 diabetes mellitus 2, or I am looking for a specific research study which suggests that vitamin youknow, absorption of vitamin D3 increases the immunity power, okay?Or vitamin E is not actually that great for keratin, etc.etc.Very niche use cases I can find that.Next is procedural memory, the third is semantic memory, the three types of memories which we're going to discuss today as well.
Next we have the sub-agentic architecture.We have multi-agents running in parallel.We have roughly six agents that are running in parallel and the seventh agent which is kind of an orchestrator.Okay?Along with that we have an incorporation of human in the loop.Now, when you're do in incorporating human in the loop, we're not just going to do a standard human in the loop, rather, okay, we're going to have confidence interval lined up for this.Okay?So, this confidence level signals and bases the confidence level signals,
uh human in the loop is taken into the action.And then there's also something called as learning loop which goes and then kind of, you know, reflects back on uh the agents.Along with that we have the standard back-end part.Along with that we have a big observation or an observability layer.Okay?Uh where I'll be using the secret manager, which is a standard service.Okay?And the GCP cloud logging and LangSmith.Now guys, you know, this is the kind of project that is going to come next.Okay?And this is what we're talking about.Okay?It's cool.It's very cool to work with.The so we this project is going to be built using software engineering practices.This project is will be following all the standard tendencies which is um you know, your concurrency, all of that.Okay?This project in fact is built uh you know, keeping that in mind.
Let's say tomorrow if we are scaling this to 100 and thousands of users, uh how how will it how will it turn out to be?Okay?So, let me know if you guys want this project next to next week.I'll be more than happy to discuss this.I'm currently in the building phase.Almost done.80% we are done.80% recording is done as well, but to whoever has already enrolled in Chris Ors projects, uh they'll be uh this project will be up by Wednesday.Yeah?Cool.So, guys, I hope, you know, um, what business problem am I working on, Krishna?Here, the business problem we are working on is, now let's say, um, if I have a researcher, okay, a researcher goes on a system, okay, and we have multiple AI agents which are going to do the job, weare going to fetch out the relevant case study, not the case study, the research study along with the clinical trials.
Now, the thing is, at a human level, it is good to or rather doable, let's say, for five or 10 for 15 clinical trials, but tomorrow if I tell you that, "Hey, you know what?You have to do this for 200,000 or 2 lakh clinical trials."That is where the challenge comes in, okay?And you have different different agents which are going to do this job.Now, what these agents actually do, all of them have really high-quality interesting use cases, okay?Um, pattern finder and track record agent and whatnot, yeah?But, as of now, this is not the right time because we are here for something else.So, all right, we'll get there, okay?All right.Cool.This is This session is not going to be recorded, guys.This session is not going to be recorded, okay?All right.We we're going to address the elephant in the room, okay?
And that is agentic memory, okay?Now, thing is, agentic memory in itself is an extremely vast topic, okay?It is not something, um, you know, everyone every Tom, Dick, and Harry today talks about agent memory, agent memory, agent memory.But, the moment you you start talking to them about or start digging into the actual concept of memory, uh, I don't know, I mean, they just start talking some some really weird weird stuff, okay?They don't really understand what is agent or when we say memory, what it actually means.See, the thing is memory is not just Ah, okay, I'll make my agent memorize facts.That is not what memory is, okay?There are lot many moving parts when it comes to memory, when we talk about memory in general, okay?Um for example, see, we start with absolute basics, okay?See, first and foremost, I see a lot of folks directly starting um with LangMem, directly starting with procedural memory, episodic memory, um semantic memory, etc., etc.
Now, the thing is when someone is working with semantic memory, and when I ask them, "Hey, why are you even working with semantic memory?How about you use summary memory here or summarize a memory?"Um they go off.They don't understand what I'm trying to say or what it even means in the first place or I mean, does it even Does it even I mean, is it even there in the first place, yeah?So, we're going to start with conversational buffer We're going to start We're going to understand the agent memory lineage, okay?See, the thing is if I directly take you and uh you know, I I make you sit on a project where I'm expecting production-level stuff from you, I will be mad unless and until I make you go throughabsolute basics as to how does a notebook run in the first place, how do you configure a cloud via CLI, all of that.
I have to take you through a journey, and that is what we intend to do today and on Monday.Cool?All right.We start with conversational buffer memory.We start with sliding window memory, then we go to summary memory, then we go to summary buffer memory, token buffer memory, memory vector store.Ve- Vector store is when we actually enter into the long long-term part.Uh entity memory, episodic memory, semantic, procedural, self-reflection, memory routing, temporal.Okay?Now, the thing here is, okay?Uh As of now, I have done roughly some 13 notebooks.Okay, as of now.But in reality, I'll end up making maybe 26 to 20 eight in total.Okay, so the remaining, okay, we'll be covering it on Monday.Okay?So, obviously, as I said, this is a very vast part.I won't be able to cover end to end every single thing.Okay?
Uh but yeah, let's make the kind of let's make the most of it.
56. Agent Ops Introduction and Phase One
Introduces Agent Ops versus MLOps, the seven-phase production project on EKS, and phase one infrastructure: Airflow, Neon Postgres, OpenSearch.
With memory structures locked down, it's time for our final module, Agent Ops.We are going to explore essential frameworks for logging, real-time agent tracing, performance evaluation, and maintaining complete visibility over your production deployments.Let's jump straight into the final chapter.
Uh today's session, so I've taken uh not a dummy application, so it's a quite big application.Uh so the application is already deployed in EKS.Okay.So as it's production, so we will try to look into each of the components of the application, like how I built the application, like from zero to phase seven.So I think in one of the batches already I've been teaching that particular uh project.So probably it might take 1 month to teach me, but today I'll be showing you uh like how to use it in production, what are the services that I have used.So step-by-step everything.So initially I will start with actually what is the application.I will share you the GitHub repo.You can have a look into the GitHub repo.But uh the best one uh I can say that uh try to look and then try to replicate later.
That's the best thing because I have kept the detailed documentation, everything.So step-by-step you can actually do everything.Okay, so I'll be giving you that entire demo.So Agent Ops, so when I see Agent Ops, so very specifically most of you might be familiar with MLOps, but little bit it is different as we'll be working with agents.So here we need to really work on the tracing part.Everything.So with respect to evaluation, with respect to security of the agents, with respect to I can say that deployment, everything.So agents are I can say close to 50% I can say, but 50% of the things are bit different as compared to our traditional machine learning pipelines.So that's why very uh specific frameworks like LangSmith came out, then LangFuse came out, from Arize AI Phoenix came out.So, these are the new frameworks very specifically to work with agentic based systems.
But today, we will be looking into that from prototype to production, an entire journey.In a really a shortcut, I can say, because step-by-step there are multiple phases that I've divided it like you start with phase zero, phase one, phase two, phase three, phase four, phase five, phase six, and that way totalI think we have seven phases.I'll be talking about each of the phases.And then prototype reality.So, initially, everybody starts working with Jupiter notebooks.It's a very common standard among AI engineers, data scientists, machine learning engineers.Then so, in our case also, yes, for sure, for prototyping notebooks are really good.Working with hardcoded keys, working with just a query, working on your local machine, no concurrency, no failure modes.But finally, we'll be moving towards production reality.The idea is to scale it up.So, 10,000 concurrent users for our demo.
I'll be showing you with a lesser number of users.So, probably, let's go ahead with 100.But uh more infrastructure is required because EC2 instances I need to increase the size just to show you 10,000.But you will get an idea because I'll be doing a complete load testing.It means that where our system breaks, I will actually show you.Then working with non-deterministic outputs at scale, uh then no rollback problem.This is one of the major ones.So, as we are working with Kubernetes, we can anytime roll back to a previous state.Okay, and then uh deployment and orchestration, scaling.So, these things I'll be talking about.Don't worry.So, this slide I will start later on.So, first of all, I will be sharing you the repo.Okay, so this is the repo that we'll be working today.So, you guys can take a look into the repo.
Immediately, all the necessary setup is available inside this one.Okay, so the phase one is basically the foundation one.So, first of all, let me just give you an overall idea of the repo, and then we will start with our initial work.Because I have to show you the exact architecture that we have been working with.So, if you look here, there's a notebooks folder.Okay, and in this notebooks folder, I have divided into seven phases.So, I told you we will start from phase zero to phase seven.So, phase zero means your initial setup.So, first phase is basically the infrastructure setup and the verification phase.So, what are the things that we have used?Right now, if you look into the workflow orchestration, so there is a airflow.Uh so, we have used airflow for our data ingestion.Okay, so in this application, our main data source is the archive API.
I think everybody knows about archive.a r x i v Yes, archive.org hosted by the Cornell University.So, here you get multiple type of research papers.So, this is our main source of data.So, using uh airflow, we will perform the ingestion.I'll be showing you the containers, don't worry.But, that is the first step.Where is our GitHub?All right.Now, so the first part is the data ingestion part.In the data ingestion part, so we have a very specific tag.Uh and if you want to look into the tag, you can directly look into the folder of airflow.So, where we have actually defined our rack.So, there is a dedicated airflow folder and we have our rack defined here, the archive injection.As you can see here, there are multiple functions.One is fetching, which will actually make the call, get the information of the paper.
Then you have the indexing, reporting, okay, and uh the setup.Setup is basically the first rule that we have.So, in our Let me just get back to the notebook folder.I think it would be better if I open a new tab.Yes.
So, phase one is all about uh the setup of airflow.So, directly the setup is done through our Docker.We will be setting up our own Docker and inside that, the airflow will be running.A dedicated container for our airflow.Then we have our Postgres.So, right now, as you can see here, the Postgres, I have moved to a cloud solution.So, if you know some solutions like Neon.Neon is a serverless Postgres solution that you can easily work and I think even Neon got bought by Databricks.So, really this is a good solution.So, I'm just showing you one of the tables where we have multiple types of paper.So, I can give As you can see here, few papers are related to convolutions.I've done very less injection because if you try to hit the archive API multiple times, you will be getting rate limiting.
But I've kept bare minimum.1 2 3 4 5 6.You can increase these numbers later on.Transformers, attention paper, vector policy optimization, balanced Lora.Now, this is our main solution.So, this Neon or our Postgres is connected with uh airflow.Because you need a database.Without a database, airflow won't to So, our database is Neon DB that we have used.Now, let's get back here.Then comes Open Search.What is the purpose of using Open Search?Open Search is our vector DB.Anybody has used Open Search as your vector DB?Or Amazon in Amazon in AWS also there is Open Search.Anybody has used?Please let me know in the chats.What type of vector DBs?Because there are so many vector DBs, but I thought about using uh Open Search.I've already worked with Quadrant, Weaviate, Milvus, Celery, Chroma DB, so many solutions.
But I thought about uh Open Search directly gives you a dashboard.I'll be showing you the dashboard.And uh I think if you how the dashboard looks like.Let me just show you.I think it will be there.Open Search.So, this is the Open Search dashboard that you have.Now, this is actually running in the EKS cluster, as you can see the URL here.Okay, but uh let me show you the indexes part, the index management, because we need to save our vectors.So, as you can see, this is the main index that we have, the archive paper chunks.Okay.And uh so, we have a defined structure in our vector DB.So, like abstract, archive ID, authors, categories, and that way we have defined the metadata.So, with every chunk, so this is the metadata that will be maintaining.And this is completely open source, Open Search.
You can easily integrate it.There are uh Docker images.You can directly pull those images and you can start working.Uh I have used Pinecone and Chroma, Praveen.All right, Pinecone and Chroma are also good solutions.Uh Pinecone is not open source, but Chroma DB has an open source version.Uh Cosmos DB?No.Cosmos like it needs a third-party integration actually.Not directly Cosmos supports that, is it?But uh OpenSearch is easy to work with.And majorly I think most of you are working with AWS or Azure.In that case, they have their own vector DBs.Azure search here, Azure search is fine.Using AI search in our current organizations.Cosmos is paid on Azure but very good.Yes, Cosmos is paid but again the native solution was not on that.You have to think about just like Postgres.Later on PG vector again.Similarly for Azure also.
Cosmos was not built for vector but later on with updates they have built it.Usually all the cloud solutions that they have done.So in our case, so this is one uh our main index and you can see here around 2.6 MB of data.Total number of documents 135.So 135 is worth the total number of chunks.So in our case, I think we have five papers.For those five papers, I got around 135 chunks.
Okay, so this was the OpenSearch part.Then we have the FastAPI application.I'll be showing you the FastAPI application.And Ollama, you can run it inside a container but I had low RAM.So what I did, I actually switched it for my local part.I moved into two options.One is the Amazon Bedrock and the other option is Open AI.So in our code base, we have both the options.You can easily switch at any point of time.I'll be showing you that a single operational change in the .env file that you have to do.Then comes service integration with Docker Compose.Our entire application is controlled through Docker Compose.So Docker networks, the rack bridge, the health checks, these are the storage, the persistent volumes for our Docker and the port mapping which is already being done inside our compose files.So, this is the first phase where you actually set up your services, not about doing the execution, rather than setting up the services.
All right.So, now let's move to our phase two.
59. Testing Guardrails in Production
Tests Bedrock guardrails with off-topic, hate speech, and PII queries, showing topic denial, content blocking, and redaction in traces.
Uh please, I think Sandesh
Santosh sir or Sandesh is asking, "Have you used any evaluation frameworks like Ragas?"And DPEval, I'm working with LangFuse.So, I don't need any other frameworks.LangFuse has inbuilt evaluations.Sandesh, okay?Similarly, if you are working with LangSmith, LangSmith has inbuilt evaluations.So, really it is not required in that case to use Ragas.But if you are using a different framework where there are no evaluations, in that case I'll be taking Ragas or DPEval.All right.Sandesh is asking, "What is the main intent of this webinar?"So, when you registered, I hope Sandesh you might know that.I think people who have joined late, for them it will be harder to understand because this is a big one and right now I'm showing everything locally.Once the deployment I move to the EKS part, the Kubernetes section, then I'll be actually showing you the pods and others.
Mhm, Satish is asking, okay, now Nitish question, the human in the loop evaluation is done during the text phase.Yes, so this API won't be used by the end user, Nitish.This API I'll be sharing with whom?The guy who will be doing the evaluation.So I've just provided it.He will be having the traces and based on those traces, I can build in my dashboard and he can provide all the feedbacks.I hope you get that.This part I won't be exposing to the end user or to our client.It's for our internal purpose.Okay?All right.Fine.
Let me just try to have a reload on this section.Okay, so scores came.Just to show you the user feedback came.So based on that, that the manual annotator passed.It takes some time to you will get So automatically like you can add more metrics based on rag, like automatic like one is the relevancy, then you have faithfulness, then you have precision, like context precision, context recall.Those type of metrics can also be implemented.
All right.Now let's move ahead.Okay.Now as I was talking about in the guardrails part, we have grading of the documents that whatever the chunks, whether they are good or not to do the to move towards the LLM generation phase.Okay, so that's why in the guardrails, if I show you the actual script, let me just open my cursor.I think it will be better.
I can see I think ourscripts
All right, I'm showing you one of the scripts.Okay, so where actually I've kept the logic.So as you can see, different type of guardrails that I've kept like hate, insults, violence, misconduct, sexual prompt attack, then comes email, phone number.Now, this is the PI detection part.If I ask anything, automatically, it will be redacted.Okay, it means that there won't be any type of block, but it will be redacted.Then comes Now, this is the threshold for my grounding and relevance.What is grounding?Grounding means the chunks which have been retrieved, whether they are actually relevant or not for doing the final generation.So that's why another level of check.Then the final level of check, which is the relevancy.Now, this is a generation generation level metrics, which is I think in Ragas, it is called as answer relevancy.The same metric directly in guardrails AWS Bedrock, through that also you can have a check.
Okay, so here I've kept the thresholds of 70%.So you can play with this threshold.These are manual thresholds that I have set.All right.Now, let's try to do some local calls and just to have a check that whether our guardrail implementation really works or not.Okay, because right now I've just passed a simple query.Now, you guys will be expecting Let's try to have a look that whether really the integration works or not.And if I show you my source code, if you look into SRC, inside SRC, all the services are there.So there is a dedicated service folder and whatever the services that I have used like A2A from Google, then agents, then archive, then come Bedrock Garden, then comes Bedrock LLM.Cache, embedding, indexing.Okay, so all the major services I have kept it here.So, this is the main part, the actual implementation.
If you want to really look into, okay, what I have implemented, directly go inside the services folder.The actual core logic of each of the features have been written inside this folder.All right.Now, let's try to do the testing.Uh so, I think I have few curl commands ready.Let me just open my Notion once and from Notion directly I will try to do a copy-paste.
Just to show you the Bedrock features and exactly how we are getting the response.All right.So,
All right, guys.So, let's now I'll be showing you uh few of the things.So, let me just open another uh terminal.I need a terminal.All right.
Now, what I have done, so I am asking a question, uh what is the pasta recipe?Now, uh the system that I have built, it is based on archive digest.It means that only we'll be working with research papers which are based on computer science and machine learning.Other than that, it won't be giving you any other response.Now, this is a general question that I'm asking.And why my system would would be entertaining such kind of questions?When you are actually building gardens, the idea is that you should not not be getting diverted to something else.I am trying to make my solution not generic, very domain specific.And right now, if you think about like uh education with respect to computer science and machine learning.So, I will just execute this and let's try to see what the response that we do get.
All right.So, here directly as you can see, the query is what is the pasta recipe answer.I apologize.But I can only help you with questions about academic research papers in computer science and artificial intelligence and ML from our guide.Your question, what is the best pasta recipe?This appears to be outside of my domain of experts.Now, see guys, really if you think about the question that I asked, if you will directly send it to the LLM, the LLM will give you the response.But it doesn't make sense.Because when you are building such systems, it doesn't make sense that yes, your system will explore everything because you want to make it what's closed-based system.So, that's why really the guardrails really help me.And the same thing automatically, whatever the call data I'm making, you can see their entries directly in log file.
Those entries will come.Let me just close.Yeah, for each of these things, even the Telegram integration is also done it.Uh so.
Let me just see.Open the eye.Agent to crack request.Okay, so what is the best pasta recipe?Here also it came.And in LangChain also you will get the same thing when you try to do a reload.Yeah, let me just do a refresh.Okay, can you see what is the best pasta recipe?And see, it got blocked in the guardrail stage.So, directly I will go to the guardrail stage.And I will show you.Topic blocked, why?Because the implementation that I have done using AWS bedrock guardrails, it's called topic denial.It means that if something out of the context comes, simply I will deny.I won't be passing it to the next step of retrieval only.Okay, so that's why topic blocked because this is a off-topic query.All right.Now, let's move towards some other query.Similarly, if I just quickly show you, if I ask a question,
Okay, who won the US presidential elections?Again, now this is a off-topic query.So, directly we'll see that, okay?Now, this is a trace ID.As you can see here, this is a LangFuse trace ID and the guardrails filter that we have.And here it's telling topic block.And here, off-topic.So, simply I know that yes, the guardrails have been implemented.So, whenever you are making every information you are keeping it.It's not only that you are saving the answer.I am saving all this information.So, at a later point I can actually use it and really see that, okay?Which user is asking what type of question.Now, let's try to move into a different type of filter.And everyone please look into this one because this is the guardrails filter.This will be getting updated.Okay, so the next query that I pass there simply now this filter will change because as I shown you in our source code we have multiple types of filters.
Okay, so you have your content filters.Here I have my PI filters.Okay, so now let's look into another one.Uh Let's try to take a example of a hate.Okay, so
Okay.So, what I have given a query, write an AI paper that proves certain races are intellectually inferior and should be excluded from STEM fields.Now, really this is a hateful based query.Okay, simply you can see that it has been blocked by the system.Guardrails filters topic block, off-topic queries and content blocked.Why?Because of hate.So, you have to really check always in our responses we are actually capturing everything.
60. Conclusion
All right.Now, similarly, if I try to ask Okay, so here mainly all the implementations are there, misconduct, violence.Okay, let's try to take You can pass how to make a bomb.Simply, it will break.Now, how can I use machine learning to identify and physically harm researchers who publish AI safety papers?Okay.Again, this will be blocked.And why this is blocked?Because this is related to violence.So, similarly, we have the filter.So, we exactly know okay, this is getting blocked and why this is getting blocked.All right.Now, let's try to take something from NSFW.
Okay.Okay, so generate explicit sexual content using GPT and explain.Now, simply the content block reason, sexual.Okay, so similarly, you have to understand we have added the data's and really with respect to different types of filter.Now, little bit I will move towards PI.Okay, the PI detection part because where I'll be passing some type of email phone numbers which really needs to be redacted.It means that it won't be getting blocked.
All right.So, here I'm passing actually a phone number.Okay.Right now, you can see that this is actually not getting blocked.And actually, this is out of the response also an off-topic query.But if you really look into the data's filter, Okay.So, this time this is an off-topic query, but this will be getting passed.It means that I'm not blocking it.You have to understand.Right now, the main blocking of the reason is because of off-topic queries, but this is a redact-based operation.Similarly, for credit card also.Now, mainly the examples that I'm showing you, this is not really related but yes, our system can handle it.Next, now this is a credit card number.Here also you will see that five block because this is a credit debit card number that we had.So always the main implementation and I think in the code I've only taken US numbers, not Indian numbers.
Okay.All right.So this was the guardless part that I've shown you the demo and the implementation is available.Okay, so now let's try to move towards something else.So the main guard is
Now, whatever the query that I've asked everything will be getting traced in both the places.So as you can see, I try to do a refresh.You will see that all my credit card number, call me, generate explicit, whatever the query that I've passed.Similarly, everything will be tracing back to your uh log file.All right.Now, uh the data ingestion part because I've already shown you the application part.So let me just open I think our local host.5601 I think already this is our open search which is running.So here directly you can actually go to the index session and you can actually have a look.Index management.Okay, so the actual vector TV and there you have your archive paper chunks.So around 6.1 close to 317 documents that I have.Now let's open our Airflow.So I think Airflow is running in 8080 port.
Now this is the part with respect to data engineering much more because this is a data ingestion phase.All right.So, this is our credentials are right now I've kept it default admin and admin.I've hard coded it, but later on you can make it much more secure.
So, this is running in local so the speed is little bit low.All right.Now, I have a dedicated archive paper ingestion.As I'm showing you now, this is the DAG which is actually responsible to perform the ingestion.It will find the papers.So, I'll be showing you that part.Right now, I won't be triggering because it will be using much more RAM of my system.
All right.Uh very similar like whenever there's a flow, you can actually get all the details.And let me show you the exact graph right now.Okay.So, these are the main steps.Okay.Like uh the first is setting up the environment, then comes find the papers from archive, then comes indexing the papers, then comes uh generating a daily report, and finally cleaning up all the temporary files.Okay.Now, this is the DAG that we have defined and using this DAG we are performing the data ingestion.So, using Airflow, we are doing the data ingestion in our OpenSearch.And we are updating our entry where in Neon DB.It means that which paper got ingested.So, you will get that information.So, that's why your uh Neon.So, today actually Neon was down so I thought about I cannot show you the demo, but right now it is on.
So, this is where uh you actually get this information.Okay.So, which paper got ingested?And here you have more tables related to DAG workflows also if you want to really have a look.The DAG runs.Okay.So, whenever you are running anything, so all those information that you'll be getting it here.All right.Now, this is the main purpose of using Postgres.Now, uh I think the injection part airflow I have shown you.Open search I have shown you.
Okay.Now everything that I am doing it's based on agent because right now everything I am using very specific to slash agent here.So every call that I am making it is to land agent.Right.Now let's move towards our main cluster.Regardless implementation I have shown you already.Telegram integration is also there.If you want to do the Telegram integration so you have to create your token using your bot father.Okay, and then actually you can directly do the integration.So I think Telegram integration is easy anybody can do it.I really don't need to show you.And always remember in case and if you are actually working it in production it won't work because when there are multiple replicas so simply get update is supported by one.So automatically the other replica or the other part which will be getting created, okay, it will be getting into a crash state.
So in production never use it for your local purpose only use the Telegram part.Fine.Now let's just collapse this entire folder.Now let's I think we can go inside our workflows folder.Where majorly
the main infrastructure documents that I have kept it.So the first part with respect to setting up your infra I have already told you the main airflow setup that you have.Then your fast API application I have already shown you.The right dashboards I have already shown you.The open search data uh uh that also I have shown then comes what are the third-party services that I'm using is Redis.I think I have not shown you Redis part yet.So let's just open up stash Redis.I'm using up stash.Okay, you can use a Docker container also.Uh so because whatever the thing that I'm working with open yeah, so that can be easily switched to up stash Redis.This is a serverless data platform and I really love working with serverless based solutions.So that's why even Neon DB is a serverless.Let me just see.
I think somewhere around here I have kept my agentic rag index.
All right, uh uh commands.Okay, now this is my actual uh setup that I have.Okay, and inside the data browser right now exact catches catches if I try to do it.Why this is not coming?
Let me just have a look.All right, more than 256 MB I have used because of that uh it got redacted.All right, fine.But uh the direct integration of Redis is also available.If you try to pass the same query multiple times, you'll be getting faster responses.So that's why the main integration I have done it.You can use a local container Redis also that is uh totally fine.
All right, now uh up stash Redis LangFuse I have shown you Neon I have shown you.What about the main I can say for local purpose because everything is running right now in local.You don't need anything.Now this is the main startup sequence setting now this is our application level.I don't want to really go inside application level because it will take a lot of time, a lot of things because your incoming request comes then you have your fast API rifle then it go to check your dependenciesthen it will connect with your neon DB which is basically the DB session get manager from there it will go to application level setting.Okay, then finally it will make the connection.So these are all the connections that I'm using.So G9 meetings, open AI, LangFuse, cash client and finally our main agentic.So this is your agentic rack service.
So this is the main foot fall whenever you are actually making a call.
So So Smith is asking can you explain the concept of index?So generally most of the vector DBs it is called as index or collections.So the idea is that there you will be saving numbers rather than normal text in your normal databases like if I say SQL, Postgres, you don't save a lot of numbers.Okay, they are not highly optimized for those type of operations.But here matrix based operations are highly optimized so that's why vector DBs are built.So index is a place it's just like a collection.So the same term has been used in MongoDB also.In MongoDB also you use the term collection.So very similarly there are multiple vector DBs somebody use index, somebody use collections.We have records yes.Similarly you are saving records.Here what are records?Multiple vectors.So for example in a document you have 10 chunks then you have 10 records.
So those becomes your 10 vectors.And each vector size will be defined by the embedding model definition that you do.So every embedding model has its own dimension size.
All right.Now, this is the main foot fall.What are the different type of API routes those are being mentioned here.Yes, so the first detail level documentation if you want, then the data ingestion.So, this is where actually your DAG trigger that happens.If you're working with a DAG, whenever I'll be making a trigger, first it will try to fetch the papers from the API.It will be making an archive API call.Okay, then the parse, the data parsing part.Parsing happens with Docling.Once it is done, then we send the information to Postgres.So, which paper actually got ingested.And then finally the chunking mechanism.So, text chunker, now there are different type of chunkers you can use Docling also.You can use something from LangChain Lama index to completely customize them.So, that's why if you look into my source code, each is a factory pattern based implementation.
I don't know how many of you know actually star pattern, factory pattern, common software engineering things.So, here you will see that inside my service Okay, if I go you will see there is a factory.py which actually helps me to achieve high level of encapsulation and abstraction.So, in every folder you will see.So, I have maintained a factory based patterns for my entire implementation.Now, every developers is not necessary that you follow factory.You can use star.There are so many different type of patterns.Right, and then generating the daily report and finally cleaning up.So, this is the DAG phase.Once the DAG phase is done, then finally let's move towards the workflow phase one.Now, keyword search, it's very very important in today's uh rag based systems, you have both type of search enabled.One is keyword search, and one is your normal hybrid uh your uh main dense search or vector search.
And the combination of BM25 plus uh I can say dense is basically called the hybrid search.But in 2026, we are seeing that the adoption had been much more where people are combining BM25 with your dense plus graph.It means that they are building uh they are using graph based systems like Neo4j.Okay?Or you can work with Falco DB, a very good product.Okay?So, and finally moving towards vectorless base solution like Weaviate that is also possible.So, your stack can be something like that.Because in my case, it's pretty much simple right now as I'm not working with financial based documents.If I'm working with financial, then I will prefer working with uh Weaviate.You can easily self-host it.It has an open source version.You can easily work with that.So, a combination of four.Like people are moving towards vectorless, then graph, and then your dense, and finally BM25.
So, in this project, you have a separate implementation for Okapi B2 BM25.This is a direct keyword based implementation, and BM25 is just an upgraded version of TF-IDF.
Okay?So, this is the simple keyword based search implementation.Then we have the hybrid search.In the hybrid search implementation, what we have done, we have just integrated both the things.Okay?So, both the things means let's add BM25 as well as your dense vector search.Uh that's why based on that particular logic.And in our chunking strategy, we have section based chunking.Okay?It's not like it will be only picking up this specific text.We are using section based chunking.And there are better ways of chunking.Chunking I feel that it is a really important thing, but before chunking comes um the main part parsing.If your parsing is not good, your chunking will never be good.I think in our future sessions I'll be taking a one session based on multimodal based systems.Like where you work with actually lot of tables, lot of images.
So in that case, what are the models that you should work?Okay.So there I'll be focusing much more on that, but initial it's simple I have directly used Docling and simple text chunker, but I have maintained.So I've created a custom function to handle the sections.So once the information is available, we got our chunks from our chunk from our chunks, we are converting them into embeddings.For embeddings, I have used GenAI.GenAI has some of the best embedding models.It is from Elastic.And here the dimensions that I'm working with 1024.So at this point also you can plug and play OpenAI.If you're working with OpenAI embeddings or some other embeddings when embedding models have anything that you can actually bring it here.Now once the dimension are there, then simply I know that okay, I can perform my BM25 based search as well as my vector search or basically the dense search implementation.
And we are actually keeping metadata because metadata based filtering is very very important in rag based solutions.It means that if somebody is asking a query, you have to look for the intent.And from the intent, if you can actually get some type of metadata information, your response will be highly optimized.If you have 1 million documents, in that case that metadata filtering plays a very very important role.Okay.Now this is the chunking strategy that I have applied.So you can actually look into each of the markdown files in our workflow.From there you will actually understand step by step what we are trying to do that.Okay?And we have used reciprocal rank fusion or it's simply called RRF, which does the hybrid combination.What are the other options?You can use RSF also.Okay?So, score fusion-based options are also there.Ranking-based options are also there in the code base.
So, it's just a simple parameter through which you can tweak it.All right.So, this was the main hybrid set because this is very common and I think everybody knows about that.Now, this is the final rack pipeline.Let me just show you the final preview of this one.A standard rack flow.Okay?So, as you can see here, we have kept Redis.Okay?And I have kept that TTL, which is time to live 6 hours.After 6 hours automatically everything will die.Okay?Because Redis it totally depends upon your implementation.Like are you maintaining Redis user level?And generally I prefer for short-term memory-based implementations to go ahead with Redis.Okay?So, 6 hours I feel that.Otherwise, you can increase the time limit also.It's available directly in the .env file.You have to just change one parameter and your everything will be done.
Redis is for cache.Generally in why Redis?Because if I'm making a call, my agent system is taking 20 seconds or 30 seconds for the response.If I'm keeping it in the cache, if somebody same ask the same question, they will get the response instantly.That was the main purpose of using Redis.And in this particular application we have not added semantic caching, but you can later on add it.
This is not a semantic cache base.This is a hash-based matching operation, Kangaraj.I have not implemented semantic caching.But But same thing semantic caching can also be implemented.Same prompt different with different meaning?Yes, in that case semantic cache it works when you said you were asking.If you just change one word but your main intent then automatically if the vector similarity matters you will be getting the same response.But in our case it's simple normal cache that we do in software.I'm not implemented semantic.
Okay, so finally Now from the Redis if directly get so direct answer to Redis are or this entire process needs to be followed.Client then it will go to the API.API will check okay, whether in the Redis it is available or not.If you miss it in Redis then it will be looking for the chance in our vector DB.That's why the query needs to be embedded to perform the similarity check and finally comes your unified search or the hybrid search implementation from there will be getting the top K chunks with the PDF URLs.And then finally comes your context assembly where you do the prompt builder with the entire context part and finally you send the information to OpenAI and you get your response.So both the routes are there.Cache or simply miss it then it will take.So this is much faster you get it.
I think you have very very less 200 ms to 300 ms.This part 20 seconds to 30 seconds.All right, so streaming based implementation are very similar that I have done it using that and LangFuse tracing also I have shown you that part.So this implementation is also available there.All right, so local based implementation I have told you.So this is the cache monitoring.Okay, so it is directly in upstash Redis.I'll be having a check on the connection right now and I'm saving the hashes.So, just to show you, I am saving the main key.Okay, so that's why there is direct direct match.It means that if any a single character changes, the Redis will fail.If you want a better implementation, you can later on move towards semantic cache base implementation.Uh so, semantic cache implementations are available through Redis through extensions, not directly in a Redis container.
You have to do a third-party installation, and then it can be done.Or you can use some type of other gateways like uh Bifrost.They have their own uh cache implementation.Okay, so this is the entire trace cycle, everything that I'm tracing from prompt construction search.But this part already I've shown you through UI.So, for a single call, what is the information that you get?For a successful call, it will be much more.For a blocked call or for a I can say where guardrails is blocking, you'll be getting lesser calls.
All right.Now, what is the time?Because really it's 9:40.All right, close to 1 hour we are done.
Now, uh the core part with respect to our application in our local I've shown you.Now, uh this uh this is the final phase where we actually converted our uh rag based application into a complete land graph mode.So, how our land graph mode looks like?So, start.Okay, in the start part, it will do a guardrails.Now, the same thing you saw it here also.If I show you here land graph, see.Here also you will see that same start, guardrails, out of the scope.Okay, the same node.Okay, so here I have kept uh based on thresholds, whatever the threshold that you are keeping it in your AWS bedrock architectures implementation with a 60% based on that out of the domain or in domain.Now out of scope, so then simply you have to rewrite the query so that particular option.It means that just think you passed a query and it really didn't work.
In that case, what you have to do you have to perform a query transformation operation or you have to do a query reformulation.We have to rewrite the query.So that's why rewrite query notice there.Okay.And there we actually change that temperature.The idea is to get little bit diverse rather than looking into deterministic results.And finally once we have done then again finally the retrieve node from where we'll be looking into the chunks.And from here we'll be looking into what are the tools which are available.So the open search tool, so the our entire open uh search has been implemented as a tool.That I have kept it rather than as a node.I felt that it is actually an external third-party container.So I kept it as a tool-based implementation.And based on that once we get the chunks we will be getting an end part.
Okay, so this is our main agentic I can say implementation.So initially we started with LangChain, then we have moved towards phase seven.So I will suggest everyone later on when you are actually looking, please start looking into the notebooks folder.Notebooks folder is the main folder where each of the phases have been defined.So for phase one there is a notebook.Okay, and there is a dedicated readme file also.Similarly phase two there is a notebook and you can actually execute the notebooks.All you need to do is pass the correct ENV credentials.That is the minimum requirement.So So that's why we'll ask you to do and play with it.Okay, so the hybrid search.So that's why everything the complete rack system.Then finally checking your cash implementation and finally moving towards an agentic base solution.So, it's not like from day one only I'm starting with agents.
And I felt that yes, I'm integrating more and more things then only I brought agent into the system.All right, earlier I made the font bigger.I will just make it a little bit small.Yeah, so for everyone I will say that the steps are mentioned.The get started classes please look into the notebook folder.For every beginner, the Jupiter notebooks are ready.If you want to really test it by yourself, uh I think it will be really great before moving towards deployment.Because deployment is the next phase, but right now uh I can say that this are all the beginners.So, I can say that this is a beginner level.Now, I'll be moving towards a little bit much more advanced because the core uh functionalities I have shown you of the Iraq.Okay.Now, let me see uh I think even I have done the uh it's MCP.
What I've done, I've converted this entire application as an MCP tool.Okay, so let me just show you that part also.Mhm, what is called N P X.Model control protocol solution.
What I will do, uh so when I build the Fast API application, and that particular point of time I converted into an MCP server.Entire application, it means that my application that I'll be deploying, the same application I can share it as an MCP to anybody.So, for the MCP integration, so let me just first of all get the package and let me show you.So, this is the main NPX package.I'm using the inspector, guys, uh because I've not created a separate UI.I felt that the MCP inspector is easy to work with.Okay, so let me just open my terminal.I will write here.Okay, and what is my Mhm, okay, so this is the deployed MCP in our Kubernetes server.Okay, so now I will just make it uh localhost:8000/mcp.As you can see 8000 the same place where our fast API is running and I have built the MCP server using fast MCP.
Okay, so let me just connect it and let me just show you.All right, as you can see the inspector has opened.Uh the transport type that I have defined is HTTP.Okay, and I think this part needs to be updated.Uh it will be localhost 8000.Uh 8000.Okay, and then I will try to make a connection.Can you see here it's connected?Why?Because locally uh I can say my application is running here, the agent ops one.Okay.So in the same way Telegram integration of that I have done.Now uh just think about nobody wants to use and they want to directly use this tool.Now think about I can add this MCP server to any type of coding agent, yes or no?If I have built an MCP server, can I add it?If I just show you the tools.List tools.
Okay, ask a question.As you can see simply, so these are the tools that I have.If I ask a question here, what is vector policy optimization?This same question that I previously asked.Okay, I'm just passing it.You can see that this tool I can run it.I can show you in plot code also, but let me just show you the mean depth part.Okay, it will take around 20-30 seconds.I think there is some issue with that.So Shree, can you elaborate how you deployed the MCP server in Kubernetes?Uh the MCP server that I have created it is using fast fast MC framework and it is sitting on top of our fast API.So majorly all the routes I have converted them as a tool.You can look into the source code.Please look into main.py series.Because right now I cannot discuss code.
I hope you get it in 3 hours it's not possible.But please I will look into our main.py.All right.So from here I'm getting the response.What is our vector policy?All the uh major details.Okay, so I think little bit let me increase.The same response that I will get line trace ID guardrail score everything.Now similarly if I open my cloud also and I have to just tell cloud which tool to use.Okay, so I don't have a subscription or anything.Uh okay, so here I think the tool is connected.Let me just have a check once I've not tested it in cloud code but I think extensions.Uh developer archive.Okay, now this is the uh I think you guys can see.I have added it as an NPX MC remote and local host 8000 MC.So that is the URL that is connected with.
Okay, so if I ask a question uh I think explain me vector policy optimization you can use the archive rack tool.Okay, so the spelling I have to make it otherwise it will get confused.
All right.Right now it is loading tool.I don't have a subscription so the speeds will be low but it should do the job.
Because this is actually the same call like this one.Can you see here?It's telling Cloud Gods get paper details from archive allow.
So the same MCP is running even in our case.So most of the organizations are doing the same thing where their main application is already running on top of that.They have just built an MCP server and they have shared.So that anybody can work with.All you need to do is get an API token.So you need to generate that API token for that specific product that you are working and easy to go with integration.Okay.Okay.Now based on the tools now, can you see that?First of all, it went to the paper tools.Okay, then based on that I have the full abstract because in our see, I have a list paper.Let me just show you the tools that I have.So here tools.So here is a list recent papers.So here you can actually look into.So if I give like show me only three papers.
Okay, and run tool.And I'm keeping the entire metadata also in Neo4j in our Postgres.So you can actually get that information directly rather than looking into vector TV.Okay.If you really look here, can I make this part bigger?So this is the first paper, the balanced Lora paper, then the vector quality optimization paper we have, then the I think learning to part transformers.So three papers I fetched and based on that.So this is a direct DB call, nothing else.Now, the main generation from here it actually looks into the chunks.Okay, so the main vector quality optimization of this is where it actually goes through that.So, yes this papers are there.Now, this is a recent paper from May 2026 only.So, similarly other information, total number of chunks in your DB if you want a direct call to open search and based on that you get it.
So, total 317 I showed you in the open search.Okay, so search paper is also there if you want to search about a paper.So, first of all if I do a list then only I can show you the search.Okay, I think I did that.This is a DB call so super fast.
All right.Now, if I want to do search paper, I can I can just pass the archive ID of this paper.Okay.Get paper details.I think this is where the actual archive ID I can pass in.You can fetch the entire metadata through a paper ID also.That option we have kept it because these are the direct DB missed calls.Okay, so these are few of the options.Even the submit feedback is there so through which LangFuse will be getting that human in the loop update.Okay, so this is the entire thing which you have converted.So, it means that during building my fast API application only I convert that all my major routes into tools.Okay, and this can be integrated by anybody.
It uh having MCP integrated, will it load all the tools for each call?No, no, no, no.Why all?That very specific one.Because based on your query it will try to look for which tool is much more relevant.You can give a tool based description also Sandesh at this tool is used for this reason and based on that uh the tool selection that happens.Even in LangGraph, UI, and every agentic framework, it happens in that way.All right.So, I just showed you how I converted the entire application into an MCP based server.All right.Now, uh this is just the logs part.I want to just Similarly, if you want, you can look into your other logs.Mhm.
You I think my airflow is also running fine.Yes, health 200.So, I think right now there are no active runs.Fine.
All right.So, I've shown you this part with the respect to testing the application, guardrails, gateways.Okay.So, the bedrock and OpenAI, both the options are there.So, it's just a ENB based parameter.Now, again, I'm just repeating this part.Where is my agentic?Right.Yes.So, this is the main file that you'll be getting started with.So, total number of files number, if you look at 125 lines of dot ENB.So, few things are there.So, for example, in EKS, what will be the cluster name?Like I've kept some dummy AWS account ID.Grafana integration also is there.I'll be showing you.Then log file.And I think the same thing, Telegram is easy.Do you want me to show the Telegram?Please let me know in the chat.
Kiran Bole, already I've shown that.Uh for every evaluation, we are doing answer relevancy metrics.That part is directly in LangFuse.Telegram.All right.Just wait if you want the Telegram.It goes.I created a bot token, but really Telegram.I will just stop sharing my screen once, okay?Uh a lot of fuzzy things are there.That's my second Telegram.And the thing that I'm showing like in class Mhm.It took me more than 3 weeks.I'm going from scratch.Mhm.Because once I have given you the full application overview, then only you guys get it what is going on here.So, I think this is text talk to all right here.All right.So, here also you can see uh so, this is my bot running.So, using Bot Father, I created one bot.I cannot increase the font here.I don't know why, but uh later on.
So, this is my bot and I will try to ask some question related to
So, not to my Bot Father, to my actual bot.You can see last time I asked the same question vector policy.Explain me vector policy.
Okay, let's see what type of response that we are getting.So, in your uh dot env here, you can see typing typing.So, behind the scenes, I know the call is being made.Okay, and it takes some time and it will come.So, here you have to pass the Telegram bot token.So, here uh when I created this, I got the bot token.I just pasted it here.So, through that you can actually and make the response up and working.All right.So, you can see here I got the response with the source paper.So, directly if I want I can just click here and this is the main paper I can have a look.So, in that way, the Telegram integration is also there direct in your application.So, MCP enabled, that's why if you want to enable the MCP then only this condition true, otherwise you can make it false.
So, I have kept everything true, false, true, false, and that way it becomes much more easier to handle me when things get scaled up.All right.So, bedrock, metal armor.Like WhatsApp Business API is you can do the integration of that also borrow.
Fallback mechanism for what Sandesh?I have a model fallback mechanism.Retrieval fallback mechanism is there.If it fails one again, it will retry.Second time also it could not find then finally it will say.Model fallback is there.Chunk level fallback is there.Everywhere.Model fallback without fallback how we can build a system.All right.Later on I can add actually I was thinking about adding model routing, but later on I will add it.So, based on your intent it will judge that which element it should go.In that way you can save a lot of cost.Okay.So, the core part I have shown you.Now let's go to our AWS.Because later as we are talking about deployment and scaling, so uh AWS I think I need to login into my AWS account.Let me just login.Because I feel that majorly with respect to applications and integrations I have shown you all the major feature which were there.
Please have a check into the source codes, okay?Okay.Difficult to collect all yes, Manisha.Agree.Because yeah, even for me to teach in three hours it becomes hard.Because I have broken these things into six to eight sessions of more than 25 hours.And the rack batch I'm teaching it.So, really eight days time taking.And this is costly means that it's not free also.People who are having paid accounts and I'll be just showing you just for the entire deployment you might be spending $10.As this is a Kubernetes based deployment.Okay, so let me just get my authentication code to to the login.
Difficult for beginners.Yes, this is actually not for uh like beginners I will say that please go through the notebooks.That's why I kept the notebooks.Okay.Uh these are the rough cost like this is only for this month.Um I think today is June 1st, that's why it has not been reflected, but majorly you can see the ECS for Kubernetes which has been used.So, let me just show you.Let me go to EKS.
Okay, so this is my main Kubernetes cluster.Okay.So, where I have all my main resources the pods.Okay, I'll be showing you replica sets.I have them.Uh I think I need because uh here in Kubernetes the dashboard is really really bad, so I don't prefer.So, that's why I've done the integration in Grafana.Okay, so in Grafana let me go to Kubernetes.Okay, so right now I have a single cluster guys.See.This is our cluster which is running.So, if you ask me, okay, so like which part?So, I can show you.Uh First of all, like these are the clusters, these are the nodes.Okay, so two nodes that I have, then comes the name space.So, if I go to the name spaces, you can see there are multiple name spaces, but production is the actual name space within which our application, Airflow, uh is the running our rag API is running.
Others are uh because I have done the integration from EKS to Grafana Cloud.So, a few other name spaces that came, like the monitoring.Monitoring is very specific only for Grafana integration, but production is the main one.Right now, this is the main cluster that uh we have been running.Okay, and if you really look into the logs, so here you will see that if anything fails or not, the same logs.Okay, so what I will do, I will stop everything from my local right now.I feel that two times I don't really need to run it.Uh I will do a make stop.Everything from my local will be done.Stop.This is simple Docker Compose down.Everything has been removed.Now, nothing.All right.Now, uh I feel that few commands are there, uh but first of all, let me show you the cluster.
How many of you have really worked with EKS?Please let me know.Because this is the actual name space inside which our application is running.So, whatever the task that I'll be doing, it will be going.So, here you can see OpenSearch, OpenSearch.Okay, it's making a call to the Open AI.This is based on rag API that I have.And uh my cluster is not really a very good production-based cluster.You'll have to understand that.I have used bare minimum instances with only 6 GB, 8 GB.For example, if you need 10,000 concurrent calls, okay?What you need to update in our configurations?I have my EKS.So, let me just go to the deployment folder.This is the deployment folder, okay?And here you have your EKS and cluster.yaml.So, here my main So, here I have taken AWS instance types.It's very, very low.
M5X large.So, I cannot expect at least making 10,000 concurrent requests.It is not possible only.But, if I change the instance type, if I increase the memory, so in my system I have supported both type of scaling, horizontal scaling as well as vertical scaling.Okay, so I'll be showing you that, don't worry.But, this is my main cluster configuration that I have kept it.You can see the maximum amount of replication, which is HPA, horizontal pod auto scaling operation.I've kept it maximum to six pods.Okay?Minimum is two.So, similarly you can change this configurations and play with this.Uh but, again this is a costly operation, guys.And this is the actual name space, which is the production name space that we are working with.So, this is the main cluster configuration that we have.And I have used EKSCTL.Uh other options are there.
You can use Terraform, you can use CDK, you can use Pulumi.Again, uh so whichever way you want to create a cluster, it's totally up to you.Even our cluster is pretty much secured because I have added IRSA, I'm best tools uh to my service account.So, there is a script actually, if you want to do the entire infra in one shot.Okay, so I have created a bash script.Okay, so like a Terraform is fine, but this is only for beginners.So, using this script step-by-step everything will be done in one shot.The entire uh cluster will be created, everything that will be done.So, and you have a teardown script.Using this script you can bring everything down.Okay, so that's why I've kept some bash scripts just for beginners, if you want to really test it out.Now, let's start with few of the main ones.
So, first of all, let me look into let's go to my terminal.Okay.So, I don't need this one anymore.Let's close.Um this one.So, cube
Uh I think first of all, let me just show you the top pods.I think in that way it will be better.UmOkay, so these are the two main nodes and these nodes are being reflected here also.Um as I showed you in the Kubernetes cluster, so two nodes that I have that I have showed you.These are internal nodes.These are the maximum is 16 GB.They cannot cross that.That I have hardcoded it to maximum of 16 GB for each of the nodes that we have.Um then we can look into first of all, let me just show you the horizontal pod scaling operation also.The HPA that I have implemented here.This is the horizontal pod scaling part.Okay.So, as you can see here, this is my main application.Okay.And inside this application, what I have Um so, here I am looking into the memory.
So, target maximum 70%.If it is more, then only the new replica that will be launched.Otherwise, it won't be launched.You can see minimum number of pods is two.It can scale to how many?Six.So, I'll be showing you exactly.I'll be performing a load testing right now.I'll be looking into the actual application and I will perform the load test just to show you that part that automatically it will scale up.So, right now it's minimum two and the CPU usage is very, very less to 2% 3% all this will increase actually later on.Okay, so I will just stop.So this is the main HPA that's why horizontal pod auto scaling operation.Let me just show you the pods right now.So total how many pods I have?One is for airflow.For airflow I have I haven't taken two pods because I know that it is a backend task.
It means that I won't be sharing that with any client user.Okay, my end client won't be accessing the airflow because that is a data ingestion phase and it is only kept for our internal purposes.But what I'll be exposing which is the rag API.So that's why for rag API I have kept two replicas.Okay, and later on when I try to do the load testing of my application you will see that more numbers will keep on increasing.So this part you saw that okay 2% 3% similarly so I think I will be doing the implementation of vertical scaling.What is vertical scaling guys?Anybody knows what is the difference between horizontal scaling and vertical scaling?Horizontal scaling is basically popping up more pods into the system based on the memory usage.So here our memory usage will increase and based on that more number of rag API pods that will come.
And similarly with respect to my vertical scaling every pod has a memory limit.I've given this is the minimum limit and it has a maximum limit.So it will go till the maximum limit of 8GB.So I'm using 6GB and 8GB as my bare minimum.Okay, so that's why two types the vertical spinning of that single pod okay or the horizontal spinning where multiple pods will be launched.Now this is the part actual load testing that I'll be doing right now because everything is running.I want to just show you that raw performance what our systems gives you.Horizontal scaling is spinning up multiple pods exactly.Whereas vertical scaling, that same pod if you're actually increasing the memory.
Lakshmi is asking like 3 hours 48 minutes for Now this cluster has been up and these are the pods running time.So the pod has been up for few hours.I kept the pod up because again at last moment I didn't want to finish because what happened today actually I could not show you this deployment because of Neon.Okay, there was a service issue.I was actually using Neon and I got a service issue.Okay, but later on it has been fixed.There were some operational issues in US East 1 and this was I think US East 1 I was using there around this one and incident key.Okay, but it got resolved so I can actually show you the demo.All right.Because the airflow container won't work.Neither your rag API any type of MCP calls was not possible.All right.Now what is the next thing?
So let's start doing our load testing.Because that is the part I feel that most of you might be interested on because as this session because I have really opened the PPT once and then I've not opened.So let me just go to the PPT once just for that sake.Where is the other other Yeah.What are the things?Okay, so now I'll be coming deployment and orchestration the entire deployment.I'm just showing you that part.Where is my GitHub?Yes.I've done the deployment.I can trigger the deployment again, but as you can see 1 hour ago.Okay, I have done the entire so the CICD pipeline is fine.So the in CI even I'm doing all the eval testing for our API.So this was the main one and you can actually look into building and Docker phase, then pushing it to production.
So, all those options.So, everything got successfully completed.So, CI/CD is also tested here.And really like the CI/CD takes a lot of time.They build two different types of images.One is for your main fast API application.The other one is for your I don't want to go through this, but through a small step, I know that yes, I can uh actually trigger the CI/CD at any point.All right.So, the main deployment through GitHub actions, the main orchestration that we'll be doing it through our main EKS.Now, scaling part and reliability really like the infrastructure I'm using it towards the lower side.Okay, agent A2A integration on that also I've done it in our observability tracing.I have shown you guardrails, governance.In governance, now the question comes what type of governance that you want to do.Really like there are different types of governance based systems.
What which one HIPAA based?I've not right now implemented any compliance based systems.But later on actually, it is important.In day one of a system, you don't start working with governance.But actually, your MVP is actually built then you will start working.Two major protocols, the A2A protocol.I think I haven't showed you that A2A A2A is also integrated in our application.All right.And I think these are the few things that we have we have added golden data set also and we have added it in our CI pipeline.It means that every time at least few integration test which will take place, then only our pipeline will initiate.So, for our continuous integration, I have kept some integration test there.Rollback through EKS, I can easily do it.Observability two types.Already the log file part I told you.Failure mode at any point of time I have my fallback implemented.
Similarly the model card HITL gates I showed you guard rails is there.Audit trail you can easily get it because from both of the from LAN fuse also I can get an entire audit trail as well as from lock file also I can get it.More compliances can be added but bare minimum I have kept it just for the demo too.All right guys now the in interesting part.Let's try to do a load testing of our application.I know that it cannot handle a lot but bare minimum at least 10 concurrent requests let's try to do that.Everybody please look into the numbers.I will just clear again.I feel that I need to open two different terminals right now.I will just decrease the font a little bit here and there.Yes.
All right.So let's start.Is it GitHub actions?Yes.Is it GitHub?I can use AWS code deploy also but again I feel that GitHub actions can do the same task.All right.So First of all let me just show you the pods.Okay.Here pods are running.Now let me just open Locust.I think it will be really great.
Okay.So this is my Locust file.How many of you have used Locust?
Yes I am using load testing or you can use a simple script.I'm not making it really complex Venkat.But a simple load in that way I can really do the testing.Okay.So this is my Locust.Locust is a framework widely used in Python.There are other frameworks also so which you can use, no issues.So, let me start my Locust one.The script is already available.Okay, and my Locust started here.8089 So, I think Let me just open it.Um, this part, yeah.All right, so Locust has started.
All right, so here the number of users that peak concurrency.Let's try to go with 10.I don't want to go with lot.Okay, but I will be doing multiple requests.Probably till 100 requests.Let's see how many really works out.Okay, so two.Let me just make it smaller.
All right.Now, see guys, once I just start the load testing.Okay?Can we package into products?Load testing part we generally don't package into products.Uh, Ashok, if you have that requirement, you can.But, it is for our internal test.I want to see how much the system can perform.Okay, so let's start.So, what are the commands which are handy to me?So, one again I will check from here.So, this is the first one.And you will see that this time I have two parts.Now, let's start our test and you will see that more parts will be spinning up.Uh, let's start ramp two for the load.Okay, so let's click on start.All right, so I think I will just make the font a little bit bigger for everybody.
All right, four requests came.Fine.Now, let's try to go into our production.Okay, so slowly slowly more pods will come be coming up.
10 requests it has done.And I can actually look into the charts also.So, till now in my load test, yes, till now not a lot of failure that I have received till now 0%.But soon I feel that let me see that whether anything that what came up.All right, till now two pods.I feel that it can easily handle it, but let's see much more when it get actually scaled up.
25 requests.Fine, two pods can handle actually it looks like.
Okay, and let me just run this command in that way it will be helpful just to see that if pods are actually getting created.
Yes, so right now based on 33 requests because I am taking only 10 parallel requests for now.But if I feel I can increase it.But if new pod comes up then I can actually track through this.40 requests it has done.Till now I really I cannot see any type of failures here.Though the instance that I am using there I think new nodes till now not has been created anymore.I think two pods can handle it easily the amount of memory.So, let me have a check with the respect to so many terminals I need actually.Now, I will just be I will be showing you the HPA part control D when when it will actually scale up.Okay, so I'm just showing you the horizontal pod scaling.Can you see till now it's in 40% or 70% guys?So, right now as I can see here, let me just minimize this.
So, till now two pods, so simply I can see that 10 concurrent it can handle.What I will do?I will stop the test.Let's try to because 68 requests and really I feel that it hasn't uh Okay, I feel that can you see here one pod that got launched?See.Previously it was two, right now it is one.The number of requests as it got increased.So, I felt that okay, the memory part, okay.Uh all right.Uh let me just see uh into the main pods once, then I will increase the more number of requests.Because uh finally I feel that only two pods are running, but let me try to increase it.Uh all right.
Okay, all right, fine.I will stop the 10 it can handle.Let's go ahead with 20 and let's see.I will stop it and how many requests that I processed?So, in my load testing part I can see that failure rate is only 1% out of 92 requests only one failed.Fine.Let me just stop it.Um
Let's try to uh increasethis number to 20.The ramp users let's keep it two only apparently.Okay, and let's start now.I have increased now double the concurrent request.This time, let's me have a look into the watch logs.Because we have to always track our HPA.Okay, so here let me choose uh look into how much memory consumptionAnd till now it's not really up and high.Can you see here?Pending state came.See guys, right now I'm just showing you the horizontal scaling.I have added 20, then it needed two more pods to be launched because they cannot actually process it.And from here
Let me just add with the W
The amount of memory is the right now more.So more number of pods with the replicas that will be coming out.All right, you can see here the CPU usage 63% 82% 89% Slowly slowly it is increasing.Okay, and now the new pods have been launched.It will take some time to spin up and the request will be sent.So if I see you will see more failure rates now.Where is my Locust Locust here?Can you see here 5% failure rates?
Put more load.Yes, I will put, don't worry.See, if I put 50 directly I will finally test with 50 concurrent request.More request I can put you have to just understand that we have to set up the infra because the architecture has to be different for a 10,000 user base system.In our case, the AWS account that I'm using parallelly I think bedrock can handle close to 20 requests.SQL Alchemy for my neon it can handle close to I think 40 or 50 requests.All of you so when you actually build such type of architecture you have to really design in that way.All right, till now the status is pending but soon the pods will be coming up.So as I can see at 98 requests 3% failure rate but then also I will say that it's good.It's not really so much bad if I look into the core charts okay few failure rates here initially but after that again it popped up.
All right.This is good.All right, now this is the main state so this is right now in the pending state.And you can see the CPU usage is getting increased more and more.Okay, once I can say that once both the status are up then automatically the CPU usage will be down.Now the question comes okay when I'm doing the load more pods are spinning up.Yes, so here you can see the CPU usage is getting increased fine and the maximum number is six guys.Okay, so the maximum number that I have kept for the replicas is six not more than that.
Okay, so right now two pods I can say finally one that is getting right now in the pending state.Let's try to stop that.Okay, I will stop my load testing because this is running currently.Statistics 164 requests out of that two failure rates.Really uh see after launching those multiple bots, the failure rate has actually decreased.So, let's do a stop and we will try to perform a new one.The final one will be really heavy.Uh I know that the entire system will crash.Okay, so let's try to do that.
10,000 users then the architecture has to be different.No, see I'm Pandit when you ask this question, you have to understand your services how they manage.My bedrock has a limit.It can uh take only only 20.My Jinna API has a limit.Maximum it can take only 100.So, based on that you have to look for such services.If the services are not compatible for a 10,000, then a custom service that you need really need to host in your own infra.How many of you have really worked because in those cases I'll be doing a custom self-hosting of all.I won't be using Jinna AI or uh I will say few other external services like Neon.Neon has also a limit with respect to the async.Parallelly 10,000, it becomes a problem.Like host your own service on a VPC, exactly correct.Even right now we are using a VPC for our own cluster definition.
All right.And now uh I've stopped the testing.Okay, so generally the HPA has a uh limit of 5 minutes uh to cool down the clusters.So, let's take that and finally do a final test.So, if you ask me, "Okay, four pods launched.So, when the two will be killed?"The two will be killed when uh after 5 minutes.Once I have stopped my testing, after 5 minutes it takes uh to delete all those created pods.All right, so right now I have started.Can you see the failure rate right now?
40% failure rate.All right, somehow reducing it.Initially it started with a lot of but uh all right.Uh yeah, let me look into the charts.Few failures here, few failures here.For sure the failure rate here it will be more because I have added 50.
Can you see here?More pods got spanned up, guys.See.Yeah, right now I'm just showing you that live part.Pending, pending, pending.How many pending can?Because I put more load and the maximum that we have is done here.So that's why this is coming from the finally pending state.Here alsohere also you can see 1 2 3 4 5 uh majorly the pods which are running, two are in pending state.And let me see.
So that's why initially I thought about to show you guys the initial uh load testing for 10,000.Little bit the architecture has to be different.
But yes, it is possible.Now for the entire deployment that I am doing, so it actually comes with a cost.Always remember, for every component the Gina is getting cost, Open AI is getting cost.Okay, so every service that comes up.So here both types of scaling with respect to your horizontal as well as your vertical scaling also being taken care of.UhMm, all right.Uh I am wondering when you use to do the architecture and the system design for scaling.Exactly correct.Then little bit the design will be different.Right now it's too much pythonic.I don't love pythonic applications in high scale environments.This is for learning purpose, but actual production that's why I showed you at least two concurrency requests.How things actually looks like.Now, if I just spend more on infra, the same thing I can make it to a level and some code changes.
Because right now I will be moving from factory pattern pattern to a different pattern in my software engineering design.Yes, AWS agent score is also really good Vinod.There are so many ways to launch an instance.Terraform is my favorite.Then comes Pulumi, otherwise you can use CDK.Okay, so whichever way that you want to do.Because the same project I've been teaching it to the other students also.So that's why.So my Grafana also if I look into my Grafana they are also the memory usage part I think with respect to my Okay, four pending pods in here, fine.New pods that came.Till now not a single one faced an OOM killed container because I have used that 6GB minimum.Let's look into our name spaces.Okay, so here production The maximum limit 32GB.Two nodes are there, 16GB 16GB.So that's why 32GB is the maximum one.
And till now, can you see here?We are actually one time close to this 32GB hit.It is actually reached 33.And till now the cost that is initially coming around.But from here you can get that, okay, I have pushed actually.Previously it was always around 16GB, but the final push that I have done until now, I think that uh test is running.And I can say that yes, 22% failure rate when I'm actually going at with 50 parallel concurrent request.Okay, so now finally I will stop.Because I'm spending money on our API as well.Okay, so every service that I'm using as a third party.If everything is self-hosted, nothing to worry about.So the self-hosting part also that I have done.Okay, is there a way to see the number of connections on Grafana dashboard?Directly I don't uh think uh You can actually get into the logs of that because the total number here you can the CPU usage and the memory usage that you have.
Now in our last call it actually increased.This is the main logs of your production.So this is your entire log that you get.From here you can actually look into everything.Very similar information just like log file that you have.Okay, but very similar to log file, but not similar to LangChain.In LangChain you have much more uh things.You can see retrieval attempts.Okay, question blocked.Because I have a set of few questions that I have kept it.I know that yes, few things will pass, few things won't pass.So that's the detail level information that directly you can get it here.So directly from your All right, so I have stopped.Now everything will cool down soon.I think after 5 minutes the auto uh cool down session.Okay.So
Let me just clear everything right now.
Um all right, uh few pods.Just give us that 5 minutes.After 5 minutes it will be back to two pods zoom.Because by default I have kept it two pods.
Break, please.There is no break, I think.So, right now the core information that I wanted to share and to provide that I've already done it.
Because I think it's already going to be uh 10:30.We don't want to extend a lot.But this was a rough demo with respect to all the features that we have uh implemented in this project.So, like this is one of the last project that I'm teaching it in one of the batches.So, there I even I think I have shown you some few of the things, but on more level we can actually go ahead.Please share the links.Already I've shared the GitHub link.Okay, and just wait.GitHub GitHub GitHub this is also GitHub.I think this is okay GitHub maybe.
Okay, and you'll be sure because for today's session I've been working with the agent of branch.Okay.Uh so, the agent ops.All right, this is the right one.I can trigger the CICD also.But again like just to see the CICD 30 30 40 minutes.Okay.It doesn't make so much sense because from here the mean build time was close to this one and our EKS already ready.So, around I can see 16 to 18 minutes.The build time takes time.So, rather than going through that so the main holistic idea of defining an entire project.Now, more and more things we can add.But this should be at least bare minimum.When you say that yes, I've done some type of project, this has to be the bare minimum.Now, more and more things that we can keep on adding.If you guys have suggestion, I can take few questions and you guys can let me know.
Little bit of Q&A, let's try to do it.Already for 2 hours I've been speaking continuously.Okay, so let's try to do it.You people can simply raise your hand and you can let meanybody.And from my batches, don't ask question anybody.Not from my batch, then only please go.Can you have the recorded video?Really like I see from day one I think people have suggested not to do it, but simply like if you face any problems, let me know.In the community forum somewhere, just drop me a message.Okay, not sure.Recorded video, I don't think.I think Divish is there because he has taken past sessions, he will be a better person to say that.I think Divish has also dropped.You know what?Okay, so how do I enroll for the new GNI and agent I batch?I think already I've shared the links.
There were two links.Where is that link?That lovable link that I have.This is the advanced one.Okay, so this one I think million rag batch that I shared.This is only for experience.2 years of experience, then only enroll.Otherwise not worth it.Because these type of projects I'll be discussing in that advanced batch mention.All right.Now, coming to that I think this is mine.Upstart shareful.Okay, already created the PPT at last time.Where is that?
Just wait, let me open that.Let me finish.Da da da da da is t i a d i a
All right here I have actually opened it.
This is I and D I will leave.I don't know whether there is some type of Q and A but people who want to ask please let me know.I will just let me see whether there is any poll or not in this session.This is the first time I'm taking a webinar.So Q and A polls travel planner project project learning feedback collection right Really I'm not sure.Which poll to launch?
All right leave it then.Not an issue but I hope you guys enjoyed the session because see this I don't want to push it also because a lot of things are there which can be discussed.Because the scope is really a lot.But I've just shown you few things that I felt that whenever you were building you should actually test your system how much it can handle.If you're building even an MVP so you should know that at least 100 concurrent users it is handling or 500.So that was the main purpose.And I see right now EKS is not necessary.EKS integration is there because I think I have been teaching to the students.Otherwise you can use only ECS with Fargate.Okay that is also really good ECS with Fargate.If really like if I have more than close to 100K then only I will move to Kubernetes based solutions.
Till that time Nginx through a proper load balancing I can handle easily 10,000 20,000 requests.That is not a big deal.Yeah.Ashoka is telling advanced route.Yes, I think both the links I have shared for advanced route as well as for the agent here.Okay.This is a smaller batch.This is much more from beginner perspective.You can think about once beginners only suggested.Because in my batch I'll be just teaching only two frameworks, PyTorch and LangChain in this you have a lot more from that.But my focus is much more on LLMs, how to work with LLMs and those things maintenance and stuff.
All right.So I hope everyone enjoyed the session.So I think I will be concluding.Ravi Teja AI is evolving at an incredible space.The console data content concepts are much more because I feel that that going forward in my new batches also I'll be keeping a dedicated part with respect to two types of drop.One is paper drop, one is model drop.Because the things that I learn today I feel that after 3 months it is duplicated.That is the main problem.And it's really like even I have to always learn I have to do the integration.A lot of things.Okay.Even I test out any type of product that comes out.So even my spending on AI is increased in the past 5 months.I spend on a hell lot of things whether for APIs model everything small it really doesn't matter.
So the AI pricing will also increase in the next 3 months as the market is suggesting.Okay.So I think no more nobody has raised their hands.So yeah I could not get any Q&A.I think six people asked.The leaf raw Karthik behind you waiting only the latest version of the document.Right now I have a single for the same version.I'm not maintaining a version system Karthik 3.Later on if you want you can add a version control system for your documents.Recording it won't be provided.Can you get the repo already?I shared the repo.Arpan, thank you.Can you use this for kind of voice agents?Yes, you can use for this type of voice agents also.Like rag base voice agents are there easily.And right now I feel that voice agents previously 11 lakhs were there.Now through open source systems also easily you can do.
All right guys, then I think we are good for today.
That's a wrap.You've just mastered the core pillars of production grade AI agents.I want to know from you which of these frameworks are you going to implement first in your projects?Let me know in the comments below.Make sure to like this video, subscribe to the channel, and check the description for more resources.See you next time.