Table of Contents
Fetching ...

Enhancing Rhetorical Figure Annotation: An Ontology-Based Web Application with RAG Integration

Ramona Kühn, Jelena Mitrović, Michael Granitzer

TL;DR

The paper tackles the scarcity of annotated German rhetorical figures by restructuring the GRhOOT ontology and deploying a web application, Find your Figure, to guide users in annotating figures. It couples an adapted, reified ontology with a Retrieval Augmented Generation (RAG) pipeline to provide LLM-assisted annotation while grounding responses in the ontology. The authors evaluate multiple RAG configurations using ontology-derived competency questions and demonstrate that a basic chunking setup can achieve strong grounding, with RAG reducing hallucinations. This work enables scalable data collection for NLP tasks (e.g., hate speech, fake news) and offers an educational, interactive resource for rhetorical-figure understanding.

Abstract

Rhetorical figures play an important role in our communication. They are used to convey subtle, implicit meaning, or to emphasize statements. We notice them in hate speech, fake news, and propaganda. By improving the systems for computational detection of rhetorical figures, we can also improve tasks such as hate speech and fake news detection, sentiment analysis, opinion mining, or argument mining. Unfortunately, there is a lack of annotated data, as well as qualified annotators that would help us build large corpora to train machine learning models for the detection of rhetorical figures. The situation is particularly difficult in languages other than English, and for rhetorical figures other than metaphor, sarcasm, and irony. To overcome this issue, we develop a web application called "Find your Figure" that facilitates the identification and annotation of German rhetorical figures. The application is based on the German Rhetorical ontology GRhOOT which we have specially adapted for this purpose. In addition, we improve the user experience with Retrieval Augmented Generation (RAG). In this paper, we present the restructuring of the ontology, the development of the web application, and the built-in RAG pipeline. We also identify the optimal RAG settings for our application. Our approach is one of the first to practically use rhetorical ontologies in combination with RAG and shows promising results.

Enhancing Rhetorical Figure Annotation: An Ontology-Based Web Application with RAG Integration

TL;DR

The paper tackles the scarcity of annotated German rhetorical figures by restructuring the GRhOOT ontology and deploying a web application, Find your Figure, to guide users in annotating figures. It couples an adapted, reified ontology with a Retrieval Augmented Generation (RAG) pipeline to provide LLM-assisted annotation while grounding responses in the ontology. The authors evaluate multiple RAG configurations using ontology-derived competency questions and demonstrate that a basic chunking setup can achieve strong grounding, with RAG reducing hallucinations. This work enables scalable data collection for NLP tasks (e.g., hate speech, fake news) and offers an educational, interactive resource for rhetorical-figure understanding.

Abstract

Rhetorical figures play an important role in our communication. They are used to convey subtle, implicit meaning, or to emphasize statements. We notice them in hate speech, fake news, and propaganda. By improving the systems for computational detection of rhetorical figures, we can also improve tasks such as hate speech and fake news detection, sentiment analysis, opinion mining, or argument mining. Unfortunately, there is a lack of annotated data, as well as qualified annotators that would help us build large corpora to train machine learning models for the detection of rhetorical figures. The situation is particularly difficult in languages other than English, and for rhetorical figures other than metaphor, sarcasm, and irony. To overcome this issue, we develop a web application called "Find your Figure" that facilitates the identification and annotation of German rhetorical figures. The application is based on the German Rhetorical ontology GRhOOT which we have specially adapted for this purpose. In addition, we improve the user experience with Retrieval Augmented Generation (RAG). In this paper, we present the restructuring of the ontology, the development of the web application, and the built-in RAG pipeline. We also identify the optimal RAG settings for our application. Our approach is one of the first to practically use rhetorical ontologies in combination with RAG and shows promising results.

Paper Structure

This paper contains 13 sections, 8 figures, 2 tables.

Figures (8)

  • Figure 1: Powerful LLMs such as ChatGPT still fail when asked for examples of certain rhetorical figures. In this example, the LLM claims that the last words in the sentences are repeated.
  • Figure 2: Scheme of the SQL Lite Database. The arrows indicate foreign key (FK) relations. PK denotes primary keys.
  • Figure 3: The page FyF.html helps users to find the name of a rhetorical figure hidden in a text. Properties can be selected from the dropdown lists.
  • Figure 4: The result of the user's submission. Rhetorical figures fulfilling the properties are displayed along with the option to select suitable ones.
  • Figure 5: Overview of the integrated RAG Pipeline for the GRhOOT ontology.
  • ...and 3 more figures