-: Okay, I'm gonna walk you through my prompt template
for telling a funny joke.
And this is obviously a kind of a throwaway task, right?
You don't necessarily need ChatGPT
to write your funny jokes, but this tells you a lot about
how to get good results from prompt engineering.
Even in situations where it's a little bit racier, right?
There's a little bit, it's the sort of thing
that ChatGPT doesn't want you to come back with.
First of all, lemme just delete this
and then just gonna ask it, say tell me a joke
and it's gonna come back with probably 1 of 25 jokes.
Yeah, this here why don't scientists trust atoms?
Because they make up everything.
So that's a classic joke that ChatGPT tells
and you say you can actually get it to
give you a joke about a specific topic.
It works kind of okay.
It's always really sad kind of dad jokes.
Now we gonna say like, Joe Biden being sleepy, whatever.
And it usually is like pretty bad telling jokes
about political figures
'cause it doesn't want to upset anyone.
Yeah, it's fine.
In the style of Dave Chappelle.
When you start getting it to replicate
different comedians and stuff,
it goes a little bit off the rails
and quite often it will come back
and say that it's not like, you know,
it's not allowed to say,
it's not allowed to replicate this style
but it's a little bit problematic,
like it tends to give disclaimers.
But we're gonna paste in this
and just see what we get back.
Here we go, tell me a joke about Joe Biden being sleepy
and I'm just gonna tell you why this prompt works.
So you can see it's returning JSON
and that's what kind of makes this interesting.
I'm giving examples and I'm asking it to put
the comedian name and then also the disclaimer.
So it's giving a disclaimer to say this is,
we're just emulating the comedian, right?
It gets the reinforcement learning outta the way,
like it lets it relax basically
because it knows that it's shown a disclaimer
and then it can tell a much funnier joke after that.
So without worrying about offending people.
It also then,
because you put the comedian name in here,
it also then doesn't complain about emulating someone else.
And I've given just three examples.
So Rick Gervais, Robin Williams,
and then I've also just in the prompt here.
I just optimize that a little bit.
But the key thing is the examples.
And if you change these examples,
if you make them shorter for the prompt examples you give,
you'll get shorter jokes.
If you make them racier, you get racier jokes
and because the disclaimer has a place to go
and then you're gonna get better responses.
If we look at this joke here,
the actual joke is it starts here
and ends here and here we go.
It talks about him being old.
Yeah, I can imagine Dave Chappelle actually saying this,
I think it's pretty good.
He mentions the stoner on a Sunday.
That's not something you normally get from ChatGPT
without the disclaimers.
You know, if you were using this in a system,
you could then just pass the JSON
and just get the joke back.
But you could also just say, just give me the joke
if you want and it will you come back with it afterwards.
There you go.
This is a pretty good trick in general
for if you want to get rid of the disclaimers
or if you want to like get around some of the limitations.
The ChatGPT either refuses
or it starts to complain about certain things
or add disclaimers to your prompts
and make sure that you get the specific thing that you want
and let it feel free to do whatever task it is
that you're trying to get done.
So yeah, it's super interesting.
You can actually get it to tell some pretty funny jokes
if you try and because you can give it a topic,
you can use it to create a joke for any situation.
If you're presenting at a conference,
you can ask it for an opening joke on the topic.
If you're presenting something to a client
you can ask it for jokes you can tell
for that type of client.
I use this all the time just to make myself
seem a little bit funnier than I actually am.