Transcript for:
ChatGPT Overview and Usage

okay so today we are going to look at uh title introduction to chat gbt uh first of all I'm Danny from the Department of petronics and biomedical engineering from the Leong Chen faculty of engineering and science So today we're going to look into uh what is chbt understanding the architecture of uh chbt then we are going to look into some prompting tasks uh with JB then we are going to go through some of the capabilities for jbt uh then we'll proceed to some live demonstration on how to use and uh on jity and we will conclude with uh the best practices that we should follow when we are using uh chity as a summary so we are going to start with the first thing uh first thing what is chck GPT so chck GPT is a language model that is developed by open Ai and it is a subset of the GPT uh what we call as general generative betain Transformer series these are specifically tuned for conversational Tas so unlike models that you have seen like translation or summarization chbt is optimized to engage in dialogues so this model itself right it has been trained with the wise amount of text you know there are a lot of text in the web itself that are used to train this model because of the large amount of data the response that are generated are coherent conceptually relevant and often indistinguishable from something that a human might say so one thing to remember over here is uh CH GB doesn't have a memory of past interaction or any sets of predefined database of answer it is actually generating responses B based on your input or what we call prom that it receive so every time when you interact with uh chb it is actually a dynamic interaction so let's look at the origin of uh chbd so if you look at the history itself uh sh gbt lineage can be tracked to trace back to the original uh GPT model that is developed by open AI so this is actually a revolutionary step in the world of AI because uh before this there's no coherent way for AI to be able to generate a paragraph of uh Tex so if you look into the history itself um in 218 gpt1 was developed um it is still in a research State at uh 20118 and gbt2 was actually developed in 20119 uh it is only by gpt3 uh I think 202 where it is it actually took the World by storm with uh 175 billion parameters it actually showcased unpresented ability to understand context and able to generate creative content and it can even hold in certain programming languages I think this year 2023 we actually have the GPT 4 model which is much more uh you know complete compared to what we have previously so later on in the demonstration uh I will actually show some of the capabilities of uh gbd4 so with the advisement of the you know the gbd series so open air actually saw the potential for conversation so they actually fine tune the GPT models on conversational data and thus check GPT was bought so if you look into the recent uh updates and recent publication from open AI itself uh they are still continuously refining and also expanding the capabilities of chbt uh currently the incorporating feedback from users so if you are actually using the uh website continuously you you can actually help them to rate you know whether this uh prom and the feedback is good or bad and it also started to addressing all the biases and enhancing the safety and reliability of the system itself so this is uh the link uh if you are trying to access to chat gbt you can use the link to access once you have created account you will see the screen on your right so it's a chat area that you can actually talk to chat GPT so if we break down the area itself uh in the middle the white main area is actually your main chat area uh at the bottom there a input to box uh to by itself and you can actually type in your prompt when you first launch the website you will see four squares over there those are example prompts so you can actually take uh you know try to actually use uh any one of it to see what other responses so before we move into prompting and also the examples and capabilities uh let us understand the architecture a bit so for this part this will be a bit uh technical but uh I'll try to explain it in uh lanton so that uh you know everyone can try to appreciate what is behind the architecture of TP so the backbone of uh GPD model is actually Transformer architecture um it was in a paper by was Swani at Al called attention is all you need so it is a paper in 20117 uh by a group of uh Google researcher so it actually revolutionized the field of uh natural language processing by providing a efficient way to handle sequential data without relying on recurrent layers so at the heart of this Transformer is the attention mechanism which allow the model to focus on different parts of the input Tex when producing the output this self attention mechanism um lets each word in the input looks at every other word so it is highly effective in understanding the context and relation due to this uh attention mechanism so while foundationally the architecture uh is similar chbt is fine tuned like what I've St before is fine tune for conversational task so it is more adapt in understanding prompts in the dialogue context so this actually help it to generate a response that feels natural in the conversation so if we look into chbt by itself um it actually have superwise fight your name it means that that's a person that look at the output itself so after being pre-trained on the wise amount of tax CH GPT actually under goes supervised fine tuning where it is trained specifically on conversational data shet to refine it performance in dialog scenarios it's also have reinforced learning so open air have also uh experimented with different way and different techniques and using different type of feedbacks to further improve his uh model response so there's so one thing I think initially at the JT 2 or G3 they are possibly where um there are harmful or buyers content accelerated so over time over the past two years you know recognizing this PO racek open AI also have implemented a lot of safety measure into J gbt so they have techniques to reduce biases and to prevent model from generating harmful content this is to ensure that we as the user can get more reliable outputs so next thing we are going to look at uh prompting with CH gbt so prompting is act of uh giving CH GT a context input know as a prompt so in the dialogue it means that I'm the person that talking to check GPT so I'm giving a prompt so it is this is a primary way where users communicate with the model so unlike traditional software where you have you know fixed output give the input chb can produce different type of responses based on the prom itself so it is important to note you know uh one thing this is the second time I'm actually uh reminding this uh chat GPD doesn't remember past interaction each prom is treated in isolation so this also ensure your user privacy itself so the quality of response actually depends on your prompting so the clarity and specificity of the prompt greatly influence the quality of chb response a weight prompt will give you a generic answer a precise prompt can actually give you a detailed and relevant reply so it is important to guide the model while it is very powerful you know there is a possibility that you'll get something wrong so effective prompting can steer the model towards the desired output especially in complex ornoy scenario so we're going to look into three methods of prompting so the first one is zero shot prompting so in zero shot prompting the model is even a task or question without prior example or context so it is expected to understand what is given and then respond based on the prom solely so this is useful for example when you want to see the model default Behavior or you know when you're unsure how to guide the model with example so for example you ask chb translate the following English sentence to French so for example hello how are you we Pro providing any prior translation examples F shot prompting you know this the next method it involve providing the model with a few example to guide his respon by seeing how similar tasks are handled in example the model can better infer the desired output for the new PR this is particularly useful when dealing with task that have a specific format or when you want to give the Model Behavior in a particular direction so example the same example we have English to French but instead of just asking it to translate you can actually guide the model for example you can also put in you know for example good morning equals to French bonjo uh English thank you French mer so then you will ask it to translate the sentence itself so this is one of uh the example the next one is actually on Chain of Thought prompting so Chain of Thought prompting you build up a series of prompt and response with each subsequent prom bus upon the previous respon so it is a way to have a more extended interaction with the model and guide it through the line of reasoning exploration so this technique is beneficial when you have a complex task and a multi-step process you know where you want to explore the topic so for example you know you can start with a prom what is photosynthesis after re receiving the response you might follow up you know how do plants obtain the carbon dioxide they need for photosynthesis so you form a chain so and with the chain itself you know the answer that's given by chbt will be actually following the chain that you provided so next thing we are going to look into some capabilities of uh chat GPT itself so uh you know why it lock in this is the screen that you're going to see so we are going to look into the capabilities for chpt so the first one or once you registered and uh if you are not a premium user uh you only have access to gbd 3.5 as of now so this example I click on you know show me a Cod snippet you can see it actually generate an example respon you know this is an example of how you create uh simple web page so the next one is you know in terms of concept we are going to look at how chbd can created something that's uh lck programming something that is uh creative so this one is arade game concept so once you click on the arame concept itself you can see that you know it is trying to to come up with five different concept for Retro Gaming itself you can see it give all the description for the game itself with the game title so I think one of the biggest uh questions that I get in all of my leure and all my talks is what is the difference between gbd4 and gbt 3.5 so I'm giving it the same problem uh come up with five concepts for rro S AR game so let's look at the response from the model itself so you can see here compared to GB 3.5 it actually give you a more indepth response given the same prom itself so this actually helps you to fine tune uh because the number of parameters in gbd4 is actually larger than gbd3 so it actually have uh you know more information and it is able to respond to you uh longer also so um you can see these are the five different concepts that are generated with the settings the objective and also the game play itself um next is another thing this is uh some of demonstration that I did for you know organizing data from captured uh OCR or optical character recognition so on the left itself is one of the uh data that I have for you know invoice in Malaysia so we can actually ask jbd for example here to summarize it in the table so you can see in in the video itself you know given a jum up data it can actually output the uh arrange data in the table for once I requested it to do then um for gbd4 itself uh there's a capability for the model to use plin so if you have access to it you can actually look at the different type of plins so um I demonstrate one pluging over here this is what we call the chart pluging so uh this data is about the car brand in Malaysia itself obtained from the uh Malaysia government statistic website so over here once I put the data a I can ask chib to create a pie shot based on the data that provided it will take some time to generate diagram because it need to communicate with third party plugins but once the communication is done it will actually display the py chart so over here you can see that uh given the input it can help you to draw charts so to further from here you know what if I'm trying to write uh news article so for example I can put in a lot of description uh remember just now we talk about the Chain of Thought So I actually base on the pie chart itself and I put in um you know where is the source what is the desription so and I asked it to create something so context here is given this data is obtained from the website data. gov.ny so and also I give it some of the explanation of uh you know what is the data about and you know I ask can you help me to prepare an article you know in the style of pieces inside the online article that is the task itself so once it give the task it can actually generate you know the English version of the article itself so I've also asked it to translate to different language because in in Malaysia itself uh we have news in English Malay and also Chinese so in a way you know jbd can assist you and can help you when you are doing that so let's move on to the demonstration so for now we are going to look at the live demonstration for chity so once you have actually uh log in to chity you will be able to see this screen itself on the left side is the chat history so if you have uh chat history you will actually see it on the left side of the screen over here so it depends on your subscription you will either have gbd 3.5 or access to gbd4 so if you are not a CL member you won't have access to the gbd4 so let's start with um gbd 3.5 over here so if you notice uh you know these four buttons is the four buttons that I've shown in the capability just now these are example that they provided for you uh if you are actually trying to use it so the basic to start with is to type in your promt within this message box below so for example if I want to know something so can you list L all the states in my here so this is s of like asking a question so these are things that you know you can actually prompt so what we call zero short prompting over here you can actually give it you know a list and it will tell you you know what it knows so if you see over here the latest you know the last knowledge update is by 2021 um it means that this model only have an train on data that's up to September 2021 so it would know anything that is happening after 2021 unless you specifically provide the information to it so you know this are the information uh Malaysia that's 13 states and three Federal territory so it also give you some disclaimer over here you know please not that political boundaries can change over time so it is good idea to verify this information so these are safety features that you know uh OPI have built into the jity itself so this will help you you know to Prock the information that you obtain so once you have uh started with the chat you can see on the site itself the history uh of you know of this shat is is actually listed over there so if you need to access this again you can actually look at the states list over here you know Malaysia State list you click on it it will come back to thisis thing so I'll start a new chat and I'll try to give it a bit more context so um our previous question is can you list down the state in Malaysia so for example I need do something more specific can you list out all the states in Malaysia in the order of L Mass so it will actually lease it you know according to land mass from largest to smallest so this way you know giving it more context it can actually help you you know to get an output which is slightly different so now there's one thing over here uh remember just now we say that you know all the interaction is independent so if I click on regenerate response so you can see the wordings that they use is slightly different so for the first one you see that it tells that here's the least of the states in Malaysia but the second prom here is a list of the 13 states in Malaysia so every time it actually when you click response every interaction is dynamic so you it as of now um there's always a chance to get the same respon but as of now I have not gotten the same response you know given the same Pro so unless you tell the change to only respond with one word then there might be possibility of having the same response but you know for normal interaction you won't be getting that and if you notice over here uh we have one of the inputs over here is we are looking at you know uh the pr below you can see that that's asking you whether this was better or worse so this is a way where we as user can Le help out with getting you know improving the model itself so I can tell that this is actually better this is worse so jbt can actually you know uh use all these responses and try to improve their model later on so let me just close this one now next thing uh that I show is actually the Chain of Thought so for example once you know uh the list of states by land mass then the next thing I can actually ask about it is um you know for example with this data can you write a short article about the three largest state in Malaysia so so you know it will come up with the three information over here so the states uh three state s Sabah bah so and it will actually give you informations you know about the three states over here now one thing about all this information uh it is important for you to cross check the data to ensure that all information uh within what is actually generated here is relevant so this is more on facts so let's move on to another example where it it is more in the creative term because in in terms of creativity you know you can write anything you want so for example I can ask CH to write a story about a person sealing through the trites of malaka so it can create a story itself so I think uh this is one of the general use case um you know within kgbt itself I think a lot of people have uh started to publish you know book with uh changity as is whole water so you can find lot books like that in in Amazon itself so you can see that this are the you know story and things like that um another use case for you know changity is in terms of programming so for example uh I can ask it how to create a web page using HTML and CSS so you know it will guide you and it will give you some of the basic code Snippets how how to do it so it will give you a step-by-step guides with all the information that is needed over here um one thing uh for usage of jbd is that is a way to set custom instruction so custom instruction over here allows you to customize it in interaction uh with chat gbt and it actually provides specific details and guidelines for your chat itself so uh one thing to note it only take effect into new chats you created ising chat will be updated so they're okay so for example you know what you like to know what you like jity to know about you so for example I can say that I am a programmer and software WR uh working on websites so you know how how you want them to response be concise spanic error be concise and always program in typescript which is uh language in uh programming itself so I save this I start a new chat so I can ask it to create an example of response to a button click in a web page so if you notice over here when I asked it to you know create this example it bu St away use T scrip as a response so let me remove the custom instruction and I save it I'll use back the same prompt and start with a new chat so over here you'll notice that you know without giving it a context it actually reply in JavaScript because that is a more uh common language that is used for webbased programming instead of the Tex strip example over here because in this example I'm actually asking it specifically to do something so I give the context over here so the custom instruction over here actually drive whatever the the response is so and telling it to be concise you can see that the response is shorter compared to the response that I get you know for this if I regenerate this you know you can see that it's still taking in the information that I provided before so this is something to take note Uh custom instruction is something that's very powerful and if properly used it can actually help you to create a very concise response so let's move on to another thing uh we are going to look at chpt 4 so if you notice here you can say that um the most capable model cre for task that require creativity advice reasoning uh but as of now there's a cap of uh 50 message every 3 hours so you can't really use it you know a lot so uh it's only as available as to plus user but you have all the information below uh and all the extra features over here so you can actually access the internet with B so uh with the chat itself it can actually access you know the internet so you will be able to get up toate information so for example I use same prong over here let me see whether it will actually get the information can you L the yeah ination so for this one there's web browsing capabilities but it will take some time to to actually search for information uh before it actually come back to you so if you notice over here uh chbt is started to browsing the web over here with the question is actually reading the Wikipedia pages so you can see the information over here is clicking is browsing is looking at information so it actually shows you you know what are the steps that the model is actually taking to achieve your result so essentially it it works sort of like you know your chain of thought so but it for this you don't need to promit directly it is actually done automatically so but always uh double check the information if you notices now it actually went to the states uh in the US so I can see it is scrolling Pages uh browsing so for web based searching it will take some time so for this one uh you know you need to wait until the browsing is completed so let's wait for a while so now we can see it finished browsing and it actually give you all the information over here so you can see that you know based on the latest information available States in Malaysia are listed below in descending order of their land M so let's look at the result so if you notice over here uh there are some missing information so you need to always cross check the data itself so this uh based on the information itself see so if you look at the list that's provided over here uh B9 is actually missing so when you use uh chity is relevant for you to always H check the data because you know one state is actually missing within the list over here so okay let's continue with h for itself so it also have access to Advan uh data analysis so this one it actually help me to write script to analyze things so I won't go in depth on this but the next thing I'm going to show is actually on the plugin itself so this is a way where you can actually generate slides with the information that provided or you can create diagrams they are different buckets like uh for example interaction with BDF you know asking uh about any code you know asking about PDF so different diagrams um document maker uh that's Earthling so you can notice there's a lot of pluging that you can try over here so let me just get an example for one so diagram so I'll use back the example that's provided you know previously which is on the land mass yeah just take note there's one less land mass over here Val less Bas it here so I can actually ask okay sorry so these are the data so this is the context itself and you will try to create because I've enabled the plugin to create uh charts so it will use this data to create a chart itself so if you notice I have to run two chat for this because on the previous chat I have enabled the web browsing plugin and um all these plugins are mutually exclusive so I can I label both uh as of now I can't enail both web browsing and also the sh plugin um maybe later on there might be update so it is relevant for us to always stay updated with the offerings uh from openi itself so you will take some time for the chart generation so you can notice that this is the request let's wait for the chart to be created Okay so once uh the chart is generated so you will be able to see the graph over here so these are the bu charts that is generated so actually once you have like for example fac with an error over here you can actually ask it uh you know it seems that be is H see the this and you add it in so you can see over here you know once you tell that you know something is missing you will actually notice it and add it in um just to take note because all this actually depends on the information that you have provided and the context you have provided so you know this it is very important for you to cross check all the information even all the numbers that you see uh trust it 100% always do a double checking to ensure that whatever information that you obtain is proper and true so basically that would cover all the live demonstration I have for chbd 3.5 and also chbd 4 so next thing we are going to look at the limitations on chbt so if you see early on in the introduction we did say that is powerful but it is not infallible so it means that there is a possibility that something might go wrong uh based on the article this is a gbd4 technical report published by open AI itself so that is a possibility that generative model can suffer from hallucination so it might provide you with fake data so it has limited context window and it does not learn from experi this is something we always need to remember it does not learn from experience itself so some you know prominent case of AI hallucination I think this is one of the law cases uh in US itself where a lawyer actually edity to generate the uh case report and there is a possibility that fake references are generated so this is one of the limitation that we need to remember when we are using CH GPT um although they are improve in the values like uh the score itself of J GPT answering certain exams uh if you can notice over here GT GPD 4 is actually doing very well you know given the score it is not 100% so when it is not 100% there would be a chance of getting error so same thing over here if you notice across different Fields it is not 100% so GPD 3.5 is slightly lower than gbd4 but GT4 average is around maybe 75% so you need to make sure uh whatever data or whatever facts that you receive from the output you must cross check all of them so when we talk about things such as Shin or thought promting if you have the facts do provide the facts into JB as a prompt so that way you can reduce the possibility of getting fake responses so uh at the end you know we are going to recap and we are going to look at the best practices that we should follow so that you know we can use uh chbt efficiently I think those we need to be specific instead of you know just tell me you know tell me about dogs you might want to say provide information about the dietary habits of golden Ral you use Clear languages you know avoid jaggon or overly complex sentence structure unless it is necessary for the context and provide context especially for noces or complex quaries giving this background information can actually help the model generate a more accurate response don't use ambiguous term so for example if you use the term Apple it can be the fruit or the te company so phrases that can be interpreted in multiple ways right can lead to Val response so don't use ambigu them if needed provide more context you know this apple the tech company do not overestimate the model it is powerful it's not infallible so it might not always grabs the context unless especially provided so lastly in handling ambul quiry try to refas your quiry if initially your response is not satisfactory reing your question or provide more specific would be better and we need to seek clarification if the response is unclear ask chib to clarify or provide a more detailed explanation for instance you can ask can it El elaborate more on that or you know what do you mean by something so at the end you know we stay up to date because open AI continually see updates and refine the model so stay informed about the latest version Improvement and best practice to ensure Optimal Performance and safety in the output itself yep so basically that uh covers everything on the topic today