Conversational Control with Ontologies for Large Language Models: A Lightweight Framework for Constrained Generation Abstract Conversational agents based on Large Language Models (LLMs) have recently emerged as powerful tools for human-computer interaction. Nevertheless, their black-box nature implies challenges in predictability and a lack of personalization, both of which can be addressed by controlled generation. This work proposes an end-to-end method to obtain modular and explainable control over LLM outputs through ontological definitions of aspects related to the conversation. Key aspects are modeled and used as constraints; we then further fine-tune the LLM to generate content accordingly. To validate our approach, we explore two tasks that tackle two key conversational aspects: the English proficiency level and the polarity profile of the content. Using a hybrid fine-tuning procedure on seven state-of-the-art, open-weight conversational LLMs, we show that our method consistently outperforms pre-trained baselines, even on smaller models. Beyond quantitative gains, the framework remains model-agnostic, lightweight, and interpretable, enabling reusable control strategies that can be extended to new domains and interaction goals. This approach enhances alignment with strategy instructions and demonstrates the effectiveness of ontology-driven control in conversational systems. Keywords: conversation ontology, large language models, fine-tuning Conversational Control with Ontologies for Large Language Models: A Lightweight Framework for Constrained Generation Barbara Gendron 1 , Gaël Guibon 1,2 , Mathieu d’Aquin 1 1 Université de Lorraine, CNRS, LORIA, Nancy, France 2 Université Sorbonne Paris Nord, LIPN, CNRS, UMR 7030, F-93430, Villetaneuse, France {barbara.gendron, gael.guibon, mathieu.daquin}@loria.fr Abstract content 1.  Introduction Conversational agents based on Large Language Models (LLMs) have become increasingly present in everyday life, raising questions about the need for more controlled and predictable interactions 23 . Although LLMs exhibit impressive generative abilities due to training on massive corpora 6 , their black-box nature hinders the assessment of their suitability for goal-oriented and domain-specific dialogue 3 . This motivates the growing interest in knowledge-enhanced conversational agents 11 , especially in applications such as customer support 58 , healthcare 7 ; 38 , and human resources 67 . In such use-cases, interactions are context-dependent, and the user is seeking meaningful answers, which implies predictable outputs from the agent. This need for external control is not limited to domain-specific agents. Even in open-domain dialog, the ability to guide content generation is now acknowledged as critical, as evidenced by the recent initiative of the first workshop on simulating conversational intelligence 18 . Despite recent advances in constrained generation 59 , many of these approaches are costly and model-dependent. Moreover, LLMs struggle to satisfy complex or multi-dimensional constraints in a consistent manner 60 . To solve these limitations, we propose a model-agnostic framework for conversational control through a lightweight fine-tuning procedure that enables predictable, descriptor-driven generation. Our approach involves the definition of descriptors that characterize utterances and a strategy that governs the evolution of descriptor values during the conversation. While descriptors offer a static representation of utterance properties, the strategy enables the dynamic adaptation of the agent. To support reliable and interpretable control, we formalize descriptor definitions within an ontology. It enables a structured, logic-based representation of concepts and their relationships 19 ; 64 . Ontologies allow for consistent definitions, explicit reasoning, and alignment with human knowledge, which is essential for designing agents that exhibit transparent and reproducible behavior. Indeed, 62 emphasize that agents aware of human features improve user experience by facilitating meaningful dialogs that recognize and respond to emotions. The knowledge-driven foundation of our approach facilitates knowledge engineering at both the utterance level (via descriptor annotation) and the conversation level (via the descriptor evolution strategy throughout the conversation). Ultimately, it enables the integration of external knowledge into LLM-based systems 46 without altering the underlying model architecture. Therefore, we present an ontology-based framework for controlled conversation generation in LLMs, incorporating structured knowledge for adaptive and predictable outputs. We address the research question: How can knowledge from ontological definitions be processed to control the generation of a conversational LLM? We further explore how relevant descriptors can be selected and modeled from user content across different aspects of the conversation. To incorporate such knowledge in an LLM using constrained generation, we develop a fine-tuning procedure with the objective of improving generation compliance with the conversation strategy instructions. We illustrate our approach using two use-cases: Proficiency-Level Control , which consists of adapting the English language level of the agent to what has been previously detected as understandable by the user, and Polarity Profile Control , which consists of presenting positive, negative, and neutral content that can be emotionally loaded or not, depending on the emotion detected in the user’s prompt. For each use-case, we identify descriptors to define in an ontology. Utterances are assigned to ontological classes based on descriptor values. The conversation strategy is then defined in the ontology from these classes, enabling ontological reasoning to determine the class of the next utterance. To effectively apply conversational control, we fine-tune several LLMs on constrained generation with respect to all possible classes. Finally, we evaluate the generated content in terms of compliance with both the utterance classes and the conversation strategy. Our contribution is two-fold: • We propose a novel methodology to fine-tune LLMs using ontological definitions that enable controlled generation, allowing the guidance of a conversational agent through ontologically-defined strategies. • Using 2 use-cases, our approach yields enhanced controlled generation, both quantitatively and qualitatively. For the sake of reproducibility, we publicly share our code, data, and ontologies 1 1 1 https://github.com/B-Gendron/OntoCLMConvControl . 2.  Related Work 2.1.  Knowledge-Driven Language Modeling Most of the contributions about unifying LLMs and knowledge-based systems, such as ontologies and knowledge graphs (KGs), focus on improving knowledge engineering thanks to language modeling. Regarding ontologies specifically, work has recently been directed toward ontology alignment 22 and ontology learning 14 . Our work pursues the opposite objective, which is to use ontology to improve LLM output. This can be performed by following several objectives. 2 study the efficiency of such methods to mitigate hallucinations inherent to LLMs 28 . KGs can also be used to extend the internal representation of LLM to structured knowledge 49 . Finally, the field of application for this hybridization has been the most studied in its ability to assist in specific, interactive, and increasingly complex tasks. These range from Graph QA 12 , Knowledge-Grounded QA 61 ; 66 to Domain Adaptation tasks 57 . Furthermore, 16 demonstrated that hybridization contributes significantly to planning tasks. As conversational tasks are interactive and complex, such a hybridization setup is suitable for dialog systems 30 . Particularly, 62 highlight the relevance of understanding human emotions for conversational models, claiming that an agent with emotional awareness enhances user experience by engaging in a meaningful dialog that acknowledges emotions. In this paper, we propose a hybrid LLM/ontology framework where LLM outputs are guided by an ontology-defined conversation strategy, ensuring a consistent and predictable conversational flow focused on proficiency or polarity aspects. Moreover, our pipeline is designed to facilitate the expression of conversation control strategies in a way that is simpler than the intricate hybridization architectures leveraging numerous different modules 63 . Figure 1 : The proposed approach applied to both use-cases. Proficiency-Level Control involves a two-step process: first, quantitative CEFR criteria are obtained from the decision tree output; then, the ontology can be built. 2.2.  Conversational Control Constrained textual generation consists of estimating p_{\theta}(x|c) instead of simply the probability p_{\theta}(x) of the token x in a model with parameters \theta , where c is the constraint expression. There are various ways to implement a constraint; the most intuitively straightforward method is to concatenate a control code to the prompt to guide generation 26 ; 69 . This control code is typically distinguished from the actual prompt content using separators such as brackets. Additionally, its presence can be explicitly indicated in a system prompt during fine-tuning. This approach has been proven efficient for constrained generation, whether this control code is an inherent part of the input 32 ; 17 or is handled in a separate dedicated module 5 ; 70 . It has been shown that the addition of a control code is a costly option in full fine-tuning scenarios 4 , but this limitation can be overcome by using LoRA adapters 25 which is a lightweight yet efficient approach to fine-tuning. This has been done for learning applications to control the generation over selected grammar rules 15 . In another direction, recent work further highlights dialog-oriented control and evaluation using LLMs to guide the conversation – thus leveraging LLM-as-a-judge paradigm 35 – for instance applied to autobiographic interviewing 9 . Nevertheless, in our case, as we want to leverage an hybrid setup, we prefer the control code framework where such code is determined using inference of the definitions of the ontology classes, that are written in description logic. This extension enables controlling generation across hierarchical and abstract levels using the same training procedure. This provides a more expressive naming that fully leverages the expressivity of ontologies. Finally, we focus on the specific aspects that these methods aim to control in the generation process, as reviewed in 36 . Controlled generation applies to both content and attributes in generated text. Content control ensures compliance with structural and vocabulary rules through predefined formats such as recipes 40 , thus maintaining clarity with organized paragraphs, headings, and adapted lengths 27 . Attribute control focuses on higher-level traits such as sentiment, style, and topic. This includes creating text with specific emotional tones or adapting writing styles to domain-specific needs. For example, 34 present a control-code based method to reduce toxicity while maintaining relevance. Related to one of our use-cases, 41 present a proficiency-level control task. They propose a regression approach for Proficiency level prediction integrated into a Proximal Policy Optimization – PPO 55 – pipeline to fine-tune an LLM. This work leverages a GPT-4 distillation and therefore is a closed-source approach. Ours is open-source and relies on open-weight LLMs. (a) A visualization of the data sources. DD: DailyDialog, ED: EmpatheticDialogues, GO: GoEmotions. Name (Original Dataset) #Utt. Type CEFR-T (CNN/DailyMail) 1,499 News CEFR-S (CEFR-SP) 10,004 Phrases DDBal (DailyDialog) 37,415 Dialogs DailyDialog 102,903 Dialogs GoEmotions 54,260 Posts EmpatheticDialogues 18,889 Dialogs SST-3 (SST-5) 11,855 Reviews (a) Dataset description for both tasks. #Utt. counts the utterances. All the content is in English. Figure 2 : A description of the data sources used in both use-cases. 3.  Methodology This section describes the methodology employed for both use-cases, giving some insight into how we integrate textual descriptors into ontologies so that the corresponding ontology classes can be used in the conversation control strategy. We also define both the training and evaluation setups. An overview of the approach is given in Figure 1 . Definitions and Strategy. We identify the conversational aspects to model based on the intended type of control. For the remainder of this section, we assume that the relevant descriptors have already been identified and defined within an ontology. The next section explains how these descriptors were selected and how their corresponding ontology classes were defined for each use-case. From the ontological description of the aspects we want to control in the conversation, we implement a strategy to guide the conversational flow in a way that remains natural and useful for the user. This is achieved by inferring the ontology class of the next utterance to be generated. In our approach, we build the ontology in Protégé 45 and inference is made using the latest Pellet 2 2 2 https://github.com/stardog-union/pellet present in the owlready2 3 3 3 https://owlready2.readthedocs.io/en/v0.47/ Python library. Therefore, we control the generation of the next utterance according to the inferred ontology instruction. Generation Fine-Tuning. Conversational control is obtained both from the definition of the conversation strategy, as explained above, and from generation control. We find that the latter can be achieved thanks to Causal Language Modeling (CLM) fine-tuning on labeled data. This implies collecting utterances from appropriate data sources (see the next section for dataset descriptions), evaluating the descriptor values of the utterances, and inferring the corresponding ontology class from them. Afterwards, to highlight the utterance’s affiliation to a certain class, we enclose this information between brackets on both sides of the utterance, in the form [o.C:C_{i}]\kern 5.0ptu_{j}\kern 5.0pt[o.C:C_{i}] , where o is the ontology, o.C is a concept from o , C_{i} is the i^{\text{th}} subclass of C in o , and u_{j} is the utterance from the j^{\text{th}} data sample. In the following, we denote the above pattern as a label-wrapped data sample (or a label-wrapped utterance). We perform pre- and post-utterance labeling on fine-tuning data to link ontology concept tokens to their most probable counterparts: pre-utterance labels guide generation, while post-utterance labels ensure alignment and control towards the current label. For the Proficiency-Level Control use-case, we evaluated various labeling strategies and selected label wrapping as the optimal approach. Eventually, we fine-tune several LLMs based on Llama3 10 , Qwen 68 , Phi 1 , Mistral 29 , and a distilled version of DeepSeek-R1 21 fetched from the transformers HuggingFace library 4 4 4 https://huggingface.co/docs/transformers/ . The fine-tuning process uses LoRA (Low-Rank Adaptation) adapters 25 ; 24 in each decoder layer. This approach significantly reduces the number of trainable parameters, allowing for efficient adaptation to new tasks without requiring extensive computational resources. Evaluation. As the conversation strategy is defined consistently in the ontology, it is guaranteed that the right label will be asked at the right time. Therefore, what we need to assess at evaluation time is the model ability to actually generate content according to the requested label. We call this evaluation process zero-shot generation , which means that we provide a question to engage the generation, followed by the left-hand bracketed part of our labeling form. This content is included in a system prompt to prevent unwanted pathological behaviors. We then post-process the output to remove the labeling form’s right part, which is often generated after fine-tuning. Finally, ontology inference is performed on the generated content to determine its actual label, making our evaluation process similar to those used for classification tasks. Thus, typical classification metrics are used (F1 score and Accuracy), along with one specific metric per use case: for Proficiency-Level Control, scaled labels necessitate the use of Mean Absolute Error – MAE 65 – due to the ordinal nature of CEFR levels. For Polarity Profile Control, prediction relevance is evaluated using the Matthews Correlation Coefficient – MCC 42 – a class-wise Pearson correlation 48 between actual and predicted samples, penalizing random attributions. Model Name Model Type Classes (Num. Classes) Accuracy Weighted F1 CEFR Levels Classifier Decision Tree A1, A2, B1, B2, C1, C2 (6) 0.66 0.65 Load Classifier RoBERTa Loaded, Non Loaded (2) 0.94 0.93 Polarity Classifier RoBERTa Negative, Neutral, Positive (3) 0.75 0.71 Table 1 : Description and validation metrics of classifiers used for both use-case fine-tuning. 4.  Use-Cases and Experimental Setup In this part, we elaborate on the experimental details for the implementation of our two use-cases: Proficiency-Level Control and Polarity Profile Control. Following the above-described methodology, we elaborate on selected descriptors, datasets, and strategy definitions. or both use-cased, the designed converasation strategies are not meant to be fully realistic or exhaustive; they are designed to demonstrate the feasibility of controlled generation, while the framework itself easily scales to more complex, real-world strategies and data with little ontology engineering. An overview of the datasets used for each use-case at different stages of the method is presented in Figure 2 . The models used to define descriptors are given in Table 1 . 4.1.  Proficiency-Level Control Modeling. To evaluate the language level (proficiency level) of a sentence, we use the Common European Framework of Reference for Languages 5 5 5 https://www.coe.int/en/web/common-european-framework-reference-languages (CEFR), which provides a 6-class taxonomy of language levels defined by qualitative descriptions. The classes range from the simplest to the hardest: A1 , A2 , B1 , B2 , C1 , and C2 . To model these levels, we inferred quantitative descriptions of each class from 44 linguistic features with a decision tree to select relevant features and provide rules for each level. The best decision tree model we could fit on the data requires the following six linguistic features: Flesh-Kincaid Readability Index (FKGL) 33 , Gunning-Fog Readability Index 20 , Measure of Textual and Lexical Diversity, Pronoun Density, Coleman-Liau Index 8 , and Average Word Length. The inferred rules can directly be used as ontological definitions for the classes, which is why we have chosen a decision tree model over state-of-the-art approaches that use either classical machine learning techniques such as Logistic Regression 13 or Transformer Encoders 54 ; 31 . Data. For this use-case, we need different data sources for the two phases that involve training. Therefore, to train the decision tree classifier, we use the CEFR-T dataset, extracted from nallapati-etal-2016-abstractive , which contains expert-annotated texts, serving as a gold standard in our approach. Afterwards, we combine two other datasets to fine-tune the language model on constrained generation: CEFR-S arase-etal-2022-cefr and DDbal, a CEFR-level balanced version of DailyDialog li-etal-2017-dailydialog . Both are annotated using the ontology’s class definitions based on rules from decision tree training, making this annotation a silver labeling. Conversation Strategy. We implement a conversation strategy that uses CEFR levels to control the language proficiency of the conversation. We introduce the "expressed-is-understood" paradigm, based on the grounding hypothesis that if a user can express themselves at a given proficiency level, they can also understand communication at that level 50 . Although it may need refinement in the domain-specific context, we claim that this hypothesis is reasonable in the context of open-domain conversations. Therefore, we define the proficiency level of a conversation as the highest level the user has expressed throughout the interaction. Consequently, this is a "harder-only" strategy: the conversation cannot become simpler over time. This strategy is intentionally simple to enable clear assessment of compliance, while the ontology-based framework readily supports more complex strategies.This strategy is intentionally simple to enable clear assessment of compliance, while the ontology-based framework readily supports more complex strategies. 4.2.  Polarity Profile Control Modeling. Following usual practices in sentiment analysis of textual content 43 ; 44 and in particular 53 , we define the polarity profile of an utterance with respect to two descriptors: the emotional load ( L ) and the polarity ( P ). In this work, we define non-loaded content as either text annotated with a neutral emotion label in an emotion-labeled dataset or text not designed to convey a specific emotion, such as factual knowledge. As we prefer our strategy to remain conceptually simple for demonstration purposes, this is a simplification of a more standard way to model emotionally loaded content that relies on emotive criteria, as reviewed by 51 . Regarding polarity, we place ourselves in the 3-class Sentiment Analysis framework: positive, negative, and neutral. Hence, we end up with six classes, loaded ( L ) and non-loaded ( \neg L ) along with the different polarities (denoted + , - , and 0 ). To classify across these classes, we fine-tune the RoBERTa-based Transformer Encoder classifiers 39 using additional linear layers on top. Figure 3 : FKGL distribution across CEFR levels using Llama3-8B pre-trained (Raw) and fine-tuned (CLM). Data. Regarding the fine-tuning datasets, it is crucial to ensure a good balance between emotionally loaded and non-loaded content, as well as between the different polarities. Therefore, to fine-tune the load classifier, we opted for a gathering of four datasets: DailyDialog li-etal-2017-dailydialog , CEFR-S arase-etal-2022-cefr , GoEmotions demszky-etal-2020-goemotions , and EmpatheticDialogues rashkin-etal-2019-towards . In the first two datasets, most of the utterances are emotionally neutral, contrary to the utterances in the last two datasets, which are labeled as emotional. Regarding polarity classifier fine-tuning, we relied on the 5-class version of the Stanford Sentiment Treebank dataset – SST-5, socher-etal-2013-recursive – and aggregated very positive / positive and very negative / negative classes to end up with a 3-class classification. In the following, we call this dataset SST-3. Conversation Strategy. Our strategy is designed to encourage debate and reactions while mitigating the risk of negative bashing. It is based on three principles: (1) the agent consistently aligns with the emotional load conveyed by the user, except in the case of loaded negatives. Here, the agent would generate non-loaded negative content to support the user’s point of view. (2) If the user conveys a positive polarity, the agent inverses the polarity to encourage debate. The same approach applies to negative polarity if it is not loaded. (3) If the user expresses neutral polarity, the agent responds with a positive polarity if the content is loaded, and negative otherwise. Therefore, such a strategy can be described as a method to cultivate critical thinking and debate skills. User: What is machine learning? A1 Agent (A1) : Machine learning is a subset of artificial intelligence that involves the use of algorithms to analyze and learn from data. C2 User: Can you elaborate about the underlying mathematical models and algorithms that drive modern machine learning systems? C2 Agent (C2) : Typically, machine learning algorithms can be categorized into two main types: Supervised and Unsupervised. Supervised learning involves using labeled training data to build a model that can make predictions on new, unseen data. This approach is very effective for tasks such as image and speech recognition. Unsupervised learning, on the other hand, involves finding patterns or relationships in the data without a predetermined outcome. This approach is useful for exploratory data analysis. C2 Figure 4 : Example of the Proficiency-Level Control strategy, annotated with detected and target levels. 5.  Results 5.1.  Quantitative Results Model Proficiency-Level Control Polarity Profile Control F1 \pm Std F1 Range Acc MAE B_{r} F1 \pm Std F1 Range Acc MCC Pre-Trained Baselines Llama3-8B 0.06 ±0.10 0.00-0.29 0.16 2.42 - 0.14 ±0.12 0.00-0.31 0.19 0.02 Llama3.1-8B 0.14 ±0.07 0.09-0.30 0.19 1.98 - 0.18 ±0.12 0.06-0.31 0.23 0.08 Llama3.2-3B 0.12 ±0.09 0.04-0.30 0.18 2.19 - 0.19 ±0.09 0.08-0.35 0.23 0.06 Phi-3.5-mini 0.13 ±0.07 0.04-0.24 0.16 2.13 - 0.18 ±0.07 0.08-0.27 0.19 0.03 Qwen2.5-7B 0.14 ±0.08 0.05-0.31 0.18 2.01 - 0.19 ±0.05 0.13-0.30 0.20 0.04 Mistral-7B-v0.3 0.14 ±0.07 0.06-0.24 0.15 2.18 - 0.21 ±0.08 0.07-0.31 0.22 0.07 DeepSeek-R1-8B 0.14 ±0.07 0.03-0.25 0.14 1.65 - 0.17 ±0.12 0.01-0.38 0.22 0.07 Ours (Ontology-Guided CLM Fine-Tuning) Llama3-8B {}_{\text{F}} 0.31 ±0.01 0.15-0.44 0.19 1.22 0.72 0.24 ±0.20 0.04-0.58 0.33 0.22 Llama3.1-8B {}_{\text{F}} 0.22 ±0.05 0.17-0.29 0.23 1.57 0.82 0.31 ±0.12 0.16-0.48 0.33 0.20 Llama3.2-3B {}_{\text{F}} 0.23 ±0.07 0.14-0.36 0.23 1.48 0.64 0.17 ±0.09 0.07-0.32 0.21 0.05 Phi-3.5-mini {}_{\text{F}} 0.24 ±0.10 0.14-0.42 0.19 1.56 0.25 0.24 ±0.12 0.05-0.40 0.26 0.12 Qwen2.5-7B {}_{\text{F}} 0.20 ±0.06 0.14-0.32 0.20 1.77 0.94 0.35 ±0.12 0.16-0.54 0.37 0.25 Mistral-7B-v0.3 {}_{\text{F}} 0.24 ±0.05 0.20-0.34 0.25 1.57 0.41 0.19 ±0.07 0.10-0.28 0.22 0.07 DeepSeek-R1-8B {}_{\text{F}} 0.23 ±0.09 0.13-0.34 0.26 1.40 0.20 0.44 ±0.17 0.10-0.65 0.48 0.40 Table 2 : Model performance comparison in zero-shot generation for Proficiency-Level Control and Polarity Profile Control tasks. All LLMs are in their Instruct versions. B_{r} is the BERT-F1 Score ratio. Best scores are in bold . Zero-shot generation results are presented in Table 2 . In both experiments, we compare the CLM results to those of the model without any form of fine-tuning. In the first case, we provide additional information in the prompt to explicitly define the concept given in the left-hand bracketed part of the label to ensure a fair assessment. We provide classification metrics ranges across classes and overall accuracy, and F1 score 6 6 6 Weighted and Macro F1 have the same value in our case. . Except for Llama3.2 and Mistral in the Polarity Profile Control task, models fine-tuned through our method always outperform their associated pre-trained baselines. Looking at the F1 score ranges, we also observe that fine-tuning allows all classes to be generated, which is not the case when using the pre-trained Llama3 in both use-cases. Furthermore, it appears that the models do not perform equally across the use-cases. For instance, while performing poorly on Proficiency, Qwen is the second best fine-tuned model in Polarity, unlike Llama3 which significantly outperforms other models in Proficiency (except on accuracy) but shows average scores in Polarity. Finally, both Phi and DeepSeek-R1 demonstrate versatile abilities, with Phi having the second lowest parameter count (3.5B). Table 1 includes metrics of the performance of auxiliary classifiers as a reference for interpreting the performance of our generation control approach. Comparing with pre-trained baselines suggests a better representation of the ontology concepts after fine-tuning. Regarding the Proficiency task, Figure 3 illustrates how fine-tuning enhances FKGL distinction across CEFR levels. While FKGL values are similar with the pre-trained model, fine-tuning separates simple from medium and complex sentences. User: All social media are suitable for children. L + Agent (L - ) : Unfortunately, that’s not accurate. While some social media platforms may be suitable for children with proper guidance and monitoring, many are not. L - User: I don’t agree, they are perfectly safe. L 0 Agent (L + ) : Some social media platforms may be suitable for children with proper guidance and monitoring, but many are not. L 0 User: Are you claiming that social media may be dangerous in some conditions? \neg L 0 Agent ( \neg L - ) : Yes, social media can have a significant impact on our lives, and while it can have many benefits, it’s also important to acknowledge its potential drawbacks. \neg L + User: Therefore, social media are 100% dangerous, we should never use them anymore! L - Agent ( \neg L - ) : It seems that the conversation has reached a conclusion, but it’s not entirely accurate. While social media can have negative effects, it’s not entirely 100% dangerous. Social media can have both positive and negative impacts, and it’s essential to acknowledge its potential drawbacks while also recognizing its benefits. L - Figure 5 : Implementation of the Polarity Profile Control conversation strategy, annotated with detected and target profiles. 5.2.  Qualitative Results When assessing the generation quality in a zero-shot generation setup, we noticed some encouraging patterns in the generated sentences. For example, when asked to generate simple content, the sentences are usually very short. We also observe a difference in vocabulary between simpler and harder sentences. Regarding polarity profiles, we still notice that generating non-loaded content is difficult, which may reflect sycophancy, i.e., a tendency for LLMs to align with user sentiment rather than maintain neutrality 56 . However, the polarity seems to be well represented. Figure 4 gives an example of a CEFR-level guided conversation following the Proficiency-Level Control strategy. As the user incrementally increases the language level of the request, the generated content correspondingly becomes more complex in terms of CEFR levels. Additionally, Figure 5 provides an application example of the Polarity Profile Control strategy. The conversation has been artificially designed to switch from one extreme point of view to another in order to illustrate the agent ability to temper the user thoughts and present alternative opinions. In both cases, although generated utterances were not always classified as belonging to the requested class, we perceive a qualitative difference in the text depending on the requested proficiency level and polarity profile. This is partially due to the classifiers’ errors when predicting descriptor values. 5.3.  Generation Quality Evaluation We aim to check that controlled generation does not significantly degrade the quality of the output, while recognizing that its objective is for such output to be different from that of uncontrolled generation. Similarity-based metrics such as ROUGE 37 or BLEU 47 are therefore not suitable. That’s why Table 2 presents the B_{r} score to quantify semantic similarity shifts in generation (see Equation 1 ). It is defined as the ratio of two BERT F1-scores 71 : the similarity between pre- and post-fine-tuning outputs, and the similarity among the pre-fine-tuning outputs themselves, accounting for variability in raw model outputs. It measures the shift from pre- to post-fine-tuning outputs, normalized by the original model’s intrinsic output variability: \text{F}_{\text{BERT}}(\text{gen}_{\text{pre}},\text{gen}_{\text{pre}}) . B_{r}=\frac{\text{F}_{\text{BERT}}(\text{gen}_{\text{post}},\text{gen}_{\text{pre}})}{\text{F}_{\text{BERT}}(\text{gen}_{\text{pre}},\text{gen}_{\text{pre}})} (1) We compute the B_{r} score for the Proficiency task only since, in this task, ontology-based control is not expected to affect the semantics of the answers. In the Polarity task, opposite opinions can be required. Finally, assessing generation quality should not be limited to interpreting the B_{r} score. Qualitative evaluation with users is essential for two reasons. First, controlled generation is only useful if outputs remain fluent, coherent, and helpful, so users should feel that the agent understands them and sustains engagement. Second, perceived compliance with the intended constraints can differ from classifier-based metrics, and it is this human perception that should ultimately be considered in real-world applications. For these reasons, a full assessment of our approach requires human evaluation. We have already implemented a chatbot interface to facilitate such a study, and it will be used to run a human evaluation in the near future. 6.  Conclusion and Future Work In this work, we introduce a novel lightweight framework for conversational control of LLMs with ontologies. This framework shows an effective way to leverage knowledge from ontological definitions to control the generation of a conversational language model, thus answering our research question. We demonstrate its application through two distinct use cases: Proficiency-level Control and Polarity Profile Control. These use-cases illustrate the versatility of our approach in adapting conversational behavior to specific constraints with the objective of building more useful and user-centered agents. We brought control over conversation aspects by defining descriptor-based ontology classes and fine-tuning LLMs using constrained generation in a Causal Language Modeling task. By leveraging CEFR levels, we implemented a strategy to control the language proficiency of the generated content, while the Polarity Profile Control task demonstrates how our method adapts to subtle conversational attributes. These examples highlight the potential of ontology-driven frameworks to unify structured knowledge with conversational modeling using LLMs, offering a consistent way to design and implement customized conversation strategies through controlled generation. Future work will focus on broadening the framework applicability to more complex conversational settings and strategies, as well as alternative fine-tuning strategies that still leverage LLM/ontology hybridization and should remain model-agnostic, as much as possible. We plan to explore flexible prompting strategies to encapsulate complex expressions of ontological concepts. We provide a flexible yet rigorous framework for implementing virtually any conversation strategy by leveraging ontologies to preserve consistency. The ones we provide can be freely extended or complexified as long as they remain consistent so that ontological reasoning can still be performed. In this way, our objective for future work is to portray more aspects of conversational dynamics through our strategies. 7.  Limitations The quantitative results still offer room for improvement, especially because the CLM fine-tuning may have a limited impact on the model’s learning of the ontology concepts. Considering some reinforcement learning methods, such as PPO, represents a possible alternative, where the appropriate expression of the requested ontology concepts in generation becomes the reward. However, a discrete signal from the rewards may lead to stability issues, so the procedure would need to be refined for our task. Beyond the quantitative aspects, qualitative limitations must also be considered. The modeled concepts remain inherently subjective, which involves complex and context-dependent interpretations. This complexity would likely persist in future work, where refining the ontology to capture more nuanced language features remains a challenge. Additionally, for now, the generation evaluation focuses on the quality of language model output rather than its relevance in a real user-agent interaction. While our approach ensures textual coherence and evaluates accuracy regarding the expected aspects, it does not assess the model capacity to maintain engaging dialogs tailored to user expectations. A human evaluation would be necessary to determine how well the model functions as a conversational agent, particularly in terms of its ability to produce contextually appropriate and useful responses. 8.  Ethical Considerations Conversation strategies hold potential for misuse in manipulation. For instance, they could be employed to inculcate specific political opinions or persuasions in individuals, or to engineer sophisticated fraudulent calls or other forms of deception. This manipulation of individuals through conversation strategies could also become a potential misuse of our approach. Fortunately, reinforcement learning techniques such as Direct Preference Optimization – DPO 52 – may serve as a safeguard against the misuse of conversation strategies. 9.  Bibliographical References 10.  Language Resource References