Skip to content

Conversation

Copy link

Copilot AI commented Jan 30, 2026

Analyzed Twitter's recommendation algorithm codebase to document ranking mechanics, reputation scoring, and visibility optimization strategies.

Changes

New documentation: docs/TWITTER_ALGORITHM_OPTIMIZATION_GUIDE.md

  • Ranking mechanics: 4 primary signals (favorites, retweets, replies, dwell time) with configurable weights (-10k to +10k), scored via weighted aggregation
  • TweepCred calculation: PageRank-based reputation with age penalties (<30 days), verification boost (score=100), and exponential follower/following ratio penalty when >0.6 with >500 following
  • Engagement tracking: In-network vs out-of-network metrics, negative signal weights (reports=-20k, blocks=-1k), USS feature matrix across ML models
  • Source references: Extracted from UserMass.scala, Reputation.scala, home-mixer/, scoring weight registries, and signal tracking configs

Updated README.md: Added prominent link to guide

Key algorithm insights

Following/follower ratio penalty from adjustReputationsPostCalculation:

// Exponential penalty for ratio >0.6 with >500 following
divisionFactor = exp(5.0 × (ratio - 0.6))
adjustedScore = originalScore / divisionFactor

// Example: ratio 2.0 = 403× penalty

Score aggregation from RerankerUtil.scala:

finalScore = Σ(engagement_score × weight) + epsilon
// epsilon = 0.001, weights range [-10000, 10000]
// rank_decay = 0.95

Verification gives maximum TweepCred (100) while restricted accounts receive 0.1× multiplier.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 30, 2026 14:02
Co-authored-by: ScriptSynth <211514415+ScriptSynth@users.noreply.github.com>
Co-authored-by: ScriptSynth <211514415+ScriptSynth@users.noreply.github.com>
Copilot AI changed the title [WIP] Create guide for writing tweets that go viral Add algorithm optimization guide from source code analysis Jan 30, 2026
Copilot AI requested a review from ScriptSynth January 30, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants