Using large language models to create narrative events

PeerJ Comput Sci. 2024 Oct 22:10:e2242. doi: 10.7717/peerj-cs.2242. eCollection 2024.

Abstract

Narratives play a crucial role in human communication, serving as a means to convey experiences, perspectives, and meanings across various domains. They are particularly significant in scientific communities, where narratives are often utilized to explain complex phenomena and share knowledge. This article explores the possibility of integrating large language models (LLMs) into a workflow that, exploiting the Semantic Web technologies, transforms raw textual data gathered by scientific communities into narratives. In particular, we focus on using LLMs to automatically create narrative events, maintaining the reliability of the generated texts. The study provides a conceptual definition of narrative events and evaluates the performance of different smaller LLMs compared to the requirements we identified. A key aspect of the experiment is the emphasis on maintaining the integrity of the original narratives in the LLM outputs, as experts often review texts produced by scientific communities to ensure their accuracy and reliability. We first perform an evaluation on a corpus of five narratives and then on a larger dataset comprising 124 narratives. LLaMA 2 is identified as the most suitable model for generating narrative events that closely align with the input texts, demonstrating its ability to generate high-quality narrative events. Prompt engineering techniques are then employed to enhance the performance of the selected model, leading to further improvements in the quality of the generated texts.

Keywords: Digital humanities; Events; Large language models; Narratives; Semantic web.

Associated data

  • figshare/10.6084/m9.figshare.25585683.v3

Grants and funding

This work was externally supported by ITSERR (Italian Strengthening of the ESFRI RI RESILIENCE), funded under the MUR National Recovery and Resilience Plan funded by the European Union-NextGenerationEU, and by CRAEFT, funded under grant agreement No 101094349 funded by the European Union’s Horizon Europe research and innovation programme. There was no additional external funding received for this study. The funders had no involvement in the study’s design, data collection and analysis, publication decision, or manuscript preparation.