Unsafe Utterance Span Rewriting for Safer Chatbot Responses
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current chatbots exhibit unsafe behavior due to training on large corpora containing offensive, unreliable, and toxic content, leading to direct offensiveness, agreement to toxic statements, or harmful advice, with existing methods failing to effectively detect and correct unsafe responses.
Innovation Solution
The development of the SafeConv dataset, which includes utterance-level safety labels, unsafe spans, and safe alternative responses, along with a neural network model for contextual rewriting, to generate context-relevant and safe alternatives.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If chatbots are trained on large corpora to improve conversational capability, then conversational fluency and context understanding are improved, but unsafe behavior and toxic content generation increase
Solution Approach 1:
The patent segments the safety verification process into multiple independent components: a safety classifier that evaluates utterances, an unsafe span identifier that locates problematic content, and a contextual rewriter that generates corrections. This segmentation allows the chatbot to maintain fluency while systematically addressing safety concerns through modular processing steps.
Solution Approach 2:
The patent introduces an intermediary safety verification module that sits between the chatbot's natural response generation and the final output. This intermediary layer includes a safety classifier and contextual rewriter that mediate between the chatbot's conversational capabilities and safety requirements, allowing both fluency and safety to coexist without directly conflicting.
2Reliability
If safety verification is added to detect unsafe responses, then safety is improved, but system complexity and processing time increase
Solution Approach 1:
The patent merges the safety verification functions into the existing chatbot architecture by integrating the safety classifier, unsafe span identifier, and contextual rewriter as components within the same system framework. This merging approach reduces overall system complexity compared to adding completely separate safety systems, while still providing comprehensive safety verification.
Solution Approach 2:
The patent performs preliminary safety classification and unsafe span identification before generating the final response. By identifying problematic content early in the processing pipeline and preparing corrective spans in advance, the system reduces the computational burden on subsequent processing stages and overall processing time.
3Reliability
If unsafe spans are replaced with corrective spans, then safety is improved, but contextual coherence and fluency may deteriorate
Solution Approach 1:
The patent applies local quality by making the contextual rewriter attentive to the specific position and context of each unsafe span within the utterance. The rewriter generates corrective spans that are locally adapted to maintain surrounding contextual coherence, rather than applying uniform replacement rules. This ensures that corrections preserve the overall flow and meaning of the conversation.
Solution Approach 2:
The patent implements feedback mechanisms where the safety classifier evaluates both the original utterance and the generated corrective spans. This feedback loop allows the system to iteratively refine corrective spans to ensure they maintain contextual coherence while achieving safety goals, preventing degradation of conversational quality.
Data Source
AI summary
Method, apparatus, and non-transitory storage medium for augmenting datasets for conversational safety, including generating a safety label for an utterance. The process may include identifying one or more inappropriate spans of a plurality of words for the utterance, and determining one or more corrective spans of the plurality of words for replacing the one or more inappropriate spans in the utterance. The process may also include generating revised utterance based on the one or more corrective spans and the utterance.


