Skip to content

vraj2131/Community-QA-Moderation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 SmartMod: LLM-Powered Q&A Moderation

This project demonstrates how to use NLP, Transformers, and LLMs to automatically detect and improve low-quality Q&A posts. It combines multi-view feature engineering (embeddings, NER, subjective indicators, SoftNER) with Flan-T5 text generation for summarization and rephrasing.


✨ Features

  • Multi-view pipeline with BERT embeddings, NER features, subjective indicators, and SoftNER
  • Classification with XGBoost achieving 92% accuracy and 96% precision on LQ EDIT detection
  • Explainability with SHAP to interpret model predictions
  • LLM-powered generation:
    • Summarization: Flan-T5 produces concise two-word labels
    • Rephrasing: Fine-tuned Flan-T5 rewrites low-quality posts, upgrading 68% to high-quality
  • All workflows implemented in a single Jupyter Notebook for reproducibility

πŸš€ How It Works

  1. Data Preprocessing – Clean and normalize text (tokenization, stopword removal, etc.)
  2. Feature Engineering – Generate BERT [CLS] embeddings, extract NER & SoftNER counts, compute subjective indicators
  3. Classification – Train an XGBoost classifier and validate with accuracy, precision, recall, F1
  4. Explainability – Apply SHAP for model interpretation
  5. LLM Tasks –
    • Summarization β†’ Flan-T5 generates compact technical summaries
    • Rephrasing β†’ Flan-T5 fine-tuned to rewrite LQ posts into HQ versions
  6. Evaluation –
    • Classification: Accuracy = 92%, Precision = 96%
    • Rephrasing: BLEU = 0.78, BERTScore = 0.87
    • Summarization: 90K+ posts tagged, reducing manual labeling effort by 60%

πŸ›  Tech Stack

  • Languages: Python
  • Libraries: pandas, numpy, scikit-learn, XGBoost
  • Transformers: HuggingFace (BERT, Flan-T5)
  • NER Tools: NER, SoftNER
  • Explainability: SHAP
  • Evaluation Metrics: Accuracy, Precision, Recall, BLEU, BERTScore
  • Visualization: matplotlib, seaborn

πŸ“Š Results

  • Achieved 92% accuracy / 96% precision in classification
  • Rephrased 11.2K posts, upgrading 68% to high-quality
  • Summarized 90K+ entries into two-word labels, cutting manual tagging time by 60%
  • Validated outputs with BLEU (0.78) and BERTScore (0.87)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors