Project Story: “Clean Reviews, Clear Insights”

About the Project

Online reviews are a major source of information for users choosing services or products. However, many reviews are spam, advertisements, irrelevant to location, or misleading rants, which damage user trust and platform reputation.

Inspired by the challenge of making online reviews trustworthy and actionable, we aimed to create a local AI pipeline that can automatically detect and filter low-quality reviews, giving users cleaner insights and helping businesses focus on genuine feedback.

Features & Functionalities

  • Review Preprocessing: Cleans text by removing URLs, digits, special characters, and irrelevant symbols.

  • Rule-Based Policy Module: Detects obvious violations such as excessive URLs, repetitive content, or explicit advertisement markers.

  • Baseline Models: Quick evaluation using Logistic Regression and SVM to understand feature importance.

  • Hybrid Pipeline: Combines ML-driven insights with rule-based checks for robust filtering.

  • Evaluation & Feedback:
    Tracks performance using precision, recall, and F1-score for different violation types.

  • Transformer Fine-Tuning:
    A small, lightweight BERT variant is fine-tuned on labeled review data to detect nuanced spam and misleading content.

Relevance & Problem Addressed

  • For users: Removes misleading or irrelevant reviews, ensuring better decision-making.
  • For platforms: Protects reputation by minimizing low-quality content.
  • For businesses: Highlights genuine feedback for actionable improvements.

How We Built It

  1. Collected and sampled Google location reviews.
  2. Conducted ground-truth labelling by Hugging face, with zero-shot-classification.
  3. Conducted data cleaning and preprocessing, including text trimming, data resampling, tokenization, and feature engineering.
  4. Trained baseline modelslike SVM and Logistics Regression to identify initial patterns and feature relevance.
  5. Fine-tuned a DistilBERT to capture complex spam and content patterns.

Challenges Faced

  • Highly imbalanced dataset: The noise samples are very limited
  • Sparse data representation: Some reviews were very short or contained mostly symbols.
  • Balancing rule-based vs. ML detection: Ensuring neither method dominates or misclassifies content.
  • Local deployment constraints: Ground truth labelling, fine-tuning without external APIs, requires careful resource management.

Key Learnings

  • Hybrid approaches work best: Combining ML and rule-based logic improves accuracy.
  • Feature engineering matters: Simple text features might still provide strong baselines.

Mathematical Notation Example

For evaluation, we compute precision, recall, and F1-score for each violation type:

$$ \text{Precision} = \frac{TP}{TP + FP} $$

$$ \text{Recall} = \frac{TP}{TP + FN} $$

$$ F1 = 2 \cdot \frac{\text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}} $$

where:

  • TP = true positives
  • FP = false positives
  • FN = false negatives

Built With

Share this project:

Updates

Submission history