Skip to content

A rust CLI tool that predicts tweet engagement using patterns from X's Phoenix recommendation algorithm

Notifications You must be signed in to change notification settings

subhdotsol/banger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Engagement Predictor CLI

A Rust CLI tool that predicts tweet engagement using patterns from X's Phoenix recommendation algorithm.

Learning Project: This CLI uses heuristic-based predictions inspired by the Phoenix model's 19 engagement action types. It's designed to help you understand how modern recommendation systems think about engagement.

What It Does

Takes your tweet draft and predicts how likely users are to:

  • โค๏ธ Like it
  • ๐Ÿ’ฌ Reply to it
  • ๐Ÿ”„ Repost it
  • ๐Ÿ”— Share it
  • ๐Ÿ‘ค Click your profile
  • โž• Follow you
  • And 13 more engagement types...

It also detects negative signals (things that might make users block/mute/report).

Installation

cargo install banger

## For contributing

```bash
cd banger
cargo build --release

Usage

# Basic usage
cargo run -- "Your tweet draft here"

# Example: Analyze a question tweet
cargo run -- "What's your favorite programming language and why?"

# Example: Check a promotional tweet
cargo run -- "๐Ÿš€ Just launched my new project! Check it out!"

Example Output

output

How It Works

This tool mirrors the architecture of X's Phoenix recommendation model:

  1. Feature Extraction (analyzer.rs)

    • Extracts signals: length, hashtags, mentions, questions, media hints
  2. Multi-Action Prediction (scorer.rs)

    • Predicts 19 engagement types (same as Phoenix!)
    • Uses heuristics inspired by the real model's patterns
  3. Weighted Scoring

    • Positive actions (like, share) boost your score
    • Negative actions (block, mute) reduce your score

The 19 Phoenix Actions

This tool predicts all 19 engagement types from X's actual algorithm:

Positive Actions Neutral Actions Negative Actions
Favorite Photo Expand Not Interested
Reply Click Block Author
Repost Profile Click Mute Author
Share Dwell Report
Quote Video View
Follow Author

What it teaches ?

  • ๐Ÿง  How X predicts engagement with multi-action models
  • โš–๏ธ How weighted scoring combines positive and negative signals
  • ๐Ÿ“ What content features drive different engagement types
  • ๐Ÿฆ€ Building production CLIs in Rust

About

A rust CLI tool that predicts tweet engagement using patterns from X's Phoenix recommendation algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages