1 00:00:02,360 --> 00:00:02,880 Hi guys. 2 00:00:02,880 --> 00:00:03,800 Welcome to this session. 3 00:00:03,800 --> 00:00:08,280 So in this session we want to talk about ChatGPT tokens which you get to see over here. 4 00:00:08,560 --> 00:00:14,760 So tokens are you can consider like pieces of words which are being used and counted over here. 5 00:00:14,760 --> 00:00:20,800 So when you give a prompt specifically the tokens are generated and ChatGPT different versions have 6 00:00:20,800 --> 00:00:23,120 different limits token limits out there. 7 00:00:23,120 --> 00:00:33,600 For example, ChatGPT 3.5 had a token limit of 4096 tokens and ChatGPT four later on had 8000 tokens. 8 00:00:33,600 --> 00:00:38,360 And now that we have new versions of it, they are much higher number of tokens which we get over here. 9 00:00:38,560 --> 00:00:44,880 So how it works is whenever there is a prompt which you give to ChatGPT, the prompt will take some 10 00:00:44,880 --> 00:00:46,120 of the tokens from there. 11 00:00:46,120 --> 00:00:53,480 So let's say you give a really long prompt to ChatGPT 3.5, wherein it it uses up. 12 00:00:53,520 --> 00:00:57,480 Out of 4096 it uses up 4000 tokens. 13 00:00:57,480 --> 00:01:02,680 So now we are left with only 96 tokens for ChatGPT to respond back. 14 00:01:02,680 --> 00:01:10,080 So your input and ChatGPT output both are considered in the total token amount. 15 00:01:10,120 --> 00:01:11,800 The limit which we have got here. 16 00:01:11,960 --> 00:01:17,120 So that is why you might see certain times when you are having a long conversation with ChatGPT. 17 00:01:18,200 --> 00:01:23,920 At the later stage of it, the the responses might not be that accurate, might not be that sensible 18 00:01:24,200 --> 00:01:25,520 information which you are getting. 19 00:01:25,560 --> 00:01:31,320 So in such a scenario, the hack which you can think of is starting a new chat, or what you can do 20 00:01:31,320 --> 00:01:37,440 is you can go ahead and summarize the complete conversation, ask ChatGPT to summarize the whole conversation 21 00:01:37,440 --> 00:01:43,760 in a concise manner, and then copy that into a new chat and start from there again, so that you have 22 00:01:43,880 --> 00:01:46,920 the fresh number of tokens again generated for the new chat. 23 00:01:47,200 --> 00:01:54,600 So there are also different ways you can figure out how much tokens a particular prompt will will take 24 00:01:54,600 --> 00:01:55,040 up. 25 00:01:55,040 --> 00:01:59,800 So that also we have tools like a tokenizer which tool which you can use over here. 26 00:01:59,800 --> 00:02:06,360 So first let's look at how OpenAI defines tokens Uh, on their platform. 27 00:02:07,160 --> 00:02:11,240 So tokens can be thought of as pieces of words, which they have. 28 00:02:11,280 --> 00:02:16,560 So you can see one token is almost approximately equal to four characters in English. 29 00:02:16,920 --> 00:02:17,400 Okay. 30 00:02:17,440 --> 00:02:23,360 And 1 to 2 sentences becomes around approximately 30 tokens, one paragraph, approximately 100 tokens, 31 00:02:23,360 --> 00:02:24,520 and so on and so forth. 32 00:02:24,800 --> 00:02:29,840 So here you can read about the token limits, token pricing, even exploring tokens. 33 00:02:29,840 --> 00:02:34,360 So here you can see uh, every particular word gets a specific token. 34 00:02:34,360 --> 00:02:39,880 So for example my is 33666 color is 3124. 35 00:02:40,040 --> 00:02:42,280 Then red is 2266. 36 00:02:42,280 --> 00:02:45,080 Now if you look at period period is 13. 37 00:02:45,080 --> 00:02:48,080 So which is remains the same everywhere in the second one as well. 38 00:02:48,120 --> 00:02:49,720 Period is given as 13. 39 00:02:49,760 --> 00:02:58,000 However, if you look at red uh in lower cases is 2266, whereas red with uppercase is 2297. 40 00:02:58,360 --> 00:03:00,480 So like this it differs. 41 00:03:00,480 --> 00:03:05,120 And this is how uh you can see tokens are used up in our prompts. 42 00:03:05,160 --> 00:03:09,990 Now if you want to calculate, uh, a particular prompt will take up how much tokens. 43 00:03:09,990 --> 00:03:12,030 So you can use tokenizer over here. 44 00:03:22,190 --> 00:03:25,470 So you can see this particular sentence will take about seven tokens. 45 00:03:25,470 --> 00:03:26,790 Characters are 28. 46 00:03:28,310 --> 00:03:32,390 If we pick a bigger text, let's say we are picking up this big text. 47 00:03:39,790 --> 00:03:43,110 So in that case it's taking 81 tokens and characters are 371. 48 00:03:43,150 --> 00:03:44,950 Each of them have been color coded. 49 00:03:44,950 --> 00:03:46,710 Now in this manner you can understand. 50 00:03:47,230 --> 00:03:52,510 So this is the idea behind tokens which needs to be taken into consideration. 51 00:03:52,510 --> 00:03:58,350 So whenever you are using ChatGPT for different reasons, uh, keep this in mind at the back end of 52 00:03:58,350 --> 00:04:03,950 your mind, uh, so that you are aware about it and you can optimize accordingly so that you get better 53 00:04:03,950 --> 00:04:04,870 responses. 54 00:04:05,230 --> 00:04:09,790 Thank you so much, guys, for listening to this and I will see you in the next video.