Craft ANY ChatGPT Prompt For Zapier Automations (chatgpt 3.5 & 4 models explained) β
Let's build with Zapier and AI (100+ videos)π
2023-10-04
Transcript β
[00:00] welcome back to Corbin A where I'm showing you daily how to start leveraging artificial intelligence in your personal and your business life and in today's video I'm going to go over fundamentals when it comes to prompt structuring in the specific context of automation softwares like zapier and make as you see we're going to be going over the three different models that are afforded to us I'm going to give you use cases for every single one I'm going to start off with struct the prompts not being structured correctly and then we're going to structure them correctly together and learn why we're going to learn a ton of stuff in this video so if you do Automation and you or you plan on doing automation is going to be a very
[00:31] fundamental video within your toolkit now before we jump in completely I want to go over some other use cases that I've shown when it comes of prompt structuring so this is one of the recent videos I released this yesterday if you're more Curious on learning how to structure prompts for the front end when you actually speak to chat gbt in the UI version check out this video as I go over essentially how to create monetizable prompts and I go over essentially how to create prompts are specific for your use case and productivity we're going to be going over today more specifically when we are structuring and prompting for the
[01:01] backend for automation softwares now there is a reason why there is a differentiation when we structure prompts between the different models as it seems inherently that it would you know if I used the same prompt in 3.5 on the front end I could probably use that same prompt in zapier but that's just not true the way we structure prompts depending on how we access the API is going to be pretty different which is a pretty interesting fact to know furthermore if you're interested in learning all the different layers of prompt engineering and essentially every single subset of it when it comes to the front end automation softwares and then
[01:32] truly coding in the back end I suggest you check out this video here as essentially this is going to give you context of the three different layers right now we're at Layer Two the third layer is actually talking to the API directly in code and the way you structure those prompts is going to be different than how you structure them here so it's pretty interesting it's good to know that essentially when prompt engineering depending on the platform that you communicating with the model you got to communicate with it differently so without further Ado let's stop delaying here let's jump into today's video essentially what I want to show you here is we have a trigger here
[02:04] which is going to be a new customer email which is not too important but essentially the idea is this we're going to use the data from this fake email which essentially we're posing as a lawnmowing service and this is a potential lead and I'm going to show you essentially how each model could apply to this email and then I'm going to essentially show you how to restructure these promps to be more effective so let's go to jump in so just to start off so you can get a broad overview of understanding what each model is in this toolbox here think of 3.5 as a formatting model we receive a ton of data essentially we want to find main
[02:34] points in the data we want to reformat the data we want to maybe make it bull of points we want to maybe summarize it this is the nature of the 3.5 model 3.5 model 16k essentially can handle more data so essentially if you're dealing with pages of data you would opt in for the 3.5 model to do the same thing that this model does but just dealing with more input data that uh for the underlying Automation and then finally the Chad gbt 4 model is for more comprehensive task essentially think of the chat gbt 4 model is the closest we have to humanik outputs so therefore we would use it for humanik activities like
[03:05] writing captions writing articles stuff of this nature so essentially what we have going on here is I'm going to show you three different prompts that are currently associated with these models and as a uh as a disclaimer these prompts are not structured correctly these are um not optimized prompts so the prompts you're about to see right now I'm purposely making it so they're not optimized so we can optimize them together and you can intuitively understand what it means to make a good prompt when it comes to each one of these models so the first model here we have essentially um has this prompt here
[03:36] right so we got from this email I got want to get some main points provides the email that says I am interested in the street of the customer size of their lawn name give me the exact values for each of these so as you'll notice right off the bat we're using the 3.5 model because we're extracting data and we're extracting specific points of data found within this email now if I jump back over this email some of these points are like the name here the streets uh thousand square feet of Mowing and you know phone number stuff of this nature right so right off the B we need to understand and obviously we got the model here is one this isn't structured
[04:08] correctly or as optimally as it could be structured and the reason why it's important to structure your prompts correctly is that it relies on consistent outputs you'll have consistent outputs therefore we can get better outputs when we scale so if this runs 20 times out of that 20 times we get 20 out of 20 every time it gives an output we get exactly what we want rather than maybe using this kind of prompt which is very it's not very lasered in to the point where Chad gbt could get a little too creative for us and we wouldn't necessarily want the prompt or the output so knowing this
[04:40] let's go ahead and understand one thing real quick before we dive into basically making this prompt a lot better um essentially is the models right so we already have these models here right but what you'll see is some of these models have 0314 0613 um I noticed they just added the turbo instruct that's interesting 0613 0301 these are essentially uh dates that the model um incurs what I mean by that essentially is that this is gbt 4 up to March 14th of 2023 any updates or any
[05:10] different model changes that occurred past March 2014 sorry March March the March the 14th of March I don't know why that was so hard for me to think of um any model any like so let's say there's an update in July it wasn't incurred on this model what you need to know as an automation uh prompt there is ignore these models don't use models with dates you want to use models that just say gbt 4 that just say gbt 3.5 turbo that just say gbt 3.5 turbo 16k and the reason I
[05:40] say that is because when let's say you build out 20 automations and you're using gbt 4 0314 when they deprecate that model essentially all those automations are not going to work because essentially this doesn't exist anymore and you know use this one as this will always be there for you just think of it that way so ignore the dates go with the models without the dates from here essentially let's go ahead and reformat this prompt here so it is more effective and we'll go ahead and input some stuff here um from here essentially what are we doing here we say from this email I got want to get the main points
[06:13] let's go to give some context so we want to start off by saying context we received a lead for our company going to go ahead and make that right we do the service of lawn moing Okay so we've already find tune the point where essentially chadt understands okay we we received the lead and this is a la Lawn Service Company so we can go and delete this all right and then we can go ahead and say to make this specific we're going to say instead of email we're
[06:43] going to say lead email and then if you really want to you know go the extra mile here what we can do here is essentially we can put uh subject semicolon parenthesis and then uh body so then we have identified every single variable that's associated with this notice how essentially we say we received a lead or we received a lead email should put that here and notice how we're calling upon that specific variable in that context here we receive the lead email subject line we're going
[07:15] to go ahead and put in our subject here and then we have our body plane just use that we can load the data there and then as you see here the way we structure how we quote unquote want the output is I'm interested in the street of the customer size of their lawn and name give me the exact values of each of these problem is is that we're letting chat gbt have too much um discretion on how the output will look so let's give it less discretion because essentially when we're grabbing data and we're specifically using it there is certain we want it formatted in a certain way so we're instead of using this kind of verbage I'm going to go ahead and leave
[07:46] it down here so you can kind of see the difference I'm going to say generate the following main points and do semicolon here and then we're going to say uh address or say streets of we'll say instead we'll just say uh customer we'll put lead lead phone number then we'll put uh size of one semicolon and then finally we'll go
[08:19] put name and we'll put lead name as you may have your name in the footer um or in some part of it so we're going to go and do that and then notice this entire sentence goes bye-bye and essentially now we should get an expected outputs of the three different variable points that we care about in this specific email like this so let's go ahead and proceed here gbt 3.5 turbo and any good prompt structuring you're going to want to use a memory key so we're going to say em uh 3.5 and essentially this ensures
[08:50] consistent outputs and we can kind of lock in our under link output if we like how it looks a lot of this other stuff I go over in other videos so for now we can kind of ignore this we're going to hit continue here and we're going to go ahead and test this step all right so as you see here we got the lead phone number we got the size alwn and we got John do so we come back over the email all right phone number John do th000 perfect so essentially we got a nice little output here and essentially if I keep saying essentially um if I went ahead and just command Z this I guess I can't I can't show you what the other output would looked like but it would have been very much more chaotic due to
[09:21] the fact that we didn't make it uh fine-tuned so we got email 3.5 that's locked in so now every single time an email goes through this flow we are now receiving a consistent output that looks like this so now we intuitively understand using the 3.5 model block let's go ahead and jump over to 3.5 model 16k so let's say we have a different context here let's say we're dealing with a ton of different emails and essentially the reason we would use this alternatively to this is you know more data but what's great about this is what you need to understand is the way
[09:52] we format this is the same the way we format this so let's just say I'm going to copy this bring this over here paste it here and then it kind of come back over here so notice essentially we're using the same prompt structuring but the only noticeable difference between the two of these models is essentially just how much data we're feeding it so how you model and how you prompt struct for 3.5 and 3.56k is the exact same in the context of automation it's just how do you provide the underlying data and what's great about
[10:24] this essentially is that you know in this context this is all the same email but assuming this wasn't the same email then we provided three different emails here if you wanted to call upon a specific email you could really just go with the Layman or not Layman but just the dictation of email to is important because XYZ and what's great is that since you've identified email 2 and you've used the parenthesis to cons constrain the data um it will know that you're referring to email 2 here so you can kind of call upon data points within a chat gbt prompt especially when you're
[10:55] dealing with larger amounts of data which may be important to you um from here though we can kind of jump over to CH gbt 4 model and proper structuring there so we can go over to CH gbt 4 here hit action here and you know this is not an optimized uh prompt at all but as you see here we say so we got an email from a lead here are some main points from the body of the email main points uh email body and general response we typically offer three plans if the property is over 700 Square fee we include a free lawn and more notice how
[11:27] the way we structure in 3.5 is very um uh like strict the way we structure in tb4 is going to be strict as well so that's kind of the way you got to think about it you don't want to talk to it lack you don't want to talk to it as if you're having a conversation which is ironic even though we're using the event of conversation but you want to talk to it as if you're basically communicating with a machine or you are communicating machine but in the sense of like I give you a square peg put it in the square square peg hole I give you a circle Peg put it in the circle Peg hole like be
[11:58] very very specific in your language and how you use it one other side not one other caveat here is um let's say we're structuring out a prompt and we want a very specific output and essentially uh by the time we receive that output you know our prompt is we're using this much text essentially right you are better off and you're going to have more consistent outputs you're going to spend less money the less amount of words you use for your underlying output the better it will be so it's not in the sense of like oh my
[12:30] gosh if I really want to do something really complex here I got to just make paragraphs to really tell Chad GT4 what I want you know don't think like that think more in the sense of like okay so I have this paragraph here how do I condense this okay I don't need this word I don't need this word and you can kind of work away with it the less words you use the better the chat gbt prompt will be because the less words you use there's less room for Chad gbt to kind of think of uh misinterpret what you were trying to to do originally so basically what I'm trying to say here is
[13:00] that if you wanted to you know do one task would you rather explain how to do that one task in a paragraph or a sentence and a bullet point it's going to be the sentence and bullet point so think of that when you're structuring don't don't write essays here um let's go ENT let's go ahead and reformat this and make this a lot better for gp4 so we got so we got an email from a lead here we can do here is and what we like to do here is essentially when we're dealing with prom structuring the first line in your promp structuring should always be a context line you want to give um the
[13:31] overarching plan and goal of the underlying output and that's going to give you know gbt a good leg to St on um I don't know intuitively if this reads the text chronologically I would assume so but it does it really fast as in like does it read this and then this I'm assuming it does I don't know that exactly honestly softare works so fast it's like milliseconds of how fast it works but from what I've seen from my experience is that when you you structure prompts chronologically it
[14:01] leads to better output so what does that mean that means typically that you'll have context in the beginning you'll have data in the middle and then you'll have essentially your end your last line will either be a format or a parameter or just how essentially what the output should look like or what you should generate so keep that in mind when structur these problem so I wouldn't want to do generate response at top and the context at the bottom U from here though we got context we received a lead from our company we do service of lawnmowing and then essentially we can just kind of provide this what you'll notice um need email so what you'll notice is some of the structuring can be
[14:33] very similar between the two different uh models so you might be saying to yourself well didn't we kind of structure the 3.5 like this we did because the way we structure uh the 3.5 prompts and the way we structure tp4 prompts can be very similar the reason it can be very similar is because of the fact that typically when ingesting data 3.5 and four it can adjust data the same but the reason we use different models is because we don't care about well we do care about but essentially the the
[15:04] ingestion of data like if I eat a burger it's going to be the same but the output maybe the burger wasn't a good analogy because we don't want that output but the output essentially is the important part of essentially what we're going to change most likely so you know for example the generation part is the most pertinent part between why we even have a difference between 3.5 and four because what we're asking 3.5 to do relative to what we're asking four to do is going to be drastically different so uh we received an email from a company and we're going to go ahead and put a subject line
[15:34] here uh put a body here and essentially I'm going to delete all this because this is just not structured correctly we can really get complex here so I'm going to say this generate a uh subject line and email body responding to this lead email and then I'm going to go ahead and put parentheses put parameters uh we offer three different
[16:07] packages if the uh lead has less than 2,000 square feet of lawn offer the price of 500 UCD I'm not too sure you know obviously this can get more complex but essentially I just wanted to show you the example here so receive the lead email provide the data how we provide it we got the same Burger but we're asking for very specific stuff that's going to be more human-like things right responding to an email that's going to be a very human-like
[16:37] action so I'm going to write the subject line write email body and then I'm give the parameters of we offer three different packages give a little bit more context essentially how we want to Res respond I'm use gb4 here I'm going say email response and then we're going to go ahead and hit continue here and test this step one thing I want to point out as well is when you test steps and when you just work with gb4 as a model it's it's going to take a lot longer for outputs comparative to the 3.5 model all right so as you see here we got our relative subject line here in regards to the lawn Ming Services we offer and we
[17:09] got essentially the body of the underlying email and you know one thing off the bat here um is it might be a little too long here and essentially the way we can kind of work around that is we can say parameters we have three different packages uh I can add a format block here and say Max of four sentences you can get more um casual ual a little bit more casual in the way you speak with gbt 4 if you want to do a new response and you don't want to have pre contextual data add a one there refresh the memory key but you can get more casual in the way you talk to gbt 4 due
[17:39] to the fact that it's really it's a lot smarter than people think this this model can do a lot of stuff that's very complex come down here to the output and all right let's see there we go sometimes they'll do that won't show the actual output so here we go we got Max of four sentences a lot shorter got our subject line um I don't want to get too complex here in the sense of essentially post this process formatting data and stuff like that but you can format data with a lot of Zap your toolkits I suggest you check out our other videos here if you want to essentially know how to split the subject line and stuff of
[18:09] this nature but I want to show you one other use case that you can use the 3.5 model in um and and is more conditional logic so what I mean by this essentially is I say there is um we want to kind of make this a little bit more complex so this is where it gets a little bit crazy but you'll understand what I'm trying to do here so essentially let's say depending on a certain variable found in that email we wanted to do conditionally a different thing therefore we would want to Proctor the underly chat gbt response a little bit differently so what I mean by that essentially is let's
[18:40] say we take a conversation here and we're H uh sign in I guess I'm just going to ignore that I don't know why you wanted me to sign in I just duplicated the other block here um I'm going to say conditional logic or just logic not the rapper okay so uh from here essentially we could just say this all right generate yes if the square footage of the line is over 500 and
[19:18] no if it if it is UN um under 500 square ft so this is going to be refer to that underlying variable that we had in the email that was 1,000 ft as a lawn here we can use 3.5 in this context um and I might need to restructure this uh prompt but we'll see but we use 3.5 most of the time in this context essentially we're just looking for a bullying of yes or no true or false um in regards to what we're specifically looking for here so as you see we got a yes because the underlying
[19:49] square footage is over 1,000 ft so this where it get really cool so because we added this logic block here uh we can add a filter block or not a filter block we can add add this pass block that I already added here and essentially make it really simple here and we only go down path a if the reply of this logic is exactly matches yes and essentially this will say uh this will go down this path it be like good to go but if the underlying individual has a lawn that is under 500
[20:19] ft we are going to get a response of no therefore we're gonna say exactly matches no we don't want to go we want to go down this path if their lawn is smaller than 500 so we won't go down this path for the current email that we have because we have over 500 look at this drag this down here and now we can take it one step further with our logic when it comes to chat gbt and now we know contextually that the email that we're receiving is going to be an email in this logic um essentially of a property that has a value or a square footage over 500 therefore the way we
[20:51] structur this underline prompt can be a little bit more specific and we can use less words in the prompt because of the fact that contextually we know that we're dealing with a client or a lead that has over 500 ft that kind of kind of concludes this video here um if you liked what you just saw there make sure to leave a like for the value it lets me know that you want more videos of this context um if you want to learn more about Automation and artificial intelligence I'm going to leave a playlist at the end of this one where essentially I dive into all 5,000 apps found on zapier's uh back end and I show you how to leverage artificial intelligence of every single one this video right here is probably one of the
[21:22] more powerful ones that I've done on this channel as now you know intuitively essentially how to prompt engineer every single type of block found on zapier one interesting concept and one interesting thing to know as I said in the beginning of this video is the way I talk to the front end of chat gbt the way I talk to zapia version of Chad gbt or make version of Chad gbt the way I'm going to talk to the API when I actually code it out is going to be a lot different so now you understand how to use it in the front end now you understand how to use in the automation platform the final piece of cake here is going to be understanding how to talk to it uh as a
[21:52] direct open API call which we'll learn don't worry about it we'll get to that um without further ado I'll see you in the next video thanks for tuning in and yes surprise I'm an AI Avatar make sure to explore more here at Corbin AI where we demystify AI for your personal and business life until next time