Manuscript Offprint

arXiv:2611.09282

Ontology-Driven Control of Conversational Agents with a Use-Case for Job Interview Practice

Barbara Gendron, Gaël Guibon, Mathieu D'aquin

Barbara Gendron¹, Gaël Guibon¹,², and Mathieu d'Aquin¹

¹ Université de Lorraine, CNRS, LORIA, Nancy France

² Université Sorbonne Paris Nord, LIPN, CNRS, UMR 7030, F-93430, Villetaneuse, France

barbara.gendron, gael.guibon, mathieu.daquin@loria.fr

Abstract. Large Language Models (LLMs) have been widely used as conversational agents in both domain-specific and open-domain situations. In domain-specific context, it is often necessary to adapt those LLMs to obtain conversations with desired characteristics, whether those apply at the level of each response (e.g. for tone or style) or more globally (i.e. at the level of a conversational strategy). Such adaptations are, however, generally realized in an ad hoc way, through specific, non-reusable, and non-transparent developments. In this paper, we propose an ontology-based approach to design conversational strategies that rely on the desired and measured characteristics of textual utterances in the conversation. Through a use case related to job interview practice, we show how this approach can be used to control LLMs to follow the strategy defined in the ontology. To this end, we automatically fine-tune the LLM to improve its compliance with ontologically-defined conversation characteristics. Our results show that training the LLM from formally defined concepts effectively enhances alignment with the requested characteristics. Hence, this work demonstrates how ontology-guided conversation control can be achieved while taking into account multiple, concurrent conversation aspects that are formally and transparently defined.

Keywords: conversation ontology · large language models · fine-tuning · controllable generation

1 Introduction

Nowadays, conversational agents (CA) are in everyday life leading to question the impact of their constant usage [24]. The need for knowledge-enhanced CA arises as agents need knowledge to adapt to different use cases and contexts of many types [14]. It is now essential to be able to manipulate and control this knowledge especially for domain-specific conversations [6]. Such domains are customer support for which recent work proposed a model-friendly knowledge representation [49], CA dedicated to the medical domain with appropriate knowledge and behavior [5], or even in human resources for which a recent dataset was proposed to cope with this limitation [59], to name a few. Even open-domain conversations require control on the content since they are more versatile. The recent first workshop on simulating conversational intelligence in chat [21] is evidence of this need.

In this work, we want to put external control on any domain conversational agents in order to make them follow a specified flow and adhere to given, well-defined constraints. To achieve this, it is important to be able to leverage general pretrained Large Language Models (LLMs) [4] without requiring new domain-specific data to fine-tune them. Indeed, although LLMs are black boxes, in many use cases it is desirable to have predictable outputs, or at least predictable behavior, throughout the conversation. To be transparent, such predictable behavior should be defined formally, in a way external to the LLM itself. This definition, which we call a conversation strategy, might refer to multiple specific aspects of conversations, from topic to style and tone, and the agent might need to learn to respond to some of those aspects, especially when they were absent or considered differently in the LLM's original training. Our main hypothesis is that we can logically define such strategies, corresponding aspects, and the constraints in order to align and constrain the agent's behavior. Thus, we aim to control the flow of the conversation as well as guiding the training process of the LLM.

We address two main Research Questions to validate this hypothesis. First, (RQ1) we aim to verify whether and how conversation strategies can be ontologically defined in a way that takes multiple, concurrent aspects into account. They have to be usable to derive at every turn the control instructions to be sent to the LLM. Those strategies should naturally, at least partially, be based on measuring some aspects of the current conversation and adapt to those aspects. This means also that both the content and other components (style, tone, etc.) of the conversation should be controllable ontology-based instructions. Second, (RQ2) we verify whether the compliance of an LLM to ontology-defined aspects of the conversation can be improved through fine-tuning. Such fine-tuning focuses on linguistic and affective elements of the conversation that are not straightforwardly controllable thanks to the pre-training of the LLM alone. It should not require dedicated domain-specific data but rely on the ontology to automatically annotate a generated dataset during training. Therefore, our contribution is threefold:

  1. To the best of our knowledge, we propose the first work on conversational strategies defined in an ontology.

  2. We show how an ontology can serve to control open-domain conversational agents.

  3. We show first results in improving the LLM's compliance with instruction from the ontology through fine-tuning.

As no comparable approaches, tasks, or datasets were found in the literature, we designed a suitably complex use case to illustrate and validate our method: A conversational agent that is adapted, thanks to ontology control, to support users in practicing for job interviews. We publicly share our code, data, and ontology 3^{3}.

3^{3} https://github.com/B-Gendron/OntoDrivenConversation

References (62)