Class-RAG: Real-Time Content Moderation with Retrieval Augmented Generation
On the map: Retrieval-augmented generation → Privacy and security of RAG
Abstract (arXiv)
Robust content moderation classifiers are essential for the safety of Generative AI systems. In this task, differences between safe and unsafe inputs are often extremely subtle, making it difficult for classifiers (and indeed, even humans) to properly distinguish violating vs. benign samples without context or explanation. Scaling risk discovery and mitigation through continuous model fine-tuning is also slow, challenging and costly, preventing developers from being able to respond quickly and effectively to emergent harms. We propose a Classification approach employing Retrieval-Augmented Generation (Class-RAG). Class-RAG extends the capability of its base LLM through access to a retrieval library which can be dynamically updated to enable semantic hotfixing for immediate, flexible risk mitigation. Compared to model fine-tuning, Class-RAG demonstrates flexibility and transparency in decision-making, outperforms on classification and is more robust against adversarial attack, as evidenced by empirical studies. Our findings also suggest that Class-RAG performance scales with retrieval library size, indicating that increasing the library size is a viable and low-cost approach to improve content moderation.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 22 of its 40 references that are in the map. First posted on arXiv 18 Oct 2024.
Builds on
22 of 40 references.
References · 22
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
- 2014Microsoft COCO: Common Objects in Contextcited by 17,608
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Zero-Shot Text-to-Image Generationcited by 4,288
- 2019Unsupervised Cross-lingual Representation Learning at Scalecited by 3,935
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
- 2022Precise Zero-Shot Dense Retrieval without Relevance Labelscited by 517
- 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Modelscited by 513
- 2024The Faiss librarycited by 376
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
10 more
- 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 298
- 2023Emu: Enhancing Image Generation Models Using Photogenic Needles in a Haystackcited by 279
- 2024RAFT: Adapting Language Model to Domain Specific RAGcited by 262
- 2023Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Modelscited by 175
- 2023Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Promptscited by 171
- 2023How to Train Your DRAGON: Diverse Augmentation Towards Generalizable Dense Retrievalcited by 118
- 2024Latent Guard: a Safety Framework for Text-to-image Generationcited by 71
- 2024UnsafeBench: Benchmarking Image Safety Classifiers on Real-World and AI-Generated Imagescited by 53
- 2024AI Risk Categorization Decoded (AIR 2024): From Government Regulations to Corporate Policiescited by 37
- 2024Content Moderation by LLM: From Accuracy to Legitimacycited by 30
Built on by
Citing papers per year: 2025: 4; 2026: 1.
5 papers.
- 2025RAR: Setting Knowledge Tripwires for Retrieval Augmented Rejectioncited by 3
- 2025Safeguarding Multimodal Knowledge Copyright in the RAG-as-a-Service Environmentcited by 1
- 2025Evaluating LLMs for Demographic-Targeted Social Bias Detection: A Comprehensive Benchmark Studycited by 1
- 2025Adversarial Distilled Retrieval-Augmented Guarding Model for Online Malicious Intent Detectioncited by 0
- 2026CHAIRO: Contextual Hierarchical Analogical Induction and Reasoning Optimization for LLMscited by 0
- 2026CHAIRO: Contextual Hierarchical Analogical Induction and Reasoning Optimization for LLMs12 Apr 2026
- 2025Evaluating LLMs for Demographic-Targeted Social Bias Detection: A Comprehensive Benchmark Study6 Oct 2025
- 2025Adversarial Distilled Retrieval-Augmented Guarding Model for Online Malicious Intent Detection18 Sep 2025
- 2025Safeguarding Multimodal Knowledge Copyright in the RAG-as-a-Service Environment10 Jun 2025
- 2025RAR: Setting Knowledge Tripwires for Retrieval Augmented Rejection19 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Towards Trustworthy Retrieval Augmented Generation for Large Language Models: A Survey
- 2024Towards More Robust Retrieval-Augmented Generation: Evaluating RAG Under Adversarial Poisoning Attacks
- 2025Retrieval-Augmented Generation: A Comprehensive Survey of Architectures, Enhancements, and Robustness Frontiers
- 2025RAG LLMs are Not Safer: A Safety Analysis of Retrieval-Augmented Generation for Large Language Models
- 2025Adversarial Threat Vectors and Risk Mitigation for Retrieval-Augmented Generation Systems
- 2024The Power of Noise: Redefining Retrieval for RAG Systems
- 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Models
- 2026Mapping the RAG Landscape: A Four Axis Taxonomy of Efficiency, Defense, Interactivity, and Reasoning