Skip to content
AI Troll
← Back to the blog
  • ai
  • writing jokes
  • memes

How AI Generates Humor (and Why It's Sometimes Not Funny)

An honest look at how language models write jokes, why their humor often feels predictable or flat, and how to get funnier results from AI joke tools.

Ask an AI chatbot for a joke and you will usually get one. Ask for ten and you will probably notice something: a lot of them are puns, many follow the same structure, and some feel like they came from a cracker you snapped at a holiday dinner. Occasionally, though, a line lands that is genuinely funny.

Why the mix? This article explains, in plain terms, how AI models produce humor, where they struggle, and how you can work with them to get better results. We are building an AI humor tool, so we have a stake in this topic. We will still be honest about its limits.

How language models write anything

Large language models are trained on huge amounts of text. During training, they learn to predict what token (roughly a word or part of a word) is likely to come next, given everything before it. When you ask for a joke, the model generates a response one token at a time, each time choosing from the options it considers likely.

Two consequences matter for humor:

  1. The model has absorbed a lot of existing jokes. It knows the shapes of jokes: setups, punchlines, puns, “walks into a bar” openings.
  2. The model leans toward likely continuations. That is great for writing a clear email. It is a problem for comedy.

Why “likely” is the enemy of funny

Many theories of humor share a common idea: jokes work through surprise. The incongruity-resolution view says a joke sets up an expectation, breaks it, and then lets you find the hidden logic that makes the break make sense. Researchers Peter McGraw and Caleb Warren proposed the benign violation theory, which suggests something is funny when it seems wrong or threatening in some way, but also safe or okay at the same time.

Either way, a punchline needs to be unexpected but right. A model optimized to produce expected text is pulling in the opposite direction. Its first instinct is the most common punchline, which is often the one you have already heard.

Settings like “temperature” make output more random, which can increase surprise. But randomness is not the same as wit: turn it up too far and you get nonsense rather than clever twists.

The repetition problem

Because popular jokes appear many times in training data, models tend to fall back on them. In a 2023 study, researchers Sophie Jentzsch and Kristian Kersting asked ChatGPT for a joke more than a thousand times and found that the vast majority of responses were repeats of the same small set of 25 jokes. Models have changed since then, but the underlying pull toward familiar material is still there.

That is why asking “tell me a joke” tends to give you something you have heard before. The request has no context, so the model reaches for the most typical answer.

Why AI puns are hit and miss

Puns rely on sound and spelling: two meanings hiding in one word. Models do not hear words. They process text broken into tokens, which do not always line up neatly with syllables or pronunciation. That is one reason AI puns are sometimes brilliant and sometimes completely nonsensical, or explained in a way that suggests the model does not quite “get” its own joke.

The context gap

The best jokes among friends depend on shared context: the time Dan locked himself out of his own car twice in one day, the group’s running joke about Priya’s coffee obsession, the exact tone your friend group uses.

A model does not know any of that unless you tell it. Without context, it writes for an average audience, and humor aimed at everyone usually lands for no one.

What humans haveWhat the model has
Shared history with the targetOnly what you type
A sense of the room’s moodNo idea who is listening
Timing and deliveryText only
Knowledge of which topics hurtGeneral guidelines, no personal knowledge

Why AI humor can feel “safe” or bland

Most AI assistants are trained not only to predict text but also to be helpful and avoid harm. That training discourages cruel, offensive or risky content, which is a good thing. It is also a reason AI jokes can feel soft.

Some of the edge people enjoy in comedy comes from risk. Good comedians take risks with surprising angles and honest observations, not with cruelty. The challenge for an AI humor tool is to be bold in its angles while staying kind in its targets. That is the balance AI Troll is designed around: playful and specific, never hateful.

Where AI is genuinely useful for humor

Despite the limits, AI can be a great comedy partner if you use it the right way:

  • Brainstorming volume. It can generate dozens of angles in seconds. Most will be average, but you only need one or two great ones.
  • Breaking writer’s block. A mediocre line is often the starting point for a good one.
  • Format matching. It can fit a situation into a known structure, like a meme template or a “so ___ that” roast. See meme formats explained.
  • Variations. Once you find a good line, it can produce shorter, sillier or more deadpan versions.
  • Tone adjustments. It can make a line more work-safe or more family-friendly.

How to get funnier results from AI

Give specific, harmless details

Instead of “Write a roast for my friend,” try: “Write five playful roast lines for my friend Sam, who owns 61 houseplants, names all of them, and talks to them more than to us. Keep it affectionate.”

Name the format

“Write it as a ‘so ___ that’ joke,” “Use a backhanded compliment,” or “Caption the Two Buttons meme.” Structure gives the model something to aim for.

Ask for many options, then pick

Generate ten or twenty lines and keep the best. This is how professional comedy writers often work, too: lots of drafts, ruthless selection.

Push away from the obvious

Ask it to “avoid puns” or “skip the most obvious joke about this topic.” You are explicitly steering it away from the most likely answer.

Edit like a human

Shorten the lines. Swap a generic word for a specific detail only you know. Adjust it to sound like you. The final 10% of editing is where most of the funny lives.

The bottom line

AI generates humor by predicting text, and predictable text is the opposite of a good punchline. That is why AI jokes often feel familiar, flat or slightly off. But with specific context, a clear format and a human editor making the final call, AI can be a fast, tireless brainstorming partner.

That is the role we see for AI Troll: not a replacement for your sense of humor, but a way to get to your best line faster, while keeping it friendly rather than mean.

← All articles