-: In this video we're gonna explain a topic
called meta prompting or meta prompts, where they're used,
and how you can integrate them into your existing workflows.
Meta prompts allow us the ability
to take an output from either a machine or,
you know, a human output,
and then to figure out,
if that output came from an AI model,
what would've been the prompt that the AI model
choose to use?
And so, the advantages of this is,
if you're struggling for inspiration or you're looking
to get a more deterministic or a more reliable output,
using meta prompting could be a good use case for this.
Let's have a look at an example
that describes this a bit better.
So you can see at the top, we've got this LinkedIn post
and what we really want Chat GPT to do is to
give us a prompt that would allow us
to partially regenerate a type of LinkedIn post
that's similar to this.
So at the top we have, "I want to have a Chat GPT prompt
that could've been used to regenerate
the following LinkedIn post."
We've also got a little bit of repetition here,
so, "Create a chat GPT prompt that could have generated
the following LinkedIn post text."
And so, what we end up with is not necessarily the output,
but we want a prompt that helps us
to generate that output, right?
So that might be one prompt, you know.
Here's another prompt.
"Can you explain marketing mix modeling?"
And so, what we can then do is take these types of outputs
and put that back into the AI model.
And then, it gives us something that's very similar
to what the output was like,
but it's not just limited to using this for text.
We could also use this for code.
So let's say, for example, we've got some code
that we'd like to figure out how it would write.
I've got this data pipeline here.
We've got some imports.
So we could take all this
and, at the top of this, instead of,
so what we would just put,
so let's go to a new chat history, click new chat,
and then I'm just gonna put,
"Create a Chat GPT prompt that would've generated
the following code."
And then we can put the code in.
And then, you'll see now what it's giving us is, you know,
"Write a Python code to extract sentiment labels
for a list of restaurant reviews," right?
So this here would be the prompt.
So we could take this, post this back in,
and here's, you know, it gives us a different example
of how you could do something like this.
And so, you know, this could be quite interesting,
'cause you can see the code is slightly different.
It's using different packages,
but it's achieving the same output nonetheless.
And so, you know, meta prompts allow us to figure out
what would've the prompt been, given the output
that the large language model has seen, right?
And so, you can use this when you're struggling
for inspiration, when you're looking for ideas,
or when you're just looking to generate
more reliable results.