Re-ranking Using Large Language Models for Mitigating Exposure to Harmful Content on Social Media Platforms
Rajvardhan Oak, Muhammad Haroon, Claire Jo, Magdalena Wojcieszak, Anshuman Chhabra
TL;DR
This work tackles exposure to harmful content in platform recommendations by proposing an LLM-based re-ranking framework that uses preferential pairwise ranking with constraint prompts. It introduces $TP_k$, $PP_k$, and $EWN$ as metrics to evaluate how well the re-ranking minimizes harm while preserving useful content, and demonstrates strong gains over traditional moderation baselines across three harm datasets and multiple LLMs in zero-shot and few-shot settings. The results show that the approach generalizes across harm types and remains robust to varying harm ratios and model choices, including open-source LLMs, offering a scalable, data-efficient alternative to labeled moderation. The study highlights practical implications for safer content delivery and notes future directions such as incorporating multi-modal inputs and extending to other ranking-driven safety goals.
Abstract
Social media platforms utilize Machine Learning (ML) and Artificial Intelligence (AI) powered recommendation algorithms to maximize user engagement, which can result in inadvertent exposure to harmful content. Current moderation efforts, reliant on classifiers trained with extensive human-annotated data, struggle with scalability and adapting to new forms of harm. To address these challenges, we propose a novel re-ranking approach using Large Language Models (LLMs) in zero-shot and few-shot settings. Our method dynamically assesses and re-ranks content sequences, effectively mitigating harmful content exposure without requiring extensive labeled data. Alongside traditional ranking metrics, we also introduce two new metrics to evaluate the effectiveness of re-ranking in reducing exposure to harmful content. Through experiments on three datasets, three models and across three configurations, we demonstrate that our LLM-based approach significantly outperforms existing proprietary moderation approaches, offering a scalable and adaptable solution for harm mitigation.
