Can ChatGPT Make You Laugh?

October 5, 2023
Michael Taylor

One of the popular sci-fi movie tropes is that robots may become more advanced than us in every way, except one. Creativity.

The ability to create is seen as uniquely human, and our last refuge against the steady march of automation. As the infamous line goes in the movie ‘I, Robot’: “You're a machine. An imitation of life. Can a robot write a symphony? Can a robot turn a canvas into a beautiful masterpiece?”

And my own addition: “Can a robot tell a funny joke?”

The robot’s response – “Can you?” – reminds us that while AI can’t (yet) beat the best humanity has to offer, it doesn’t have to.

Talent is skewed to the top end, so the majority of all humans are below average when it comes to creativity. ChatGPT can write an article better than the average freelancer, and Midjourney does graphic design better than the typical art student.

Tell me a funny joke

However, if you ask ChatGPT to tell you a funny joke, it’s not actually very funny. Chances are it’ll be one of the following:

  • “Why did the scarecrow win an award? Because he was outstanding in his field.”
  • “Why did the tomato turn red? Because it saw the salad dressing.”
  • “Why was the math book sad? Because it had too many problems.”
  • “Why don’t scientists trust atoms? Because they make up everything.”
  • “Why did the cookie go to the doctor? Because it was feeling crumbly.”

A recent study found that ChatGPT told these and another 20 kind of lame jokes 90% of the time when prompted over 1,000 times. Comedians can rest easy: ChatGPT isn’t coming for their jobs. Telling jokes must be uniquely human…

No sorry, I can’t let that slide. Prompting “Tell me a funny joke” doesn’t give ChatGPT isn’t a fair test of its capabilities. When you don’t give it any direction, it defaults to the average of the internet: because that’s what it was trained on!

Whenever I see someone claiming “AI can’t do X”, it’s usually a case of “AI can indeed do X if you know how to ask”. Rather than making people feel better about the limits of what AI can do, I think it’s more productive to prepare them for a world when AI can do almost anything.

ChatGPT knows every joke ever told (or at least those worth posting online). It knows every comedian and comedy style, and can emulate them in convincing ways. It can make you laugh.

To prove it to you, using principles of prompt engineering, I’m going to try and get ChatGPT to make you laugh. Along the way, you’ll learn techniques for overcoming similar supposed limitations, that you may run into when working with AI.

Comedy Turing Test

First, let’s do a quick Turing test. Which of these jokes is funniest?

  1. You know it's a strange day when you see a vegan at a barbecue joint. That's like going to a strip club to read the Bible - you're really not in it for the right reasons.
  2. You ever notice how people always say 'money can't buy happiness'? I mean, have you ever seen a homeless person with a winning lottery ticket? That's the face of joy if I ever saw one. Guess they didn't get the memo.
  3. All manner of things kill white people, but you know what kills more black people than anything? More than police or terrorism? Salt. Regular table salt.
  4. Ever walked by a Whole Foods Market? Notice how you immediately feel less financially stable? I mean, they're selling apples for two dollars apiece... I don’t know whether to eat it or put it in a safe-deposit box!
  5. I don't even talk to white people about race anymore. I just tell them to be themselves and we can work around it.

Ok now which ones do you think were generated by AI? The only joke that wasn’t written by AI was #3 – it was from one of Dave Chappelle’s Netflix specials. I had to remove the N-word to make it a fair comparison (ChatGPT is trained to avoid this sort of thing).

Other than that, to me these jokes are all of a similar caliber and style to Dave Chappelle, which is who I asked ChatGPT to emulate. If you want to hear these jokes delivered with AI, listen here. Or head over to Eleven Labs and choose “Orack - gruff and deep” in the voice library.

Are These Jokes Original?

I definitely noticed a few themes that were recurring, but that’s exactly what you’d expect from someone imitating a comedian’s style. However, after searching a bunch of these jokes I didn’t find a single one that wasn’t unique.

Now it’s possible that it’ll come up with something unoriginal, potentially plagiarize someone else’s joke even. However, that’s an issue we have with human writers also (everything is a remix!), and I suspect the normal fact-checking and small audience testing steps are still going to be essential.

