TL;DR
This paper introduces RoTRAG, a novel framework for detecting harmful content in multi-turn conversations. RoTRAG grounds large language model (LLM) judgments in human-written "Rules of Thumb" (RoTs) retrieved from an external knowledge base, leading to more accurate, interpretable, and context-aware harm detection. A key innovation is a dynamic routing mechanism that intelligently decides when to retrieve new RoTs, optimizing efficiency without sacrificing performance.
What Problem Does This Paper Address?
Detecting harmful content in multi-turn dialogues is challenging because harm often emerges from the evolving context, not just isolated utterances. Existing methods primarily rely on LLMs' internal knowledge, leading to inconsistent judgments, lack of interpretability, and redundant reasoning. These models struggle to consistently apply nuanced social norms, especially when subtle phrasing or context shifts occur. Furthermore, re-evaluating the entire conversation for each turn is computationally expensive. The paper aims to bridge this gap by providing an explicit, external normative grounding for LLM-based harm assessment in dynamic conversational settings.
Methods
RoTRAG is a retrieval-augmented generation (RAG) framework with three core components:
- Turn-Level Classification and Routing: A lightweight classifier determines if a new "Rule of Thumb" (RoT) needs to be generated for the current turn. This is crucial for efficiency, as it avoids unnecessary retrieval and generation when prior reasoning is sufficient. The classifier considers the previous RoT and current dialogue context.
- Retrieval-Augmented RoT Generation: If new reasoning is required, the framework retrieves relevant RoTs from an external corpus (D-Rules-of-Thumb) based on the current turn's context. These retrieved RoTs, along with the dialogue context, are used to generate a new, turn-specific RoT. This process grounds the generated RoT in explicit normative principles.
- Prediction from Accumulated RoT History: The generated RoTs are accumulated over turns and, along with the dialogue history, are fed into a prediction module to determine the final harm severity. This allows the model to build a cumulative understanding of the conversation's normative trajectory.
Datasets
- Retrieval Corpus: D-Rules-of-Thumb dataset, containing structured action-RoT pairs.
- Training Data: ProsocialDialog dataset (train/valid splits) used for RoT generation and classifier training.
- Test Benchmarks:
- ProsocialDialog (test split): Used for safety classification and severity estimation (1-5 scale).
- Safety Reasoning Multi-Turn Dialogue (test split): Used for predicting question and response severity (0-10 scale).
Key Insights and Ideas
- Normative Grounding is Crucial: Explicitly incorporating human-written "Rules of Thumb" significantly improves harm detection accuracy and interpretability compared to relying solely on LLM's internal knowledge.
- Dynamic Routing for Efficiency: A selective routing mechanism is key to balancing performance and computational cost. Generating RoTs for every turn can lead to redundant or irrelevant information, while random routing is less effective than learned routing.
- RoTs as Intermediate Reasoning: RoTs are not just explanatory text; they serve as structured intermediate representations that directly support and improve the final harm prediction.
- Contextual Nuance Matters: Harm detection in multi-turn dialogues is highly sensitive to the evolving conversational context, interpersonal dynamics, and cumulative severity, which RoTRAG effectively captures through its turn-by-turn RoT generation and accumulation.
Key Results
- Performance Gains: RoTRAG consistently outperforms strong baselines (including advanced prompting and multi-agent methods) on both ProsocialDialog and Safety Reasoning Multi-Turn Dialogue datasets. It achieves an average relative gain of around 40% in F1 score and an 8.4% reduction in distributional error.
- Interpretability & Reasoning Quality: Expert evaluations show that RoTRAG's generated RoTs are highly reasonable (average score of 4.10/5) and that its reasoning is preferred over standard Chain-of-Thought (CoT) reasoning by a significant margin (74% vs. 26%).
- Efficiency: RoTRAG strikes a good balance between token cost and performance, being more efficient than complex multi-agent methods while still achieving superior results. Its inference time is moderate, slower than simple single-prompt baselines but much faster than methods requiring repeated generation.
- Routing Classifier Performance: The routing classifier achieves a validation accuracy of 0.8662, demonstrating its effectiveness in deciding when to trigger new RoT generation.
Limitations and Future Work
- Retrieval Corpus Dependency: The quality of RoTRAG is dependent on the coverage and reliability of the retrieval corpus. Missing or weakly matched RoTs can limit reasoning quality.
- Norm Simplification: "Rules of Thumb" are simplified abstractions and may not fully capture cultural variations, interpersonal nuances, or conflicting social values.
- Routing Errors: While effective, the routing classifier is not perfect and can make errors, potentially limiting overall performance.
- LLM Pipeline Vulnerabilities: As an LLM-based pipeline, RoTRAG can still be affected by retrieval errors, generation noise, and imperfect normative reasoning.
Future work could explore expanding the retrieval corpus, developing more nuanced normative representations, and improving the robustness of the routing classifier. The authors emphasize that RoTRAG should be used as a decision-support tool rather than a fully autonomous moderation system, highlighting the need for human oversight and ongoing evaluation for bias.
Summary updated