mlsanityData to 14 Oct 2026

Class-RAG: Real-Time Content Moderation with Retrieval Augmented Generation

arXiv 2410.14881 ↗First posted 18 Oct 2024cs.AI cs.CLcited by 5

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

  1. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  2. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  5. 2021Zero-Shot Text-to-Image Generationcited by 4,288
  6. 2019Unsupervised Cross-lingual Representation Learning at Scalecited by 3,935
  7. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
  8. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
  9. 2022Precise Zero-Shot Dense Retrieval without Relevance Labelscited by 517
  10. 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Modelscited by 513
  11. 2024The Faiss librarycited by 376
  12. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
10 more
  1. 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 298
  2. 2023Emu: Enhancing Image Generation Models Using Photogenic Needles in a Haystackcited by 279
  3. 2024RAFT: Adapting Language Model to Domain Specific RAGcited by 262
  4. 2023Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Modelscited by 175
  5. 2023Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Promptscited by 171
  6. 2023How to Train Your DRAGON: Diverse Augmentation Towards Generalizable Dense Retrievalcited by 118
  7. 2024Latent Guard: a Safety Framework for Text-to-image Generationcited by 71
  8. 2024UnsafeBench: Benchmarking Image Safety Classifiers on Real-World and AI-Generated Imagescited by 53
  9. 2024AI Risk Categorization Decoded (AIR 2024): From Government Regulations to Corporate Policiescited by 37
  10. 2024Content Moderation by LLM: From Accuracy to Legitimacycited by 30

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 1.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Towards Trustworthy Retrieval Augmented Generation for Large Language Models: A Survey
  2. 2024Towards More Robust Retrieval-Augmented Generation: Evaluating RAG Under Adversarial Poisoning Attacks
  3. 2025Retrieval-Augmented Generation: A Comprehensive Survey of Architectures, Enhancements, and Robustness Frontiers
  4. 2025RAG LLMs are Not Safer: A Safety Analysis of Retrieval-Augmented Generation for Large Language Models
  5. 2025Adversarial Threat Vectors and Risk Mitigation for Retrieval-Augmented Generation Systems
  6. 2024The Power of Noise: Redefining Retrieval for RAG Systems
  7. 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Models
  8. 2026Mapping the RAG Landscape: A Four Axis Taxonomy of Efficiency, Defense, Interactivity, and Reasoning