How to Make Perfect AI Prompts Using Reverse Meta Prompting

2.11k views3699 WordsCopy TextShare
Mark Kashef
In this video, I walk you through the concept of reverse metaprompting—a powerful technique that can...
Video Transcript:
how do you guide an AI to do something perfectly if even you don't know what perfect looks like it's one of those things that when you see it you'll know it but you'll have to see it first this is where reverse meta prompting can help and come to your rescue it'll allow you to have back and forth conversations with any large language model and be able to reverse engineer it into effective and precise prompts one step at a time if we haven't met yet my name is Mark and I've been running my own AI automation
agency called prompt advisors for the past 2 years we work with all industry to implement AI in their business where it makes sense if you've consumed any of my content from before you'll see that I've done extensive tutorials on meta prompting in very different applications and this is yet another application that I realized was missing from the stack that I already came up with the best part of this strategy is it's so easy to implement and anyone can do it with practically any large language model I'm going to walk through the big picture of what
reverse meta prompting is and we're going to apply it to three different use cases so we can actually see it in action as usual The Prompt I'll be going through will be in the description below so stay tuned to see how we actually use it all right so if you've ever used anything like chat gbt or Cloud before you'll be super familiar with the typical way that we prompt which is we send one huge prompt ideally with our menu items of everything we're looking for for that dream outcome and then we hope that some output
comes out to our satisfaction and a lot of the videos that I've been filming operate on this assumption that you know what you want and all you have to do is translate that into a prompt but many times if you're experimenting to see what can be done with AI for your specific use case you don't know whether or not prompting is the best way to do it you don't know if large language models can help you go from A to B and you need to experiment to see what works and what doesn't before you come
to your final conclusion so this vanilla case is ideal but not necessarily what you can start with sometimes now the second case is something that I just recorded a video on a few days ago called chain prompting where pretty much not to repeat myself you have a series of Min prompts all of which specialize in one main task that feed one into the other and the goal of chain prompting is because each prompt has such a small task that the likelihood for it to hallucinate is much lower and you usually get much better outcome but
again this is founded on the basis that you know what your process is and you know what success looks like and you're just trying to peace meal your way there reverse meta prompting is probably something you've already been doing but it's all about being int intentional in the way you do it to get the best outcomes possible so the idea with reverse meta prompting is that you start with some sort of prompt something directionally accurate to where you're trying to go like write me a story write me an email I am a social media manager
I'm trying to automate X posts or Instagram posts Etc so you need some form of Northstar at least to start with and the idea is as chat gbt or Claude or whichever LM continues to fail to meet your expectations you give it some feedback and as it outputs another iteration you give it some more feedback and the idea is that you keep doing this until you're satisfied or ideally it's exceeded your expectations and you got the output that you're looking for this is the critical point where reverse meta prompting comes into play all you have
to do is write a prompt at the very end of the conversation once you've actually gotten what you're looking for and you say you know what act as a prompt engineer go through this entire conversation and capture the nuances of the feedback that I gave you to try to reverse engineer the dream outcome that you just outputed for me obviously again disclaimer here the assumption that I'm making is that you finally got to your dream outcome after X amount of iteration if you haven't this won't be that helpful but if you have it's a solid
way to be able to have chat gvt look back and take advantage of the fact that you created a thread and use that thread as the ideal model for Success now if it seems a bit hazy we're going to go through three separate examples that are really going to drive the point home all right so what we're going to do now is I'm going to go through three separate examples of how to make this work and my feed back to the initial prompts are all going to be spontaneous just to really capture the essence of
what we're going for here all right so for the first one I'm not going to read the whole prompt because it's a bit long but overall it's I'm am the social media manager at eego frogs a brand that sells eco-friendly products for the environmentally conscious and slightly quirky and the rest of it pretty much is going to say create a Content calendar for Eco frogs Instagram Tik Tok and Twitter accounts for the next month include post ideas yada yada yada so we're just going to send this as an initial prompt and we are going to
get some form of response that we're going to give feedback to and while this is producing I'm just going to show you this little feature here you probably would have seen it by now in chbt sometimes it actually does this memory updated little icon which means it's stored in memory some form of preference that it's picked up on a lot of times it's helpful sometimes it's not so I don't necessarily want to remember about Eco frogs moving forward unless I really wanted to so if you want to clear that out just a little bit of
a FYI you can go to settings then you can go to personalization and then you can clear chat gbt memory to make sure that your prompts are not really influenced by something extraneous from what you're actually writing at the same time uh an additional hack on the other side is let's say you always want the prompts you create to always have multiple examples you can go in here and go to manage and you can say if it'll let me just dive in all right so you can see here it has like all these preferences so
you can see here it says prefers examples and prompts to be written in first person making them actionable and realistic so uh I'm going to delete all of these here by just doing again clear there we go and we could probably add in a brand new member that says always create multi-shop prompts when I ask you to prompt but that's a little bit of FYI you can use for later on in the video when I show you how to actually use this okay so let's look at the actual output from this prompt we pretty much
have a weekly calendar with content by day telling us exactly what we should be doing for that and let's say for me to augment this I want to say let's say only day one and day five should be on the content calendar and I want you to actually write the collateral for the posts we'll be making by platform so just use my little handy Voice Assistant all right this is a good start but can we make sure that it only is for day one and day six and that everything that you tell me in those
content calendar bullets are actual examples of what I should be writing so actually write the posts by platform instead of telling me what to do so A Bit Sassy on my end but ideally this will now start creating the post end to end write the actual content for it and the collateral and that'll be a bit easier all right so it's done generating and we have day one day six and we have posts for each one but one thing I noticed now is it was doing it before by platform and by day and right now
it's just doing day one and day six as the headers and then the platforms as sub bullets under that which is not necessarily what I want so I'll now give it another piece of feedback okay so you did a great job actually writing out the posts but I want you to go back to categorizing everything by the platform and then creating a day one day six post per platform instead of you just saying day one and day six and then listing the platforms nested underneath so with this hopefully we should just get the actual platform
and then day one day six platform posts for that and we'll see here we have day one we have day six it's better organized and after this I'm going to get to the real point of the video which is how do we do this and actually use this reverse meta prompt to go back through all the context of the conversation to create a prompt that would get to this output in one shot so what I'm about to copy paste is the exact prompt I'm going to use for the other two examples the other ones will
go a bit quicker with but in general it's going to be this and I'll just delete a little copy paste here it's going to be act as a prompt engineer go through this conversation and create a detailed prompt and Mark down in a code block that summarizes all the feedback I gave you leading to the final result above so again the contingency here is that you finally get to your desired outcome eventually in this chat and then the final part is include the successful example above as an example for the prompt so we're basically saying
create a multishot prompt like I said before on the memory front if you've already told your chat gbt memory hey when I ask you to create a prompt always make it have multiple examples that you might not need that final portion of this prompt here if not though and you want to make sure that you're always creating vanilla prompts that aren't influenced from elsewhere then make sure to include this part here so I'm just going to send it and this is the result that we get and it's very detailed prompt like we're used to seeing
in my other videos and in this case it included the example response that we just got as the ideal and examply response so if we just take a quick look at this in a Google doc just to better look at it yeah so we'll see here you are social media content strategist for Eco frogs a brand that sells eco-friendly products for environmentally conscious and slightly quirked consumers yada yada yada here are the requirements by platform content days it's capturing day one and day six of the month it has that specificity we talked about tone and
style and then we actually have the example that we just went through so if we take this prompt here and we go back into chat gbt and we create a brand new session and just paste this we should get something along the lines of what we just got as an output and obviously what we do want to do here is just configure it so you can change any components you're looking for but we were able to reverse engineer our process for success and we get exactly what we're looking for in one shot by just going
through that entire end to- end process so I'm going to do two more examples a bit quicker just to reinforce the point and drive it home and this will add yet another tool in your toolbox for how to go about coming up with the best prompts for the best projects all right for the next two examples what I'm going to do is I'm going to go slightly a bit faster and I already had a conversation where I went back and forth so I'm going to walk through the finished conversation just to show you how we
would replicate this process for a different scenario so in this case I say that I am the marketing manager at gadget gurus where we're about to launch our latest Innovation the robo mop 3000 a mop that lets you clean your floors and serenades you with elevator music and here we're just saying Help Me identify a target audience help me break them down by demographics psychographics and lifestyle factors so initially it does a decent job of breaking them down primarily in bullet form in terms of everything from Urban dwellers to pet owners it comes up with
a secondary audience and then I say could you vary the format of this so it's not just bullets and can you maybe throw in some tables so there's not a lot more interactive mix in the writing between short and long form sentences bullets and tables it's a lot more visually appealing so then it takes that into account it's starts mix and matching some tables into the actual output with some bullets where it makes sense and then my feedback is so in terms of psychographic traits which we outline up here music lovers aesthetic conscious and eco-conscious
I basically ask it hey let's create it a little visualization like a bar chart and give me your estimate based on all of your experience with this kind of product where we might land in terms of the number of people that fall on each of these buckets for music lovers Aesthetics econscious Etc so if we go down on the first iteration of this it just outputs the bar chart itself it doesn't actually output the entire thing end to end which is what we want right because we want to go back and say hey the thing
that you just did above that's example of perfect let's turn that into a prompt so because we were just given the graph here I had to lecture it and say this is bad this is a great graph but I need you to create the entire report end to end so then it creates a this report and at the very end it throws in this bar chart which is pretty cool because as of like a month or a month and a half ago you can now interact with these charts and actually click on certain things depending
on the visualization and then I asked it to use that same prompt we used in scenario number one which is act as a prompt engineer and go through the conversation take all the context spit out an actual prompt so it does that and it's a bit less beefy than the prior one but one question that I po to myself is what if I wanted to apply this to different scenarios where I wanted this prompt to not just iteratively output the same thing over and over but I want some form of ability to intervene right so
using a variable to configure it so that if I want to change the focus of this prompt but have like the majority of it structure in the right way that it's easy to do so so if we go to the bottom here I say this is a great prompt I want you to keep everything but I want you to add a small component that's basically variable and in this case I just told it user judgment as to what you think might make the most sense as a variable to configure this and it came up with
the exact same prompt but at the bottom it says lens or focus and it's a variable to customize the analysis which can include specific Geographic different product variations alternative customer segments Etc and if we actually went into the prompt itself here you'll see under the fifth one which is customizable perspective it'll say a new point which is tailor the entire analysis based based on the specified lens or Focus which could include specific regions product variations Etc everything that we just saw below so that's a small tidbit hack on how to actually take this reverse prompt
and make it now configurable so we're going from reverse to meta prompt and now from meta prompt to Ideal meta prompt we'll just go through one more example to show what it looks like when you're having an interactive conversation using actual data so for the last one I use chat gbt in another session to actually generate dummy data that we can use so if we double click this you'll see what it looks like we have the date product region unit sold and revenue obviously this is all made up but I asked it to have diverse
dates so we could do some form of Time series based analysis and then we have different products here like coffee warmer squirrel feeder Etc so initially all I asked it to do is I said I'm the sales manager at widget Works a company that makes and sells quirky customade widgets for Tech enthusiasts and I say I need to create a monthly sales report to present that at our All Hands meeting and I just give it the data and I just say summarize it for the monthly data highlighting total sales top three bestselling widgets and the
sales breakdown by region and then we get something like this here where it gives me an overall breakdown using a CSV and then it summarizes it verbally now my next feedback is basically saying good job but I also want to add in addition to month over month I want to do week over week comparison and similar to a last scenario it just outputs the week over week sales summary instead of redoing the whole thing end to end so again small hack here if you want to avoid this iterative process where you have to keep telling
it over and over again you can just say in another window if I open this up here so what we can do is tell chadt just to remember moving forward that every time we are in a scenario where we're going back and forth that we output the entire output in addition to our new ask hey so I want you to Commit This to Memory every time that I'm going back and forth with you and I giving you feedback as to what you should add to your output not necessarily edit in the existing output but more
so add and keep everything the same that I don't want you to just output what I asked you for but I want you to Output the whole output in addition to what I asked you for so if we just frame it in that way typically like it did right now it'll understand that it's something you want to remember so moving forward hopefully you shouldn't have to have that constant back and forth that you're seeing me struggle with right now so if we go back in this case I told that this is great but ideally I
want this in an actual table format I want the entire report end to end and I don't want it in like an interactive CSV that it's doing right now so if we go down here we get the entire sales report again and then we have the week over week comparison broken down in an actual table format within the UI and now we have something that is quote unquote good so now I'll use that prompt one more time and then you'll get the output which is very well structured we have the example here of what it
should look like and just like we did in the last scenario should you want to add different variables which would be probably super helpful for this one like which month are we talking about which segments are we worried about so those kinds of things can become variables and now all you can do is just take the code open a brand new session use it to your heart's content and you're good to go from there and that's pretty much it from a concept perspective this is something that you can use pretty much right away today and
use it to actually take all your conversations you've had in the past you keep using over and over again and having to Reco GPT every single time um and given that it's more Dynamic and maybe too Dynamic for a custom GPT you can use it to really 10x yourself in terms of the way you go about replicating your prompting process and if you want access to the specific prompt that I used you can find it in the link in the description below and other than that please subscribe like and I'll see you next time
Copyright © 2024. Made with ♥ in London by YTScribe.com