# Witscript: A System for Generating Improvised Jokes in a Conversation

arXiv: https://arxiv.org/abs/2302.02008 · HTML: https://mlsanity.com/paper/2302.02008/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 6 of its 47 references that are in the map.
- First posted on arXiv 3 Feb 2023.

## Builds on (most cited first, 6 of 6)

- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [Efficient Estimation of Word Representations in Vector Space](https://mlsanity.com/paper/1301.3781/) (2013)
- [DialoGPT: Large-Scale Generative Pre-training for Conversational Response Generation](https://mlsanity.com/paper/1911.00536/) (2019)
- [Towards a Human-like Open-Domain Chatbot](https://mlsanity.com/paper/2001.09977/) (2020)
- [Reverse-Engineering Satire, or "Paper on Computational Humor Accepted Despite Making Serious Advances"](https://mlsanity.com/paper/1901.03253/) (2019)
- [Humor in Word Embeddings: Cockamamie Gobbledegook for Nincompoops](https://mlsanity.com/paper/1902.02783/) (2019)

## Built on by (most cited first, 3 of 3)

- [Humor Mechanics: Advancing Humor Generation with Multistep Reasoning](https://mlsanity.com/paper/2405.07280/) (2024)
- [Understanding Literary Texts by LLMs: A Case Study of Ancient Chinese Poetry](https://mlsanity.com/paper/2409.00060/) (2024)
- [THInC: A Theory-Driven Framework for Computational Humor Detection](https://mlsanity.com/paper/2409.01232/) (2024)

## Abstract (arXiv)

A chatbot is perceived as more humanlike and likeable if it includes some jokes in its output. But most existing joke generators were not designed to be integrated into chatbots. This paper presents Witscript, a novel joke generation system that can improvise original, contextually relevant jokes, such as humorous responses during a conversation. The system is based on joke writing algorithms created by an expert comedy writer. Witscript employs well-known tools of natural language processing to extract keywords from a topic sentence and, using wordplay, to link those keywords and related words to create a punch line. Then a pretrained neural network language model that has been fine-tuned on a dataset of TV show monologue jokes is used to complete the joke response by filling the gap between the topic sentence and the punch line. A method of internal scoring filters out jokes that don't meet a preset standard of quality. Human evaluators judged Witscript's responses to input sentences to be jokes more than 40% of the time. This is evidence that Witscript represents an important next step toward giving a chatbot a humanlike sense of humor.
