Universidade de Coimbro
Humor Generation in Portuguese with Genetic Algorithms and Large Language Models
Abstract
dc:description.abstractHumor is an universal aspect of human communication, which is present in oureveryday lives. However generating it using Artificial Intelligence (AI) remains acomplex challenge, in particular for less-sourced languages such as Portuguese,having in mind that cultural and linguistic references play a crucial role.This work aims to explore the development and evaluation of various hu-mor generation methods in Portuguese, leveraging recent advancements in deeplearning and Natural Language Generation (NLG). For this, we explore the taskof rewriting a text to make it funny, using three different methods that take ad-vantage of both the data available for Portuguese and transformers. These meth-ods are: (i) fine-tuning a T5-based model on Portuguese datasets, chosen for itsproven capability on text generation tasks; (ii) instruction tuning Large LanguageModelss (LLMs) such as LLaMA, which are the current trend in AI due to theirflexibility and ability to generalize across a wide range of tasks; and (iii) creatinga Genetic Algorithm (GA) to evolve text using BERT both as the mutation oper-ator and the fitness function, chosen due to being an understudied approach inthis field, which could prove to be effective. We assess each of the model’s per-formance through manual and qualitative evaluations involving native speakers.By analyzing different methods to tackle the task of Humor Generation in Por-tuguese this work contributes to a relatively understudied domain in AI, provid-ing insights into adapting models for Humor Generation in less-resourced lan-guages. The results reveal that only the approaches based on prompting LLMsgenerated potentially funny texts most of the time, suggesting that the complex-ity of humor is better targeted with larger models, even if not specifically trainedfor the task.
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Moreira, André Filipe de Oliveira
- Advisor dc:contributor.advisor
-
- Oliveira, Hugo Ricardo Gonçalo
Subjects
dc:subject × 9Rights
dc:rights- Statement dc:rights
-
- openAccess
- Language dc:language.iso
- eng
Identifiers
dc:identifier.*- Dc Identifier Tid
- 204037026