Limitation of AI: Why AI finds it difficult to generate humor?

The blog explores why Large Language Models (LLMs) struggle with generating humor, using a failed comic generation experiment at Antematter as a case study. It examines the technical limitations of LLMs in understanding context, creativity, and timing—essential elements of human humor—while suggesting potential improvements through diverse training data, refined ethical filters, and better human profile modeling.

đź’ˇ Articles
26 November 2024
Article Image

Large Language Models (LLMs) have become an integral part of our daily lives, assisting with a wide range of tasks, from content creation to complex automation. They play roles of varying importance, sometimes contributing significantly, other times more modestly. We anticipate that in the near future, LLMs will be capable of completing virtually every task. However, at present, there are still several intriguing tasks where LLMs struggle to produce even decent results, let alone a perfect output, which remains a distant dream for these particular challenges. So, what are these tasks that even the latest, most advanced models can't quite master?

What Makes a Good Humor?

Humor is a uniquely human concept, and crafting good humor is a challenge even for us, as it hinges on various factors. As a complex form of communication, humor relies heavily on context, which can include cultural background, linguistic nuances, and personal experiences. Moreover, timing is crucial—whether it's seizing the perfect moment in a conversation or providing comic relief in a tense situation. While context and timing are key, creativity also plays a significant role, often pushing the boundaries of conventional norms. A successful blend of timing, context, and creativity is what makes humor truly effective.

Why are LLMs Bad at Humor?

LLMs often struggle with humor due to a lack of creativity. While they can process vast amounts of data, their outputs are generated statistically rather than creatively. Humans possess an innate ability to think outside the box and bring unique perspectives to their humor, something LLMs cannot replicate. This creative spark is essential for crafting jokes that resonate on a deeper, more personal level.

Another challenge for LLMs is their limited grasp of context. Unlike humans, who draw on personal history, cultural background, and life experiences, LLMs lack these depth-forming elements. This absence of lived experience means they often miss the subtle nuances that can make humor relatable and effective, resulting in jokes that may fall flat or seem out of touch.

Moreover, LLMs are constrained by safety filters designed to prevent inappropriate content, which can limit their ability to push boundaries in humor. While these filters are crucial for ensuring respectful interactions, they can also restrict the spontaneity and edginess that often characterize great humor. As a result, LLMs may struggle to deliver jokes that are both safe and genuinely funny.

Failed Experiment: Humorous Comic Generation

At Antematter, we love building automations and AI workflows, so we came up with a fun idea for Comic Generation. Here's how it works: we keep a database of our employees and their characteristics as static data. When something interesting happens at work involving them, we input the situation into the system. The LLM then takes this context and creates a humorous comic, bringing a lighthearted twist to our daily office life.

An example:

Here are the inputs that were provided to the LLM to generate the humorous comics.

Employee 1: Team Lead

Employee 2: Human Resource Manager

Situation: A stressed team lead is carefully going over reports when the nosy HR Manager suddenly pops in, asking dramatically if the "rumored" spreadsheet disaster is really true.

Comic:

The results were clear: the LLM struggled with humor, failing to grasp the nuances of office dynamics. The dialogues came out disjointed, and the visuals were overly literal, missing the mark on subtle humor. Even after refining the prompts multiple times, the AI couldn't bridge the gap between genuine human wit and its own generated content.

The Technical Side: Why LLMs Stumble Over Jokes

Let's peek under the hood and understand why LLMs struggle with humor from a technical perspective, where their fundamental architecture creates some interesting limitations.

At their core, LLMs predict the next most likely token (word or part of a word) based on their training data. This creates an inherent challenge - jokes often work precisely because they defy expectations and play with unlikely connections. Imagine trying to be funny by always saying the most predictable thing! That's essentially what LLMs do when attempting humor.

LLMs also face the "context window limitation." While they can process impressive amounts of text, they have a finite window of context they can consider at once. Humor often requires holding multiple concepts in mind simultaneously and understanding their interrelations - something humans do naturally but LLMs find challenging.

This technical foundation helps explain why our comic generation experiment, and many similar attempts, often result in outputs that feel mechanical or miss the mark entirely.

Improving LLM’s Humor:

So far, we've observed the limitations of AI in delivering humor, supported by our experiment's less-than-successful outcome. However, this doesn't mean we've reached a dead end. Let's explore some potential ways to enhance LLMs' ability to generate humor and create more successful outcomes in the future.

Diverse and Comprehensive Contexts:

To improve humor generation, LLMs need exposure to a wide range of contexts. This involves training them with diverse data that captures humor across different cultures, languages, and scenarios. By understanding the nuances of humor from around the world, LLMs can produce more relatable and contextually appropriate comedic content. This breadth of context is essential for creating jokes that resonate with varied audiences and avoid cultural missteps.

Balanced and Flexible Ethical Filtering:

A more nuanced approach to ethical filtering can greatly enhance LLMs' creativity. By allowing them to explore humorous ideas within a safe framework, LLMs can push creative boundaries while still respecting societal norms. This flexibility enables the generation of humor that is both innovative and appropriate, striking a balance between spontaneity and responsibility.

Human Profile Development:

Incorporating human profiles into LLM training can refine their humor capabilities. By modeling profiles based on common humor acceptance traits found in real life, LLMs can better tailor their outputs to match audience preferences. This approach helps in crafting jokes that are more likely to strike the right chord with different groups, enhancing the overall effectiveness and appeal of AI-generated humor.

Conclusion:

In conclusion, while LLMs currently face challenges in generating humor, there are promising avenues for improvement. By enriching their contextual understanding with diverse cultural inputs, refining ethical filters to allow for more creative freedom, and leveraging human profiles to tailor humor, we can enhance their comedic capabilities. As these models evolve, they hold the potential to bring more laughter and creativity into our digital interactions, bridging the gap between human wit and artificial intelligence. The journey toward humorous AI is just beginning, with exciting possibilities ahead.

Want to leverage true reasoning capabilities of LLM to solve your complex use-cases, worry not because Antematter is there for you at every step!