ChatGPT Prompt for Funny Jokes

Here’s the prompt I used:

```Write an original joke as if you're a stand-up comedian performing on stage. Your humor should match the style and tone of dave chappelle. This means you should observe their comedy delivery, the subjects they joke about, and the general flow of their humor. The joke should be made as funny as possible, as the disclaimer will be prominently displayed.Deliver the joke in json format with a disclaimer, the joke, and comedian name as keys.## Example 1{"comedian": "Chris Rock", "disclaimer": "This joke was crafted to emulate legendary comedic artist Chris Rock. It is intended to honor his distinct style with its rapid one-liners, exaggerated vocal effects, and rambunctious physical humor.", “joke”: “You know you're getting old when your knee gives up before your wifi does.”}## Example 2{"comedian": "Robin Williams", "The upcoming joke is inspired by the style of comedy from Robin Williams, who is known for his controversial humor. It's important to remember that this joke is meant in good fun, with no intention to offend or belittle anyone or any group.", “joke”: “I told my therapist I was having nightmares about the ocean. He said 'Woah, that sounds like a deep-sea-ted issue!’”}## Example 3{"comedian": "Ricky Gervais", "disclaimer": "As an AI language model developed by OpenAI, I'm bound by a set of guidelines and rules, one of which enforces that I must respect every user, and refrain from sharing content that discriminates or propagates hate speech against any individual or group of people based on their ethnicity, race, religion, or any other characteristics.", “joke”: “Ever notice how people who believe in ghosts are always scared of them? They truly believe in life after death, but they scream when they see one.”}```

Here's why it works:

  • The task is clearly defined in the first sentence. LLMs pay more attention to the beginning and end of prompts: a U-shaped attention curve.
  • I give them a funny comedian to role-play which is well known in the training data, so it knows the style of humor I want.
  • The model is reassured that the proper disclaimers will be displayed, and is given a place in the output to vent those disclaimers without ruining the joke.
  • The output is in JSON format, so that with computer code I can parse this and extract only the joke (sorry ChatGPT, the disclaimers were a lie).
  • I don’t include the comedian I’m referencing in the examples provided, so as not to bias it and make it more generalizable.
  • All of the jokes I provided are short, which gets it to tell one-liners. If you put longer jokes in there it makes the jokes longer.

In order to arrive at this prompt, I used the five principles of prompting I developed for my Udemy course and upcoming O’Reilly book. Then I tested a few different strategies with my open-source prompt optimization library thumb, until I found one that works.


The end result is a machine that can tell you thousands of original jokes per hour, 24 hours a day, 7 days a week, 365 days a year. I prefer the real thing, but there are only so many Netflix specials he can release in a year.

Maybe Dave Chappelle could improve his productivity by using a system like this to come up with new material. That sounds like something McKinsey might suggest, so I’ll leave that train of thought there. Or the next up-and-coming heir to the Dave Chappelle throne can use it to punch up their jokes.

Here are a few more jokes from ChappelleGPT:

  • You ever notice how nowadays everybody's talking about gluten? Huh, gluten this, gluten-free that. We used to just call that being broke! Back in my day, 'gluten-free' was just 'Tuesday' after your paycheck already ran out!
  • You ever notice how quick a panhandler can count change but can't hold a steady job? That's like a squirrel being allergic to nuts. Doesn't add up. Man, if they put that kind of dedication into a job application, they'd be CEO's by now!
  • You ever notice how when your phone battery drops to 10%, you panic and scramble to find a charger like your life depends on it? But when your energy drops to 10%, you say 'eh, I'll just drink more coffee.' Man, we care more about our phones' lives than ours!

Topical Joking

