Class 3 - How ChatGPT & Perplexity Work - Advanced SEO Course 2026 | Complete SEO Course 2025 — Transcript
Full transcript
- 0:00Hello everyone. This is the third class of the advanced SEO course.
- 0:03If you want to do semantic SEO, if you want to do automation for AI, or if you are interested in advanced SEO, then today's class is going to be a first step for you.
- 0:13Because in today's class, we are going to dive into the world of AI.
- 0:16In today's class, we will know how LLMs like ChatGPT work, what are transformers, which were made by Google, and how RAGs like Perplexity work.
- 0:27We will also talk about vectors and vectors embedding.
- 0:34So you should attend today's class very carefully.
- 0:38Those who have not attended the previous two classes, they should attend those classes first.
- 0:44Only then will you understand today's class.
- 0:46Students who miss any class will not be able to take full advantage of this course.
- 0:52Also, those who took the live doubt class on this Sunday, they should share their experience in the comment section.
- 0:57If you were not able to take the class live, still tell us in the comment section that you missed it.
- 1:01If you have any questions or doubts, you can ask us.
- 1:04Note down all the doubts and questions of today's class so that you can ask them on the next Sunday.
- 1:10To join the live class, you have to join the membership at an ordinary cost of Rs. 29 per month.
- 1:15You can see the method on the screen.
- 1:18Students who have already taken the membership, after completing this class, they will go to the post section at youtube.com.
- 1:26An assignment is waiting for you there.
- 1:29Whatever you are going to learn in this class, some problems have been given to you to solve on the basis of its learning.
- 1:34Solve them and test whether you have retained everything or you need to watch the class again.
- 1:40If you are not able to complete the assignment, then you should watch the class again.
- 1:44Note down all your doubts, so that you can ask me in the live doubt class on Sunday.
- 1:51Solve your doubts and retain this class well.
- 1:55Let's go to the computer screen and start today's class properly.
- 2:08Everyone must know the full form of LLMs.
- 2:10LLM means Large Language Model.
- 2:13This name is a little confusing.
- 2:15The implication is that computers somehow understand language.
- 2:22Which is not right.
- 2:23Computers do not understand language.
- 2:25Computers only understand numbers.
- 2:27They still understand numbers.
- 2:28If we want to give them the right name, then it should be Large Numbers Model.
- 2:33But every field has its own shortcoming.
- 2:35It somehow keeps itself separate from the outside world through some words.
- 2:40So, computer scientists named it as Large Language Model.
- 2:43Maybe they were motivated by this.
- 2:45They wanted to translate human language into the world of computers.
- 2:49Maybe they had this aspiration.
- 2:51But technically, computers still do not understand languages.
- 2:54For them, this is a Large Numbers Model.
- 2:57They only understand numbers.
- 2:59Before I start the explanation of LLMs,
- 3:02I need to give a clarification.
- 3:04This is not a computer science class.
- 3:06This is a class for SEOs.
- 3:08All the concepts we will study are high-level overviews.
- 3:12You will get a rough idea of how they work.
- 3:16And you will get all the information for your work.
- 3:19But again, this is not a computer science class.
- 3:21Now, you may be wondering how computers connect language and numbers.
- 3:27The method is very simple.
- 3:29Imagine that you have a very long Excel sheet.
- 3:34In that Excel sheet, you do not need to explain LLMs in ABCD.
- 3:39There is a dictionary in English language.
- 3:42In English language, there are around 10,000 words in total.
- 3:45So, it is a very big Excel sheet in which all the words are written one by one.
- 3:49Apple, ball, cat, dog, elephant.
- 3:52All such words are written.
- 3:55And a corresponding number is written in front of that word.
- 3:58That is, if there is an apple somewhere, it is 1.
- 4:00If there is a ball, it is 2.
- 4:02If there is a cat, it is 3.
- 4:03If there is a dog, it is 4.
- 4:05Similarly, when I write a word, let's say, apple, ball, cat, the computer understands it as 1, 2, 3.
- 4:13So, whenever you write 3, 2, 1 here, it means that for the computer, it will be cat, ball, apple.
- 4:20So, this is a look-up table type for LLMs.
- 4:23Now, this process may seem very lengthy to you.
- 4:26There are a lot of words like this.
- 4:28Assigning a number for each of those words and then looking at that number is a tedious task.
- 4:32Well, for us humans, yes, it is tedious.
- 4:34But for computer systems, it is not that tedious.
- 4:38So, all LLMs use a look-up table in a way.
- 4:40They use the number corresponding to any word.
- 4:44Whenever you give a prompt, that prompt is always converted into numbers.
- 4:49And those numbers go inside the LLMs' system and complete all the calculations that were going on inside.
- 4:55The output also comes in numbers.
- 4:58And then, finally, there is a system that again converts those numbers into words.
- 5:03So, whenever you ask your favorite LLM chatbot, whether it is ChatGPT or Claude or someone else, to write a blog post on Best Dentist in Delhi, it actually understands it as a sequence of numbers.
- 5:17And their internal systems, the entire blog post they write, is also a group of numbers, which is later converted into a human-readable language for you.
- 5:27So, please remove this notion that whatever you are saying,
- 5:31LLMs understand it like a language.
- 5:34They only understand numbers.
- 5:36We have understood this much.
- 5:37Now, let's come to the second step.
- 5:39Now, LLMs have three parts of training.
- 5:42The first is pre-training.
- 5:43The second is SFT.
- 5:44The third is RLHF.
- 5:47The full form of SFT is Supervised Fine Tuning.
- 5:49And RLHF means Reinforced Learning from Human Feedback.
- 5:53So, let's go through these three steps one by one.
- 5:55As you know, large language models are basically prediction engines.
- 5:59That is, whatever prompt is given to them, if a line is given to them, they have to guess the next word from that line.
- 6:05If I say, Ram goes to, now, what word is going to come before to, predicting this is the job of the LLM.
- 6:12Now, how is this prediction done?
- 6:14For this prediction, large language models are given a lot of text, a lot of text, to train themselves.
- 6:22Now, how is this training done?
- 6:23The concept of this training is very simple.
- 6:25It is a neural network.
- 6:27Just like our brain is made up of different connections of neurons, similarly, large language models are also made up of a lot of different connections.
- 6:35You can think of these connections as a flip switch.
- 6:38Like a human neuron, one neuron does not do a lot of different things.
- 6:42One neuron is sitting.
- 6:44Its job is to identify the yellow color from any scenery that is coming out of its eyes.
- 6:49So, it will sit idle all the time.
- 6:51It will not do anything.
- 6:52As soon as it sees a yellow color coming out of your eyes, it will get triggered immediately.
- 6:58See, I saw a yellow color.
- 6:59So, in the same way, all the neurons in the LLM models, which are different branches of the neural network, they are all for a specific task.
- 7:09They are activated only for that task.
- 7:11Now, when we provide text to these models in a very large volume, provide content, it divides that content into different small pieces.
- 7:21And it starts to find out the pattern.
- 7:24What is going to come after a particular word.
- 7:27Now, it is not that when the training starts, all these switches know what to do.
- 7:33They generate a loop in a way in which they guess the next word coming from any text.
- 7:39And after that, the entire training data is seen whether the guess was accurate or not.
- 7:44If the guess was accurate, then that node is considered correct.
- 7:47If it was not correct, then it is considered wrong.
- 7:49After that, another node is generated.
- 7:51So, this process is done by the computers themselves.
- 7:55They do it simultaneously.
- 7:56And then, they develop a model which generates the next word after a particular word with a little accuracy.
- 8:10So, overall, the final result model is based on the training data and whatever word it has seen before, on that basis, the next word does the work of guessing.
- 8:22And this guess is based on a lot of data.
- 8:25That is why it is around accuracy.
- 8:27So, for example, if I say a line, then some of you will be able to guess the next word of that line.
- 8:33And then Thakur killed Blank.
- 8:37Now, those who have seen the Sholay movie, they know that Thakur killed Gabbar.
- 8:42But those who have not seen the Sholay movie, they do not know.
- 8:45If you know the back story of the story, then you can successfully guess the next word.
- 8:52Technically, you have guessed it.
- 8:54But you only had the context.
- 8:56So, LLM models also generate accuracy in the same way.
- 9:00Because they have all the data of the world written in the world, all the text, all the content, all the data from the images.
- 9:09That is why they can generate the next content.
- 9:13That is why they can guess the next words.
- 9:16This does not mean that they have understood everything.
- 9:18You have not watched the entire Sholay movie.
- 9:21But you know the story overall.
- 9:23You know the context.
- 9:24That is why you can guess the next word.
- 9:27Now, this process is not unique in any way.
- 9:31It seems very okay.
- 9:33It seems like this is a very good thing.
- 9:35It is a very simple thing.
- 9:36Why wasn't it done before?
- 9:37Why were we waiting till now?
- 9:38Because the field of AI is not new.
- 9:40Let's come to a field which is n-gram.
- 9:43What does n-gram mean? n means any particular number.
- 9:47So, it is 1 gram, 2 gram, 3 gram, 4 gram, n gram.
- 9:52It is not a weighting gram.
- 9:54Let's see.
- 9:55So, let's imagine that we have a particular table where some special words are written.
- 10:00name, boy, was, school, night, coming, food, blah, blah, blah, anything, right?
- 10:04Now, if I say, what can come after name?
- 10:07What are the chances of the word name coming after name?
- 10:10You will say, it is very less.
- 10:11Name, name is not written in any sentence, right?
- 10:13So, its chance will be very less, like 0.001.
- 10:17Now, when we talk about chance here, chance means probability, percentage, chances of anything happening.
- 10:24The chances of anything happening are never 0, and never 100%, right?
- 10:29Maybe name, name is not written, name, name is not written, but after name, name can be written by mistake, right?
- 10:36So, it will not be 0% chance.
- 10:37So, whenever in this whole exercise, we will write probability or percentage in any way, it will never be 0 or 100, right?
- 10:44So, chances of name, name are very less, but chances of name coming after boy are there, right?
- 10:52Chances of name coming after was can also be some numbers, chances of name coming after school can also be some numbers, chances of name coming after night can also be some numbers, chances of name coming after coming can also be some numbers.
- 11:02That means, if we start guessing in this way, that what will come after one particular word, then it is a very impossible thing, right?
- 11:11It is very tough.
- 11:12So, what will happen if we give another word after one word?
- 11:16Like, let's come to the second example, 2 gram.
- 11:20Now, I have one word, boy, and after that, the second word is name.
- 11:25So, chances of name coming after boy are less, right?
- 11:29Chances of boy, boy coming are very less, it is 1%.
- 11:32Boy was, chances are 80%.
- 11:36Boy school, chances of school coming after boy, can there be any sentence in which school will come after boy?
- 11:42Very less chances, it can come, maybe.
- 11:44Boy night, very less chances.
- 11:46Boy coming, again, no sentence is made in which boy night is written or boy coming is written.
- 11:51So, the percentage here only tells that after any particular word, what is the percentage of chances of another word coming?
- 11:58So, if I am seeing, chances of was coming after boy,
- 12:00I have given this scoring, chances of was coming after boy are 80%.
- 12:04Because a line can be made, boy was going to school, boy was coming from school, right?
- 12:10So, if I am putting was after boy, then chances of it being correct are 80%.
- 12:15So, similarly, in this way, we have divided in probability.
- 12:18Now, here also, using this framing is very tough in itself.
- 12:22We are not getting the chance of the coming word.
- 12:24We are not getting the idea of the coming word.
- 12:26So, if we go to 3-gram, where we have two words, and the third comes in the list, what word can we use?
- 12:34So, boy was, now I have two words.
- 12:36Here, I had only one word, boy, now I have two words, boy was.
- 12:41So, boy was name, this sentence is not made, 10% chance.
- 12:45Chances of name coming, 10%.
- 12:47Boy was boy, again, chances, 10%.
- 12:50Boy was was, this sentence is also not made, 1% chance.
- 12:54But, if I see in this way, here comes an entry, chances of coming after boy was are more.
- 13:00Boy was coming from school, this sentence can be made.
- 13:04So, its chances are 80% suddenly.
- 13:06Boy was over, boy was over the top, boy was over some bridge, this kind of sentence can be made.
- 13:14Its chances are more.
- 13:15Now, we come to 4-gram, where we have three words, boy was coming,
- 13:21I have three words, now I have to guess the next word.
- 13:23Boy was coming name, this kind of sentence can't be made.
- 13:27Boy was coming boy, this sentence can't be made, 1% chance.
- 13:31Boy was coming was, this is also less.
- 13:35After this comes the word, boy was coming school, chances are, if someone has misspelled, if it is written in haste, then the school word can come, chances are 60%.
- 13:44But, if I come in this sequence, boy was coming from, chances are 90%.
- 13:50Because, boy was coming from school,
- 13:52LLM model, in its training time, boy was coming from, was coming from, this sentence must have been seen many times.
- 13:59Right? So, in this way, its probability increases here.
- 14:03So, the model starts writing, boy was coming from.
- 14:07So, here you can see, the number of times we keep giving each word, the number of times, this prediction, it becomes a little easy.
- 14:15But, this calculation has to be done again and again.
- 14:17So, if I go to chatGPT for example, and I ask, write an essay on cow.
- 14:27Here, I have given a prompt of only 4 words, 5 words, and for this, it has started predicting the word.
- 14:34The cow is a domestic animal that has been an important part of human life for thousands of years.
- 14:40That means, whenever you have to predict chatGPT for each word, its model is doing this calculation again and again out of its thousands of words.
- 14:49Now, you imagine, we imagine that how many words can be there in the English language.
- 14:54The words in the English language, the common words, are around 50,000.
- 14:59So, when this calculation has to be done for one word, then the probability that has to be checked has to be done 50,000 times.
- 15:05Because, this excel sheet, like this, so, if we consider this as the probability machine of an English language directory, consider it as a sheet here, then it will be 50,000 rows and 50,000 columns.
- 15:16Correct? So, 50,000 by 50,000.
- 15:18How much will this calculation be? 50,000 multiplied by 50,000.
- 15:26So, here it will be 25.
- 15:28And then, how many zeros will be there after this? 8.
- 15:311, 2, 3, 4, 5, 6, 7, 8.
- 15:33That means, 2.5 billion calculations.
- 15:36To calculate one word, 2.5 billion calculations have to be done.
- 15:41So, if chatGPT is writing a document of 100 words, then it will have to do 2.5 billion calculations 100 times.
- 15:47Because of this, the field of AI, of LLM, was not moving forward.
- 15:51Because, from where is so much computing power written?
- 15:53In this scene, the entry is of Transformers, which was made by Google.
- 15:58So, the Transformers model of Google, its title, the title of that research paper was,
- 16:02Attention is all you need.
- 16:05That means, when this calculation is happening here, boy was coming from school.
- 16:11Here, the calculation believes that name, or boy, or was, or school, or night, or coming, all these have the same meaning.
- 16:22Right? That's why, it tries to calculate every word in the same way.
- 16:27It tries to calculate the same probability.
- 16:29Now, the Transformers model of Google, says that, the text you have used till now, go and see that story, find out its meaning, and then, on the basis of meaning, start calculating this probability.
- 16:43So, for example, if this line is, boy was coming, then what is boy?
- 16:48Boy is a male.
- 16:50If it is a male, then what word will be used for it?
- 16:52He, not she.
- 16:54So, here, from this calculation, for she, the probability will be left to be calculated.
- 16:59So, now, one calculation is less.
- 17:01Till now, the 50,000 by 50,000 that was happening, will become 50,000 by 49,999 because, one she was removed from here.
- 17:09So, in the same way, if there is a complete dictionary of English language, then, for boy, the words that cannot be used, the female specific words, all of them will be removed.
- 17:19If in that dictionary, any word is related to flying, or is related to animal, that will also be removed.
- 17:24Because, boy was coming, if any word is related to this, then there will be no flying, there will be no animal.
- 17:30In this way, many irrelevant words are removed.
- 17:34And, by paying attention, to all the words that we have generated till now, keeping them in mind, we can save the calculation of all the remaining words.
- 17:43If it is still not clear,
- 17:44I will give a very simple example.
- 17:46I will write a line and I will not say this line.
- 17:48I will just write.
- 17:52I have just written this much.
- 17:53What will be my next word?
- 17:55What can be the next word?
- 17:57No idea?
- 17:58Okay.
- 17:59Before this,
- 18:00I will write a word.
- 18:07Now, you can answer this.
- 18:09My computer has 16 GB RAM.
- 18:12So, RAM is
- 18:14costly.
- 18:15You can write.
- 18:16Or, RAM is important.
- 18:17You can write.
- 18:18But, if my first line here would have been
- 18:22I worship
- 18:25RAM.
- 18:26So, here you would have written the next line.
- 18:28RAM is divine.
- 18:30What is the change?
- 18:31The previous line.
- 18:32Right? The line to give attention, the context you got that.
- 18:36And, you can guess the next line.
- 18:38So, the computer systems were lagging till now.
- 18:41LLM models were lagging.
- 18:42Because, they had to do a lot of calculations.
- 18:44Because, they were trying to check every word equally in the dictionary.
- 18:48Now, what do they do?
- 18:50They see the first word we got.
- 18:52In this word, what is the context?
- 18:54They understand the story.
- 18:55And then, they try to guess the next word based on that.
- 18:59That is why, the name of the research paper was Attention is all you need.
- 19:03And, this one trick reduced the resources required by the computer systems.
- 19:09It is still a lot.
- 19:10But, it reduced in comparison with the previous one.
- 19:13The billions of calculations that had to be done, came to millions.
- 19:16And, suddenly, the field of LLM increased a lot.
- 19:20So, till now, you understood how LLMs guess the word.
- 19:25And, they just guess.
- 19:27They don't understand.
- 19:28And, what has Google's
- 19:30Transformers model changed in this?
- 19:32It is very important to show you and explain to you.
- 19:35So, let me open
- 19:37ChatGPT again.
- 19:38And, I will write my prompt here.
- 19:41Write an essay on cow.
- 19:45Okay. I am going to press the enter button here.
- 19:48And, now, we will edit and slow down this process so that you can understand it well.
- 19:56So, when I press this enter button, this prompt will go where it starts writing word by word.
- 20:02This is a common misconception that as soon as you give a prompt, the chat GPT gets the full answer and it starts providing it directly.
- 20:12This is not the case.
- 20:13What happens instead is that the answer that starts coming uses the same part of the answer in prompting again.
- 20:21It might seem a little confusing.
- 20:23So, you have seen how Google's
- 20:25Transformers model works.
- 20:27Now, let's come to the point that if LLMs only guess words, how do they sound so intelligent?
- 20:33Here's a real-world example.
- 20:35When a child starts speaking, it says random words.
- 20:39Ba, ba, ba, ba, da, da, da, da.
- 20:41What is it doing?
- 20:43It is listening to the words people around it are saying.
- 20:47After listening, it just tries to say them again.
- 20:51It doesn't understand the words at that stage.
- 20:55For example, a child born in the US listens to everyone around him in English.
- 21:01A child born in India listens to everyone around him in Hindi or Kannada or Telugu.
- 21:07It doesn't understand the words it is hearing.
- 21:11It doesn't understand the grammar.
- 21:13But, it just listens to the words and tries to repeat them again.
- 21:17Now, the people around it start explaining them.
- 21:21Like, you don't have to say da, da, da.
- 21:23You have to say papa.
- 21:25People around it start explaining them.
- 21:29So, this reinforcement starts explaining to the child that,
- 21:35I don't understand the meaning of the words, but I have to say them.
- 21:39If the child wants to drink water, it starts saying, give me water.
- 21:43Before the child understands the meaning of the word, it understands its use.
- 21:47LLMs work in the same way.
- 21:49They have a system called back propagation.
- 21:53The child guesses the word and the system understands whether it is correct or not.
- 21:59If it is correct, then it is correct.
- 22:01If it is not correct, back propagation is a process that instructs the system to correct it.
- 22:09So, pre-training is a method to set these dials that tells the LLMs that it will be correct to predict this word.
- 22:19The next step is SFT or supervised fine-tuning.
- 22:23In this phase, when the LLM model is trained, it knows what to guess after one word, but it doesn't know how to answer the question.
- 22:35It only knows how to guess the words.
- 22:37So, if you question the LLM chatbots, they don't answer, they only guess.
- 22:41The process of answering is through SFT where these LLM models are given a layer, a large set of documents where the answer to the question is written.
- 22:51In this document, it is written, write an essay on cow.
- 22:57The question and answer are given in a set.
- 23:01Now, the LLM model understands that when someone asks me a specific question,
- 23:07I have to answer in this way.
- 23:09Now, it understands the question and also the answer.
- 23:13It understands the pattern of the question and answer.
- 23:17Now, it starts answering the question.
- 23:19This is supervised fine-tuning.
- 23:21The third part is reinforced learning from human feedback.
- 23:27What does this mean?
- 23:29The chatbot understands the question and the answer.
- 23:33But, if someone asks how to make a bomb, the chatbot knows how to make a bomb.
- 23:39It has all the data in the training material.
- 23:41But, it doesn't have to answer the question.
- 23:43This understanding is through the RLHF process where the chatbots have the safety settings.
- 23:51They are given an understanding of which questions can be harmful and they don't have to answer them.
- 23:57Which images can be wrong and they don't have to make them.
- 24:01This last step of the training is called
- 24:05RLHF.
- 24:07When these three processes are completed, we get an LLM model which can answer our questions, write content for us, etc.
- 24:17in the safety settings.
- 24:19Let me clarify something here.
- 24:21I feel a little guilty.
- 24:23Sometimes, I treat LLMs and ChatGPT on the same level.
- 24:27ChatGPT is not an LLM.
- 24:29LLMs are GPT-5.
- 24:31The models are LLMs.
- 24:33So, GPT-5,
- 24:35GPT-4.5, GPT-4,
- 24:37GPT-4 Nano are all LLMs.
- 24:39They are large language models.
- 24:41ChatGPT is a chatbot which is a wrapper of this LLM.
- 24:45Okay? If someone is asking if LLM is GPT-4 or GPT-5 LLM or if ChatGPT is LLM, the answer will be GPT-5 or GPT-4.
- 24:55ChatGPT is not an LLM.
- 24:57ChatGPT is an application based on LLM.
- 25:01So, we have understood how large language models work and what was the advantage of Google's Transformer system
- 25:09Now, we have to understand vector and vector embeddings to understand perplexity.
- 25:15So, let's come to vectors.
- 25:17You must have heard the saying that if there are two horses and ten elephants, what will be the result?
- 25:27Our maths teacher used to taunt us that two horses and four elephants cannot be added or subtracted because both are separate units.
- 25:35In English, there is a phrase
- 25:37Now, you can actually subtract, add, and multiply apples and oranges.
- 25:43This is the power of vectors.
- 25:45Vectors can convert any physical object, person, place, item, or any concept into maths.
- 25:55Not numbers.
- 25:57For example, we saw a sheet where apples are 1, balls are 2, cats are 3, dogs are 4.
- 26:05Correct? But vectors are not random numbers.
- 26:09Vectors are a way to divide any object based on its properties.
- 26:15It is a way to itemize so that you can convert any object into maths.
- 26:21And if any object is converted into numbers, we can add, subtract, or multiply it.
- 26:29What is the use of this?
- 26:31Let's say I ask you to divide money.
- 26:35You will say, money and stubbornness.
- 26:39But how to do it in maths?
- 26:41How to do it unsupervised?
- 26:43How to subtract SEO from a client?
- 26:45Right? Vectors are an interesting concept.
- 26:49I will try to explain it with a simple example.
- 26:53Our old students have already seen this example.
- 26:57Let's say we have a dentist.
- 26:59Now, I will divide this dentist into numbers based on its properties.
- 27:05It is a probability score.
- 27:07As I said, nothing will be 0 and nothing will be 1.
- 27:11Everything is between 0 and 1.
- 27:13So, if there is a dentist, there is a 50% chance that he will be male and 50% chance that he will be female.
- 27:21So, 0.5 male, 0.5 female.
- 27:23Dental knowledge?
- 27:25Any dentist will have a lot of dental knowledge.
- 27:27So, we give 0.9.
- 27:29Any doctor will have medical knowledge.
- 27:31So, 0.9.
- 27:33But any dentist will have very little farming knowledge.
- 27:37So, 0.1.
- 27:39Maybe there is a dentist who comes from a village.
- 27:43But he does not know anything practical.
- 27:45So, 0.1.
- 27:47Will a dentist have knowledge about weapons?
- 27:51No.
- 27:53Bravery? A dentist thinks that if a woman stands, she can be beaten.
- 27:59So, it takes bravery.
- 28:01But 0.4.
- 28:03Okay? So, this is a dentist.
- 28:07Now, let's say there is a farmer.
- 28:09A farmer.
- 28:11We start giving a score to a farmer based on these properties.
- 28:15That is, male, female, dental knowledge, medical knowledge, farming knowledge, weapons knowledge, and bravery.
- 28:23So, the chances of a farmer being a male are very high.
- 28:27There are 0.9 chances that he will be a male.
- 28:29There are also female farmers.
- 28:31Women also do agriculture, but their numbers are very low.
- 28:35So, there are 0.9 chances that he is a male farmer.
- 28:390.1 is that he is a female.
- 28:41A farmer has 0.1 dental knowledge.
- 28:43Obviously, there is no need.
- 28:45There is no scope.
- 28:47Medical knowledge will also be 0.1 because there is very little scope for a farmer to have medical knowledge.
- 28:53Agriculture knowledge will be 0.9.
- 28:55Weapons knowledge will be very little.
- 28:57Again, there are 0.1 chances.
- 28:59It looks like bravery because farmers are brave.
- 29:03It is bravery to give up your entire year's hard work with the help of the weather.
- 29:09Now, after the farmer, we see the score of the soldier.
- 29:13If there is a soldier, the chances of him being a male are very high.
- 29:17There are also female soldiers, but there are still more male soldiers.
- 29:21So, the score will be a little less in comparison to the farmer.
- 29:25There are 0.8 chances that a soldier will be a male and 0.2 chances that he will be a female.
- 29:31Dental knowledge will obviously be the minimum for a soldier.
- 29:35Medical knowledge will also be 0.1.
- 29:37Farming knowledge, many of our soldiers come from the background of the village.
- 29:43So, 0.4 is the knowledge of agriculture.
- 29:45But the knowledge of weapons will be very high because they are soldiers.
- 29:51So, 0.9 will be the knowledge of weapons.
- 29:53And bravery, obviously, if someone is a soldier, he or she is brave enough to do everything. So, the score of bravery will be 0.9.
- 30:02Now, if I write all these properties one after the other, then this becomes their vector score, right?
- 30:12That is, a dentist's vector score is 0.5, 0.5, 0.9, 0.1, 0.4.
- 30:19A farmer's score is 0.9, 0.1, 0.1, 0.9, 0.1, 0.4.
- 30:25A soldier's score is 0.8, 0.2, 0.1, 0.1, 0.4, 0.9, 0.9.
- 30:31All three numbers are different.
- 30:33Now, let's put a twist here.
- 30:35Let's say that we have a doctor with a dentist.
- 30:38Now, the chances of a doctor being male are 0.5.
- 30:42Many doctors are male, many are female.
- 30:46There is a 50-50 chance.
- 30:470.5, 0.5, male, female.
- 30:49Dental knowledge will be less than that of a dentist, but it will be there.
- 30:53Anatomical knowledge is 0.3.
- 30:56Medical knowledge is 0.9.
- 30:58Correct? Farming knowledge is 0.1.
- 31:01It will be very minimum knowledge.
- 31:02As much as the dentist knows, so much will be known.
- 31:05Then the knowledge of weapons is also less.
- 31:07Bravery is also there.
- 31:09They have as much as the dentist has.
- 31:12So, what is the vector score of a doctor? 0.5, 0.5, 0.3, 0.9, 0.1, 0.1, 0.4.
- 31:19Now, if you see, the vector score of any dentist is very different from the vector score of any farmer or soldier.
- 31:27Even if I remove it here, if I don't tell you which is the dentist, which is the doctor, which is the farmer, then you can understand just by looking at the score that these two things, they are anything, but they are close.
- 31:39They can be anything, but they are close.
- 31:42So, vectorization, vectorization means that we divide anything on the basis of its properties.
- 31:50We give its score on the basis of its properties.
- 31:53Now, here I am giving 4-5 numbers.
- 31:55This is a very simple example.
- 31:58Whenever computer models make vectors, the number here is in hundreds, it can be in thousands, because computer systems can divide anything on the basis of many elements.
- 32:09Its color, its size, its state, it can be many things.
- 32:14So, this is a vector.
- 32:16Now, what are vector embeddings?
- 32:18When a computer system, when an LLM model divides anything on the basis of its training data, scores it on the basis of different elements, different properties, then that score is called an embedding.
- 32:37It is not human-comprehensive.
- 32:39We don't understand it, but computer models understand it.
- 32:42The way I am sitting in this room, it is a three-dimensional room.
- 32:45It has a length, a width, and a height.
- 32:48There are three different dimensions in which I am living.
- 32:52You are also living in a three-dimensional world.
- 32:54Embeddings are in a multi-dimensional world, where any particular element, any dot is placed in the middle of many dimensions, and then computer models, even if they don't understand this concept, they don't know dentists, they don't know doctors, but
- 33:07when they are in the middle of all these dimensions, this is how our vector score is made here, which is an ideal, an imaginary vector score, it is in 1, 2, 3, 4, 5, 6, 7, 7 different dimensions.
- 33:19So, in this seven-dimensional world, if the vector of the dentist is here, then the doctor is also close to it.
- 33:26You can understand by looking at the number, it is very close.
- 33:29But the farmer and the soldier are completely different in the other world.
- 33:34So, by calculating this distance, by observing this distance, the computer systems, the LLM models, they understand which two concepts are close and which two concepts are completely different.
- 33:47Similarly, in the same way, if you have seen a movie on Netflix, it suggests you another movie.
- 33:54When you watch a video on YouTube, the other video also recommends you on this basis.
- 33:59It is not looking at the title description now.
- 34:01It creates an embedding on the basis of a video that has a very different concept, feature, length, how many people clicked its thumbnail, etc.
- 34:10and that embedding is thrown into a multi-dimensional world.
- 34:16And whenever you watch a video, the YouTube algorithm goes and checks which video's embedding is closest to this particular video's embedding.
- 34:25And we recommend that video.
- 34:27The same process is also used in search results, where an embedding of the question you are asking is made and the vector embeddings of all the other pages are also made and the search results are provided by measuring its closeness.
- 34:41And when we convert our user's query, or our keyword, or our pages into vectors, into embeddings and optimize them, then that is called semantic SEO.
- 34:51We will practice this process in the coming classes and then you will become a semantic SEO.
- 34:57This is the basic process of semantic SEO which we do in many steps.
- 35:02We develop tools for it, we use different scripts, but you have an idea of what is going to happen.
- 35:08Now, as I said, this is a very high-level overview.
- 35:11It is not accurate.
- 35:12You have to understand the concept.
- 35:14I am neither a computer scientist nor am I going to make you.
- 35:16So, the last topic of today's class is a rag system like perplexity.
- 35:21Rag means Retrieval Augmented Generation.
- 35:25So, these rag systems are a little unique.
- 35:28We just saw that LLM models need training.
- 35:32They consume a lot of data and train.
- 35:35Rags are one step ahead of LLM where we can update a system, a chatbot, or an LLM system without training.
- 35:47There is no need for training again.
- 35:49So, there is a basic model that has been trained.
- 35:52We provide a little bit of new information to it and it can use the new information and provide an answer based on the old understanding.
- 36:00It can update itself.
- 36:02So, Retrieval Augmented Generation, RAG.
- 36:06Perplexity is also a type of RAG, but this is a different type of RAG.
- 36:11There are two types of RAG.
- 36:13One is where data is provided in a static way.
- 36:16So, let's say there was an LLM like chatGPT.
- 36:19We gave it a little more document that has been updated in the last 8-10 months.
- 36:24The new literature that has been made, the new progress that has been made, the news that has come, we gave it all.
- 36:29So, we provided it in a static way once.
- 36:32This is a static RAG.
- 36:33The second is a real-time RAG in which the computer system provides the answer in real-time by using web search.
- 36:41So, when you ask a question with perplexity, then perplexity gives you the answer by searching from the website in real-time.
- 36:48So, this will be a real-time RAG.
- 36:50Now, let's look at the diagram once to see how this RAG works.
- 36:54Each RAG has two parts.
- 36:56The first part is at the top, and the second part is at the bottom, and they are connected to each other.
- 37:01So, let's start understanding this in one way.
- 37:04The first part converts the training data into a vector database.
- 37:10So, let's say a lot of documents were provided.
- 37:14There were a lot of documents that were given to this RAG system.
- 37:18What did it do?
- 37:19It broke down the content of the document into small parts.
- 37:27There was a whole page, and it was broken down into paragraphs.
- 37:30After this, the paragraphs, the chunks of text, are given to an embedding generation model.
- 37:36That is, the model that takes out each word from any text and converts it into vector embeddings.
- 37:43So, as I said a while ago, computer systems generate vector embeddings on their own, on the basis of their own training.
- 37:51So, this is a model that generated embeddings from this text chunk and stored them in a vector database.
- 37:57There was a vector database where all these embeddings were stored.
- 38:01Now, a user comes.
- 38:03What does that user do?
- 38:04He asks a question.
- 38:06You went to Perplexity and asked a question.
- 38:08So, this question, first, the embeddings are taken out of this question.
- 38:13The word of this question is converted into embeddings.
- 38:17Right? Now, the task of converting the embeddings can be done by another model.
- 38:22Along with this, the other embedding generation model that used to be there, can also be done by this.
- 38:27Both can be done.
- 38:28There is no problem in both.
- 38:29It depends on how the system was made.
- 38:32To make it easy, we made the embedding model separately.
- 38:35This embedding model, the query, took out different embeddings from it.
- 38:41And then, another system, which works as a query embedding, that is, the question is divided into different embeddings, but a proper question is made out of it.
- 38:50Now, after this, this query goes to the vector database.
- 38:54That is, it wants to see what are the related clues related to the embeddings that I have in the question in the database.
- 39:03Along with this, from here, from this query embedding, a live search function is also done.
- 39:10That is, when you question with perplexity, that question is converted into a query embedding.
- 39:15And then, it is sent to two places.
- 39:18One goes to its own vector database, which is its own vector database.
- 39:22And it decides there whether I have data related to this question or not.
- 39:28Whatever data is there, it comes from the vector database to this LLM engine.
- 39:32Similarly, at the same time, a live search is also initiated from the query embedding.
- 39:37Now, this is perplexity.
- 39:39Perplexity brings you real-time results.
- 39:41You think, this is a very good answer.
- 39:43But here, the answer to a question has not yet been found.
- 39:45Perplexity.
- 39:46I tried to search a lot.
- 39:47If you find it, then tell me.
- 39:49After all, where is this search?
- 39:51Because, where is the search done?
- 39:53It is done on some search engine.
- 39:54Perplexity does not have a search engine.
- 39:56Right? So, I tried to find out whether Bing has it or not.
- 40:00Is there any such system that is loaning Perplexity, is Perplexity using Bing search engine, is it using Yandex, is it using Baidu, because it is not using Google, Google is a killer.
- 40:11But Perplexity talks about sophisticated AI search in its document, but where are you searching that AI search, there should be an index to search.
- 40:22If I search, give me the latest news about Delhi, then do you visit all the news websites related to Delhi at once?
- 40:28This does not happen, or it is that Perplexity has a list of authoritative websites on a particular topic.
- 40:34Whenever there is any search related to those topics, it only visits those websites.
- 40:39But it is not like that, because the answer is also taken from new websites.
- 40:43So here it is a little gray area, but I leave this question, because I am not talking about Perplexity, I am talking about the RAG system, which is like Perplexity.
- 40:51So whatever system will be like Perplexity, it will send the query to its vector database, which is made of its own data.
- 41:00The data is changed to chunk, the chunk is converted to embedding, and the embedding is stored in the vector database, from where a level of search is done.
- 41:08A second level of search is done, it is a live search, it can use a search engine, it can use a search provider API, like SERP API, or Data for SEO, or HANDS data.
- 41:19From anywhere, it pulls a live search in some way, or it goes to the website, visits it, and gets the data from there.
- 41:26And both of those outputs are sent to an LLM model.
- 41:32Now there are three inputs on this LLM model, not two.
- 41:35The first one is the vector database.
- 41:37Let me zoom out a little, so that you can understand better.
- 41:40So this LLM model has three things.
- 41:43One is coming from the vector database, which has storage in the database, content.
- 41:48What were the related chunks sent by the query embedding?
- 41:54The second is the data coming from the live search.
- 41:56And the third query also came to the LLM.
- 41:59You will see that in Perplexity, there are many options to select different models.
- 42:04You can use JGPT 5, you can use Cloud, you can use Gemini.
- 42:09Where is it used? It is used here.
- 42:11This is the stage where you change the model.
- 42:15So their database is not changing.
- 42:16Their database is the same.
- 42:17Whatever information comes, it will be the same.
- 42:20It will be equal, whether you use JGPT or Gemini, whatever you use.
- 42:24The data coming from the live search will also be the same.
- 42:26But understanding the query and matching the data coming from the understood query, and generating the right text answer, that is the job of this LLM node.
- 42:38So this LLM node looks at the coming question, looks at the information, combines both, and then gives an answer, which is given to the user.
- 42:49So if we want to optimize for a system like Perplexity, what do we have to do?
- 42:53The search feature is also here.
- 42:55This search is also here.
- 42:57Now this search is happening from which system, Perplexity is not telling.
- 43:00But we can guess how many search engines are present in the world, which are crawling all the internet.
- 43:06Either it is Google, or it is Bing, or it is something like Baidu or Yandex.
- 43:11Yandex does not crawl so many websites.
- 43:13But whatever is possible, they are using the SEMrush bot.
- 43:16It is possible that they are using the HRFs.
- 43:18They must be using something.
- 43:19But someone should use the search engine.
- 43:21They are using something for the search.
- 43:22It is also possible that Perplexity has developed its own internal search engine, which they are using, but they are not using it for the general, normal public.
- 43:30That is why they are not telling us.
- 43:31Whatever it is, but there has to be a system, search engine, or search API provider, which brings them real-time results.
- 43:39If they are using a system like SERP API, then the query is given to the API, that this is my question.
- 43:46In return, bring me the answer.
- 43:47Where do they bring it from?
- 43:48That is the job of the API.
- 43:50So, in the backend, Perplexity is also using a particular type of search engine.
- 43:55It is using a particular type of search engine.
- 43:57The search engine is wrong.
- 43:59Now, I hope that they are using a Google system.
- 44:01Because if they use Bing, then the quality of Bing search results is still bad.
- 44:05No matter how much you hate Google, but if you compare it with Bing search results, then the difference is still there.
- 44:11Here, a differentiating factor happens.
- 44:14When you do a query, the query is not understood by normal keywords.
- 44:18There is a model, which extracts embeddings, understands your query in a better way, and gives you answers from the database and live search.
- 44:26And then, there is another LLM model, which gives you answers on the database.
- 44:32So, in RAG or Perplexity, you like the quality of the answer, because there is a system, which understands your question very well.
- 44:39You don't know what to ask, but it knows how to increase or improve the user question.
- 44:44Then, the data that is extracted, it doesn't just give you a link, but it combines all your answers, and without any effort, it extracts the answer.
- 44:56That's why you like it.
- 44:58In the time of Google, you had to visit all the 10 pages, then you had to understand, and the quality of the answer depends on your understanding.
- 45:05That's why, some people will like a system like Perplexity, who don't have a good habit of reading search or documents, and extracting answers from them.
- 45:12Some people won't like it, because they already have the experience of working in search.
- 45:17So, when we understand the use cases of users for Perplexity, we have to see how aware our audience is.
- 45:26There will be some special industries, whose users will like the answers of Perplexity, and some users won't like it.
- 45:32There is a makeup site, maybe the consumers will like the answers of Perplexity, and the visitors and readers of neuroscientists won't like it.
- 45:40So, this is a personalized answer, whose quality is perceived.
- 45:44But, after today's class,
- 45:46I hope you won't have any confusion about LLMs,
- 45:48Vector, Vector Embedding,
- 45:49Google's Transfer Models, and RAG, which is based on systems like Perplexity.
- 45:55I know this is too much.
- 45:57I know I have tried to simplify things a lot.
- 46:00Maybe some people may find some concepts tough.
- 46:02Maybe some people may find it very watered down, but this is the midway, in which everyone has to catch up once.
- 46:08If you have more information than this, it's a good thing.
- 46:11The upcoming classes will be easier for you.
- 46:13If you find it difficult, please watch it 2-3 times.
- 46:16It's not a big deal.
- 46:17Consider it as a re-watch of the episode.
- 46:18The channel's watch time will increase.
- 46:20Correct? But whatever it is, try to understand these concepts, so that you can better understand the upcoming classes.
- 46:28And this was a high-level overview of LLM, RAG, and Google's Transformers model, which is very important for SEOs, Digital Marketers.
- 46:36Now, if you have already taken a membership, the class is not yet over for you.
- 46:40You should go to the post section, where an exercise is waiting for you.
- 46:45Complete that assignment.
- 46:47And then you can consider today's class complete.
- 46:50And if you haven't taken a membership yet, then what are you waiting for?
- 46:54It's just a question of Rs. 29.
- 46:56You have to take a membership.
- 46:57And in the next live doubt class, which will be on Sunday, you have to meet me, ask your questions, clear your doubts, and move your career forward.
- 47:06Now, this was the third class of this course.
- 47:08I hope you found this class very useful.
- 47:10I hope you enjoyed it.
- 47:11Whatever you felt, tell me in the comment section.
- 47:13In the next class, which is the fourth class, we will dive into the Google Search Console.
- 47:17The basic students, who are just starting out in SEO, will get to learn how to use the Google Search Console.
- 47:25You will get to know what the Google Search Console is, what its superpowers are, how you can connect your website with it, etc.
- 47:31And those who are already experienced SEOs, who have been using the Google Search Console for a long time,
- 47:36I promise, you will definitely get at least 10 things, which you haven't seen in the Google Search Console yet.
- 47:42You will get to learn different ways of using the Google Search Console.
- 47:46I work with different types of industries' websites.
- 47:49There are news websites, e-com websites, business sites, and all these types of different websites have their own challenges, which they face in the Google Search Console.
- 47:58And how they solve those practical challenges, we will see all of that in the Google Search Console.
- 48:03The Google Search Console is the primary tool of any SEO.
- 48:06You don't have to use SEMrush, you don't have to use Ahrefs, you don't have to use any API, you don't have to go to the end-to-end, but if you know the Google Search Console well, no one can leave you behind.
- 48:15So, we will start the practical class of the Google Search Console, in which we will get to know this tool, this useful, basic, first principle tool, in the same way as you know the back part of your right hand.
- 48:26So, let's meet in the fourth class, where we will learn the Google Search Console from A to Z.
- 48:30Until then, keep attending the classes, keep making notes, and keep asking questions in the live classes.
- 48:35Thank you so much for attending this class.
- 48:36My name is Amit.
About this transcript
This page contains the full transcript of Class 3 - How ChatGPT & Perplexity Work - Advanced SEO Course 2026 | Complete SEO Course 2025 by Amit Tiwari, generated from the public captions YouTube serves with the video. The transcript has 8,167 words across 705 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.