ChatGPT Chain-of-Thought Prompt Explained - LLM Chain of Thoughts for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
have heard before that large language models especially models like chart GPT cannot do reasoning very well this is a complaint that a lot of people have been telling about chat GPT gpt3 and other large language models but I'm going to offer you a solution called chain of thoughts so this is called chain of thoughts so I'm going to show you how you can use this concept called chain of thoughts and then you can ask a large language model a question with some reasoning that's what we call chain of thoughts and it can solve the same problem which it could not before so I'm going to give you an example first the first example is let's say we are asked chat GPT take the last letters of the words in Lady Gaga and concatenate them so as a human being you know the first word is Lady and the second word is Gaga and the first the last letter of the first word is Lay Y and the last letter of the second word is a so what would be the output the output would be yeah Y and a but what does the charge GPT do charge GPT thinks that it would be AGA Gaga something so it it did not understand what we exactly asked so now if this is the kind of problem that you want to solve and you want to solve using chart GPT then we are going to give chain of thoughts an intermediate step with some reasoning and explanation that can educate the large language model to solve so what are we going to do we're going to give an example we're going to tell charge apt the take the last letters of the words the same thing like exactly the same thing that you just give in the first case you just gave the question and you expected an answer which was wrong in the second case you are going to introduce chain of thoughts now this is your input question now this is where you are going to give the Chain of Thought and then based on the Chain of Thought you are going to give your actual question now let's start again so I've given that there is a question here and for that I am actually explaining charging PT that what should be the answer so I'm saying last letter of ladies y then the last letter of Gaga is a concatenating them is y a so the answer is yeah and then I'm asking my actual question so I'm saying take the last letters of the words in New Delhi and Concord coordinate them and then it exactly does what I wanted to do the last letter of new is W the last letter of daily is I and concatenating them is we and the answer is V and I can go on and ask more of this again I can give the same question I can ask you to do Lady Gaga or I can I can probably ask another question I can say take the last letter of the words uh let's say you for what does new or lens or lens and I can send it send this and then you can see what it does it says last letter of new is W the last letter of audience is s so it does ws and this is not only for this case so chain of thoughts work really good for math reasoning for logical reasoning and lot of other cases for example if you want charge APD to count something let's say you wanted to do a simple math problem you can say one little coder had 10 apples and he ate two of them how many apples did he finally have now most likely chargpt would give you the right answer because recently they have improved the math capability but if it does not have that math capability instead of now simply giving the question and then expecting an answer what you can do is you can give an example so I can say Q question I can give this question but instead of one little quota I can I can say this guy had 10 apples and he had two of them and in the answer you can describe he initially initially initially had 10 apples out of that he ate two that means 10 minus 2 that is equal to 8 so he had eight apples eight is the answer and then you ask your next question you ask the actual question that you want to ask so you can say one little coder had 100 computers out of that he through 10 computers he gave another 10 to his friends how many computers did he finally have now you can ask this question and then see what it does so what I just did is exactly what Chain of Thought is so we say 10 computers were there he threw 10 so 10 minus 10 100 minus 10 is 90 and daughter that he gave 100 90 minus 10 and then you have 80. so finally one little quota had 80 computers and this is exactly what Chain of Thought is supposed to be instead of letting the large language model directly figure out what to do instead of it giving you the one liner answer you are actually asking the chat GPT a large language model with an example this is a few short prompt example where you can give a typical question like the question that you're going to ask also instead of just expecting a dancer you can give a Chain of Thought the intermediate reasoning that will educate the large language model you are not fine tuning here you're not going to give a human feedback to the reinforcement learning this is not rlhf this is not fine-tuned this is nothing this is just with the prompt enter itself you can add this Chain of Thought which will help the large language model like in this case LGBT to do math reasoning logical reasoning a lot more other tasks really well in the way humans would do without you having to fine-tune all those things this was one of the prompt engineering techniques that is gaining popularity so I wanted to make this video and explaining how you can do chain of thoughts if you have any questions let me know in the comment section or if you have your own version of chain of thought that you have been using please let me know in the comment section otherwise I was I hope this was helpful to you in learning what is chain of thoughts how you can do chain of thoughts with large language models like chat GPT to improve the reasoning and I will see you in the next video Happy prompting
Info
Channel: 1littlecoder
Views: 13,247
Rating: undefined out of 5
Keywords:
Id: b210W3JWOxw
Channel Id: undefined
Length: 6min 29sec (389 seconds)
Published: Sat Feb 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.