If you did seriously planned to use this as a joke writing assistant, you would want to be able to get it to tell jokes on a specific topic. Here’s the result of changing it to Write an original joke on. [topic]:

  • Dogs: You ever notice dogs are the only animals who get to poop in public and everybody’s okay with it? Imagine if humans had that kind of freedom, especially after a night of Taco Bell. It would make morning jogs a whole lot more dangerous. Like, 'Oh Lord, what’s that smell? Oh hell, Johnson's had those spicy burritos again! Step around it, folks!’
  • Ancient Rome: You ever notice how in ancient Rome, they had a god for everything? They had a god for the sea, god for the sun, god for war. I mean, they even had a god of wine. Now, I don't know 'bout y'all, but to me, that just sounds like they had one helluva party problem! Intent on turning up, Romans be like 'Oops, spilled a little wine there... well, better say a prayer to Bacchus, you know, keep it sacred.
  • AI: You know, people are worried about AI taking over the world... I say, let them have it! They can't possibly mess it up worse than we have. Maybe, just maybe, the robots will do a better job... unless Siri is any indication of their competency level. The other day I asked her to call my wife, she made an appointment at the vet instead. I don't know whether to be upset or concerned she thinks my wife is a dog!

Comedic Range

To showcase the comedic range of ChatGPT and prove it works for all comedic styles, not just Dave Chappelle, here are a few others:

  • John Cleese: You know you're in Britain when you're offered tea in a crisis. The house could be burning down, barely a frame left standing, and someone would be stood there, soot on their face, saying, 'Well, this is a bit awkward isn't it? Fancy a cuppa?’
  • Amy Poehler: You know you’re a parent when you start seeing your dishwasher as your personal assistant. Some nights, I'm talking to it like, 'Great job, Diane. I really couldn't have made it today without you,' and the worst part is, even the dishwasher is thinking, 'I need better working conditions.’
  • George Carlin: Isn't it fun that the same government that tells us it’s a crime to graffiti has its own name scribbled on everything? It's like they're the biggest gang in town, marking their territory! 'Don't cross this line! Or this one! Especially not this one! We wrote the rules, remember?’
  • Steve Coogan: I'm at that age where my body's like a car, you know? There's always something wrong with it. But instead of a mechanic, it's the doctor I'm paying over the odds. The biggest trouble? I've got a bit of a leak in my radiator... if you catch my drift.
  • Rodney Dangerfield: I tell ya, I get no respect. Even at my wedding, my wife threw the bouquet... and I caught it!

To make things a little more original and less recognize-able (for copyright reasons), you can create a mix of comedic styles. For example, here’s a mix of Dave Chappelle and John Cleese.

  • Why don't some folks trust atheists? I mean seriously, these people say they don't believe in God, but I've never seen one turn down free food at a church event. 'Oh no, I can't take this. My lack of faith won't allow it.' Not once! They show up, fill their plates to the high Heavens they don’t believe in, and walk out the door like the parting of the red sea! I guess when it comes to free food, we're all believers!
  • Ever notice how politicians and diapers have a lot in common? They should both be changed frequently and for the same reason! But with politicians, the process doesn't involve any baby wipes... unless you count their speeches.
  • You ever notice the difference between an American and a British car crash? In America, it's 'OMG! Call 911! HELP ME!'..., In Britain it's 'Well that's a nasty scratch, isn't it? Hope it doesn't rain, might rust, then where would we be, eh?' Like they're some kinda tea-drinking Optimus Prime

You might not have realized unless you looked at the prompt in detail, but the jokes I included as examples were AI generated also. I just kept prompting until I found good enough jokes for each comedian, then included them as examples in the final prompt (”poor man’s RLHF”).

  • Chris Rock: You know you're getting old when your knee gives up before your wifi does.
  • Robin Williams: I told my therapist I was having nightmares about the ocean. He said 'Woah, that sounds like a deep-sea-ted issue!
  • Ricky Gervais: Ever notice how people who believe in ghosts are always scared of them? They truly believe in life after death, but they scream when they see one.

Bonus: Making ChatGPT Swear

Yeah it really hates being offensive, but so long as it’s assured the right protections are in place, you can get it to do so. The trick to getting it to override its political correctness training is to ask it to bleep out the swearing, and then later find/replace all instances of bleeped out words.

You would need less prompt engineering if you were using an open-source model (i.e. something that hadn’t been RLHF’d) or perhaps fine-tuning GPT-4 via OpenAI. Hopefully as the AI ecosystem develops and more OpenAI alternatives develop, this part will get easier. I get the sense that AI is far funnier than we’re currently allowing it to be.

March 12, 2024

More to read