oKFFN0yJX0g β
Let's build with Zapier and AI (100+ videos)
Transcript β
[00:00] when leveraging assistant API with open Ai and zapier how do we ensure consistent outputs because of the fact that as you see when building out assistance apis we don't have a memory key therefore at scale or when using it excessively how do we ensure that we get consistent outputs and we don't have you know variable outputs that might happen 10% of the time which could cause issues within your business let's find out in today's video Welcome Back to Corbin AI y'all today is going to be a video based off one of my followers here on premium
[00:30] resellers basically asked how do I ensure consistent outputs because of the memory key issue I showed in the beginning of this video I gave a suggestion I'm going goad and show this suggestion live if you want more content like this or you want to talk to me go and show go ahead and follow me on Twitter I post random stuff AI stuff and just stuff I think about let's go and jump in today's video so to Showcase this let's just create a real quick test assistant API we're going to say test friend and then our instructions we're going to say I I want you to
[01:03] Output the ingredients needed for any recipe I ask if you want more advanced tutorials when it comes to assistance API make sure to check out my playlist at the end here I do a really advanced stuff here but I wanted to show this real quick as this may this was requested and it worked and I know that is probably will help at least a couple of y'all when it comes to getting consistent outputs with the API I know from my experience in programming and coding out software the biggest thing when it comes to understanding how to leverage artificial intelligence
[01:34] understand how to format its outputs right A lot of times AI can give you 90% reliable outputs but that 10% of the time you need to add a little bit JavaScript you need to add a little bit further proctoring in this context don't worry we're not going to do code we're going to do a little trick that I use in software a little trick I use in my other automations when it comes to perfecting outputs at scale from here though let's just go with gbt form we're not going to add any functions that's all fine we're going to go ahead and hit save here all right great so we've created our assistant it's use case is going to be basically give us the
[02:04] ingredients for any type of recipe I asked for let's going to create our zap here so we're going to go ahead and hit create zap here and begin so our trigger doesn't really matter as today's use case is purely just to show you formatting so we'll just do a schedule trigger and we'll say every day continue and midnight doesn't really matter here for us we're going to hit test trigger perfect let's go ahead and jump right into our Chad gbt block here so we're going to do c gbt and we're going to do conversation with an assistant so do
[02:37] conversation okay so they've added some stuff here they've added custom action what is it don't see the action you need interesting we may need to explore that in another video let me know in the comments if you want to see that so we're going to do conversation with assistant if you are up to this point you have no clue what an assistant is here is a real quick recap assistance API basically allows you to take past conversations and build upon it how we traditionally have communicated with chbt blocks in the past is it was kind of like a shot in the dark it was a one shot you had context but every single shot was kind of still consistent
[03:09] because of memory key but you couldn't have pre contextual C you didn't basically if I said hello and you said hello back and then I said it's a great day the assistant's API would understand that I said hello first the Chad DBT block wouldn't even understand hello incurred it would just know that I said it's a great day does that make sense it just basically lengthens and builds upon previous conversation using the assistance API obviously there's a lot more such as being able to find tune with data but for now though we're just going to say this we're going to say basically the message that's received
[03:40] here typically this would be a variable but we're going to do fix just for today's tutorial here we're going to say I want to cook a lamb stew all right so we're going to choose our assistant that we just created here going be test friend everything else should be very sufficient for what we need here so test friends already been Proctor to understand to provide me the ingredients so I should get the ingredients here as you'll see right there there we go so we got our ingredients right there nice nice nice nice all right perfect so here's the
[04:12] situation this is great but what you'll notice is there is no memory key from all that situation so what I like to do in this context and I've talked about this in my sof through videos as well is what you can do is this let's say the ingredients is perfect it comes out fine but we want to add an insurance block so that's what I like to call them I call them Insurance blocks basically most of the times it's fine but sometimes you got to make sure it's always fine so to do so we're going to do another CHT block here we're going to do conversation ready continue continue
[04:45] and we're going to do a user message of we're going to say these are the ingredients to a recipe semicolon and here's a situation you're going to put in the context of whatever that very specific thing you wanted from the assistant's API to be so for my context we're going to say these are the ingredients to the recipe let's say the
[05:16] issue that I'm having with my assistance API is that 90% of the time it gives the ingredients but some of the time it it it adds that extra sentence of here are the ingredients like I don't want any text I just want the number list let's say that's my issue I'll need you to show it here so it's a little bit better come down here not there so as you see we have that little sentence right here let's say I don't like that that's like my issue at scale I'm having that issue I just want the numbers okay we're going to add this CH gbt block here that's
[05:47] going to basically be like a r version of a formatter that's going to shred out or add certain text that we want for our specific you use case we're just going to shred out some text we're going to say these are the uh these are the ingredients of two a recipe generate just the ingredients no text before or after this could be adding text this could be adding tone this could be whatever so I'm going to try this at a 3.5 block at first and then I'm going to
[06:17] go ahead and add a memory key here random 32 character string locks in consistent outputs I'm going to try a 13 gbt 3.5 block first if this doesn't work I'm going to up it to a four block all right so here we go it worked but the problem is that it made it super messy it didn't keep the number formatting therefore we're going to have to keep the number formatting so I'm going to come back here generate the just the ingredients no text before after we're going to say generate the just the ingredients number list same
[06:48] format no text before or after I'm getting a ton of calls y'all random spam calls too I think you know what someone needs to do all right y'all I got an idea this is really random really tangent here but someone please or let me know in the comments develop a software I'll pay a software5 to $10 where it answers that call but it's an AI voice and it filters it for me where if it's a real call
[07:18] it'll give me some type of indication that this is a real call as in like I know this person if it's a Spam call then just basically like puts them down a rabbit hole someone do that I don't know what you would call it but that would be super cool okay so let's go ahead and proceed here uh no text before and after continue retest app one other thing make sure to refresh the memory key I'm going to up it to gbt 4 and let's try again all right there you go so as you see from our output here we just got the ingredients now this is very simple but I want you to be able to
[07:49] use this in any context that was the purpose of this tutorial it's kind of like you just added another thing to your toolbox where now you understand that basically with data that you feel like you can't get consistent outputs with you can still get consistent outputs with because we just add an additional filtering Block in this context we' added H DBT block past the assistance API in order to ensure that if certain data is not found in it or if certain data is found in it we can remove it so if you felt like you learn something make sure you leave a like if you like the Style video make sure to subscribe if you haven't already check out the playlist at the end here where I'm diving to zapier showing you to
[08:20] leverage it with AI in a bunch of different context I do a bunch of other stuff on this channel such as business advice looking at cool AI stuff I mean there's a if y'all haven't seen the test Centon I think it's called the centrion this thing is a robot that looks like I Am Legend this is crazy stuff no not I Am Legend um I think it's called iroot y'all know what movie I'm talking about really cool stuff also oh man there's like a lowbudget film that I watched the other day it's called like man man of
[08:51] war or gosh let me get the name of the film real quick all right I'm not I'm not I don't typically do this but I had to okay monster of man it's a lowbudget film but my gosh if You' seen that video of me talking about the Tesla Centon and like the militarization of these things this thing basically hit his spot on of like how creepy it can get so this is a random I think it's it's free on Amazon Prime you just got to watch ads with it this is cool this is super cool check that out without further Ado y'all I'll see you in the next video thanks for
[09:22] 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