SCRAG: Social Computing-Based Retrieval Augmented Generation for Community Response Forecasting in Social Media Environments

Dachun Sun, You Lyu, Jinning Li, Yizhuo Chen, Tianshi Wang, Tomoyoshi Kimura, Tarek Abdelzaher

TL;DR

SCRAG (Social Computing-Based Retrieval-Augmented Generation) is a new framework designed to forecast how specific online communities will react to social media posts. By combining Large Language Models (LLMs) with historical ideological data and real-time news retrieval, SCRAG produces responses that are significantly more realistic, diverse, and contextually grounded than standard LLMs.

What Problem Does This Paper Address?

Predicting community reactions on platforms like X (formerly Twitter) is a high-stakes challenge for public relations, crisis management, and diplomacy. While LLMs are excellent at generating fluent text, they struggle with social media forecasting for two main reasons:

  1. Static Knowledge: LLMs are frozen in time at their training cutoff, making them "blind" to rapidly evolving news and social trends.
  2. Ideological Blindness: Standard models often produce generic or "hallucinated" responses that fail to capture the specific ideological nuances and emotional "vibes" of different sub-communities.

The authors argue that to accurately forecast a response, a model needs to understand not just what is being said, but who is saying it and in what current global context.

Methods

SCRAG enhances the standard RAG (Retrieval-Augmented Generation) pipeline with social computing principles. The architecture consists of two primary modules:

  • Community-Aware Historical Response Module: This module retrieves past responses to similar posts. Crucially, it doesn't just look at text similarity. It uses ideological embeddings—derived from user-post interaction graphs—to group historical responses into ideologically coherent clusters (e.g., pro- vs. anti-stance). It uses UMAP for dimension reduction and HDBSCAN for density-based clustering to identify these distinct community "voices."
  • External Knowledge Module: To handle new events, the framework uses SPLADE (a sparse retrieval method) to fetch up-to-date news snippets from sources like GDELT and extract knowledge graph (KG) triplets. Sparse retrieval is chosen here because it handles the domain gap between short tweets and long news articles better than traditional dense embeddings.

These retrieved components—historical community examples, ideological summaries, and current news—are fed into a specialized prompt (see Figure 2 below) that instructs the LLM to generate a set of responses reflecting the identified community diversity.

Fig. 1: Framework architecture of SCRAG.

Datasets

The authors evaluated SCRAG across six real-world scenarios on the X platform:

  • Russophobia (2022): Focused on the Russia-Ukraine conflict discourse.
  • US Election 2020: Political discourse surrounding the 2020 election.
  • COVID-19 (2020): Early pandemic-era social media responses.
  • Former UK PM Liz Truss (2022): Reactions to her election and resignation.
  • US Election 2024 & Israel-Hamas Conflict (Gaza): Used as "adaptability-testing" scenarios to see how the model performs on events that occurred after the historical database's primary timeframe.

Key Insights and Ideas

  • Ideology is the "Secret Sauce": The paper demonstrates that semantic similarity alone isn't enough to predict social responses. Adding ideological embeddings allows the model to capture the "spectrum of beliefs" within a community, preventing the generation of a single, homogenized "average" response.
  • Sparse Retrieval for Cross-Domain Tasks: While dense retrieval is popular, the authors found that sparse retrieval (SPLADE) was more effective at grounding short social media queries in long-form news articles.
  • Modular Flexibility: SCRAG is model-agnostic. The authors successfully tested it with various LLMs (Llama 3.3-70B, Gemma2-9B, Qwen2.5-32B, Mistral-Large, and GPT-4o-mini) and different embedding models, proving its robustness.

Key Results

SCRAG consistently outperformed "Direct Prompting" and "Few-shot" baselines across several metrics:

  • Emotion JSD: Achieved a 10.2% average improvement in matching the emotional distribution of real-world responses.
  • Cluster Coverage: Showed an 11.8% improvement, indicating the model successfully captured a wider variety of community viewpoints.
  • Realism: In an LLM-based discrimination test (rating how "real" a generated tweet looks), SCRAG consistently scored higher than baselines.
Fig. 2: Special instruction that focuses the embedding model on the response, and LLM prompt used by SCRAG that has historical responses with ideologies and external knowledge.

Limitations and Future Work

The current version of SCRAG is text-only. Social media is increasingly multimodal, relying on memes, videos, and images to convey sentiment and ideology. The authors acknowledge that integrating multimodal RAG is a necessary next step. Additionally, while the news database is updated continuously, the historical response database (used for ideological clustering) is updated less frequently, which could lead to lag in capturing very recent shifts in community dynamics.

Summary updated

BibTeX
@inproceedings{sun2025scrag,
  author = {Dachun Sun and You Lyu and Jinning Li and Yizhuo Chen and Tianshi Wang and Tomoyoshi Kimura and Tarek Abdelzaher},
  title = {{SCRAG: Social Computing-Based Retrieval Augmented Generation for Community Response Forecasting in Social Media Environments}},
  booktitle = {SMARTCOMP},
  year = {2025},
  doi = {10.1109/smartcomp65954.2025.00062},
}
Figure