Skip to content
Open access

Leveraging Large Language Models to Detect and Revise Unsafe Responses in Context-Sensitive Dialogues

Aug 2026 · WOCHAT2026: Workshop on Chatbots and Agentic Technologies · 0 citations · 27 references

TL;DR

This work proposes a pipeline that leverage LLMs as safety detector, editor and evaluator to mitigate undesired behaviour in human-computer dialogues and shows reduction in the unsafe dialogues after revision.

Abstract

Large Language Models (LLMs) excel at tasks like classification, summarisation, question answering among others, with performance comparable to humans. Despite these capabilities, leveraging LLMs to transform unsafe responses in context-sensitive dialogues is underexplored. In this work, we propose a pipeline that leverage LLMs as safety detector, editor and evaluator to mitigate undesired behaviour in human-computer dialogues. At the first iteration, our experimental results on two evaluation datasets show reduction in the unsafe dialogues from 47% to 13% and 48% to 2% respectively, with 82% and 92% agreement between the safety detector and evaluator after revision. Human evaluation of randomly sampled dialogues demonstrates reduction in unsafe responses after revision. Additionally, the revision LLM (editor) exhibits a higher proportion of refusals without compromising fluency and coherence of the revised dialogues.

Read PDF

Similar papers

Review Open access Aug 2026

Benchmark Research on Safety Value Alignment Evaluation of Open-Domain Dialogue Systems based on NLP

Large language models sometimes behave in puzzling ways. They pass various safety tests, yet in multi-turn dialogues, a few carefully crafted sentences can lead them astray into making dangerous judgments. We call this "extreme value alignment failure." A review of recent research reveals an awkward situation: attack, defense, evaluation, and theoretical studies operate in isolation, with little connection among them. This fragmentation results in repeated extreme risks that remain unresolved. This paper maps the four research directions onto a unified framework---"failure mode, attack vector, defense level, evaluation benchmark"---providing a theoretical coordinate for the field and directions for future evaluation research.

Pei-Rong Li · 0 citations

TalkFa: A Unified Benchmark for Farsi Dialogue Generation and Understanding

Farsi, spoken by more than 120 million people, lacks a comprehensive benchmark for dialogue generation and understanding. We introduce TALKFA, a unified benchmark comprising three complementary datasets: (1) WIKI-FADIAL, 4.2K Wikipedia-grounded dialogues for knowledge-grounded generation; (2) DAILYDIALOG-FA, 6.6K dialogues annotated for dialogue acts and emotions; and (3) PLAYDIAL-FA, 2.1K theatrical dialogues with sentiment labels. While LLMs assist data construction, every dialogue undergoes multi-stage review and revision by native Farsi speakers, and only the final human-approved dialogues are released. Experiments with six LLAMA and MISTRAL models show that LoRA substantially improves dialogue generation while requiring only 25-50% of the training data to recover over 90% of the final performance gains. Across classification tasks, FABERT achieves the best dialogue-act performance, LORA-MISTRAL-7B performs best on emotion recognition, and MISTRAL-24B achieves the highest sentiment score. Human evaluation and independent external validation demonstrate the reliability of the benchmark, while comparisons with GPT-4.1 as an LLM judge reveal that automatic metrics substantially overestimate dialogue quality. Zero-shot evaluation with frontier LLMs further shows that TalkFa remains a challenging benchmark. We will release all datasets, annotation guidelines, code, and checkpoints.

Neda Jamshidi, Kamyar Zeinalipour, F. Akbari et al. · 0 citations
#natural language process... Preprint Sep 2026

Controlling and Assessing Appropriate Persona Use in LLM-based Dialogue Generation

In persona-based dialogue generation (PDG), LLMs often overuse persona attributes by incorporating them regardless of dialogue context, resulting in unnatural responses. Despite its practical significance, the underlying causes remain unexplored, with no method to mitigate this problem or metric to assess the appropriateness of persona use. To address these issues, we first conduct a comprehensive analysis of LLM-based PDG, revealing that LLMs exhibit a systematic bias to incorporate all given persona attributes, and that existing metrics fail to capture contextual appropriateness. Building on these findings, we propose Self-CONtrastive Persona Overuse Suppression (SCONPOS) to mitigate overuse by directly intervening in LLMs'internal representations at the prompt encoding stage, without requiring any response generation. We further propose the Persona Appropriateness Score (PAS), a novel metric that penalizes both overuse and underuse. Experimental results demonstrate that SCONPOS systematically reduces overuse, and PAS captures the contextual appropriateness of persona use.

Jongkyung Shin, Inkyu Lee, Chiehyeon Lim · 0 citations
Open access Aug 2026

Context-Aware Large Language Model for Customer Support Chatbots

The results show that the RAG architecture provides a scalable alternative for creating precise, contextually grounded conversational agents, thereby mitigating some of the main drawbacks of LLMs.

Rabia Shabbir, K. Talpur, Shakeel Ahmad · 0 citations
Open access Aug 2026

Bridging context gaps in low-resource language chatbots through multilevel attention and hybrid embedding approaches

A multilevel-attention and hybrid-embedding framework that integrates FastText subword representations with multilingual BERT with potential applicability to other African languages is proposed to improve semantic understanding and context retention in conversational agents for Igbo.

G. C. Uzoaru, I. Ayogu, J. N. Odii et al. · 0 citations
Open access Jul 2026

Xbot: a GPT-based chatbot with transparent and empathetic behaviour

Experimental comparisons with GPT-4o vanilla across three roles, evaluated through an ablation study and a multi-evaluator panel combining LLM-based and human judges, consistently rank XBot as the best performing system, demonstrating superior empathy, role stability and conversational depth, while GPT-4o vanilla exhibits pervasive persona drift across all experimental scenarios.

Luciano Caroprese, Ester Zumpano, M. Aracne et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.