Table of Contents
Part 1: How the algorithm works
The 2-Minute Explanation
Source: Twitter Blog
The 15-Minute In-Depth Explanation
- The follower graph indicating who follows you
- Engagement data such as likes, retweets, and replies
- User data such as mutes, unfollows, and spam reports
Candidate Sourcing
- People you follow (In-Network) - (Roughly 50% or 750 tweets come from here)
- In-Network source uses a complex logistic regression model to filter out irrelevant tweets and carefully curate the most important and timely messages from the users you follow.
- This happens through is Real Graph. It predicts the likelihood of two users engaging. Higher the score, likely they are to be seen on your feed.
- The top tweets go to the next level.
- People you don’t follow (Out-of-Network) - (Roughly 50% or 750 tweets come from here)
- Social graph
- Embedding spaces
- Any two users (In our example, Sam Altman’s followers seeing Elon Musk’s tweet)
- Any two tweets (Accounts following the news of company acquisitions seeing Elon Musk’s tweet)
- User-tweet pairs (People following Coca-Cola seeing this tweet)
- In simple words, the algorithm uses your content to categorize you with other similar users and creates clusters. This helps your tweets reach those who aren't already following you.
- There are 145k communities, which are updated every three weeks. Users and Tweets are represented in the space of communities, and can belong to multiple communities. Communities range in size from a few thousand users for individual friend groups, to hundreds of millions of users for news or pop culture.
How can we tell if a certain Tweet will be relevant to you if you don’t follow the author?
What Tweets did the people I follow recently engaged with?
Who likes similar Tweets to me, and what else have they recently liked?
What Tweets and Users are similar to your interests?
Ranking System
Actions | Sentiment | Weight |
Likes | Positive | 30x |
Retweets | Positive | 20x |
Replies | Positive | 1x |
Image & video | Positive | 2x |
Twitter Blue verified | Positive | 2x |
Good account reputation (calculated by follower ratio, usage, verification, if you've been banned before | Positive | Boosted |
New words or unknown language | Negative | 0.01x |
Links (Unless you have good engagement) | Negative | Negative ranking |
Misinformation | Negative | Negative ranking |
Multiple hashtags | Negative | Negative ranking |
Type of writing | Negative | Negative ranking |
Interacting with low quality account and blacklisted topics | Negative | Negative ranking |
Request "show less often" on your Tweet/you, block/mute you, reports | Negative | You’re screwed |
User Action | Sentiment | Weight |
Like your tweet | Positive | 0.5 |
Retweet your tweet | Positive | 1 |
Click into your tweet & reply/like a tweet or stay there for >2 mins | Positive | 11 |
Check out your profile and like/reply to a tweet | Positive | 12 |
Reply to your tweet | Positive | 27 |
Reply to your tweet and you engage with this reply | Positive | 75 |
Request "show less often" on your Tweet/you, block or mute you | Negative | -74 |
Report your Tweet | Negative | -369
|
- When someone clicks on my tweet and stays there for more than two minutes, it is weighted 22 times more than if they had just liked my tweet.
- If they click into my profile through my tweet and like or reply to a tweet, it is 24 times more than a like.
- When they reply to my tweet, it is 54 times more than a like.
- If they reply to my tweet and I respond to their reply, it is 150 times more than a like.
- However, if someone reports my tweet, it has 738 times the effect of a like, meaning I'm basically screwed.
Filtering and Heuristics
- Visibility Filtering: Customise your feed by hiding tweets from blocked or muted accounts.
- Author Diversity: Prevent seeing too many tweets in a row from the same person.
- Content Balance: Show a mix of tweets from people you follow and others outside your network.
- Feedback-based Fatigue: Reduce visibility of tweets that have received negative feedback from you.
- Social Proof: Only show tweets from outside your network if someone you follow has interacted with them.
- Conversations: Add context to reply tweets by connecting them to the original tweet.
- Edited Tweets: Keep your feed fresh by replacing outdated tweets with their updated versions.
Appendix: References from Source Code
- 1 like gives a 30x boost
- 1 retweet gives a 20x boost
- 1 reply gives 1x boost
User Action | Sentiment | Weight |
Like your tweet | Positive | 0.5 |
Retweet your tweet | Positive | 1 |
Click into your tweet & reply/like a tweet or stay there for >2 mins | Positive | 11 |
Check out your profile and like/reply to a tweet | Positive | 12 |
Reply to your tweet | Positive | 27 |
Reply to your tweet and you engage with this reply | Positive | 75 |
Request "show less often" on your Tweet/you, block or mute you | Negative | -74 |
Report your Tweet | Negative | -369
|
- Adding images and videos gives a 2x boost
- This means that if you want your tweets to reach a wider audience, it's essential to include visual content. But don't just add any image or video, make sure it is high-quality and relevant to your tweet.
- Your account reach gets affected negatively if your following is more than 60% of your followers.
- For instance, if you have 1000 followers and follow 800 people, try unfollowing 200 accounts to gain a better reach.
- Twitter blue extends your reach on top of other benefits given with it like ranking boost in replies and searches, half of the ads in your timeline, posting longer videos and 1080p videos, editing tweets, bookmark folders, and early access to new features.
- Tweet content that leads to likes/RTs
- Write tweets that get users to click, reply, and engage for >2 mins
- Build an engaging profile that makes people click.
- Boost, calculated by follower ratio, usage, verification, if you've been banned before
- The final score, on a scale of 0 to 100, is the ’tweepcred’ score, which represents the user's reputation on Twitter.
- This score is used to determine which users should be recommended to follow or which users should have their content highlighted.
- Your "influence" on Twitter and in turn how likely your tweets are to be seen is heavily determined by the quality of users you interact with
- Currently, if your ’tweepcred’ is lesser than 65, the maximum number of tweets that will be considered by the ranking algorithm is limited to 3.
- If your score is less than 65, your threads won’t be considered
- However, if your ’tweepcred’ is greater than 65, this limit is lifted, which means that you can post as many tweets as you want, and the algorithm will consider all of them.
- Interacting with low quality accounts get you penalised.
- Account reputation is calculated by follower to following ratio, account age, device usage, if you've been restricted or suspended, and if you're verified.
- Interact with low quality accounts with bad follower/following ratios and are marked as spam/nsfw/bots/toxic, you get penalised.
- Your tweet or account interacting with blacklisted topics (not in the code)
- The overall rate at which the relavancy score of older tweets decrease is set at 0.003
- The minimal age decay score a tweet can have is 0.6
- Links results in negative ranking.
- External links mark you as spam (Unless you have good engagement)
- Outbound links to non-news or media sites get clapped
- Only posting URLs or only images (No text) also reduces your rank
- Mutes, unfollows (not as bad as the other 4), blocks, spam report, abuse report results in negative ranking
- Reported tweet is reduced by 700x
- Unknown languages are downranked
- Making up words or misspellings are given 0.01 which is really bad
- Misinformation is downranked (eve Ukraine)
- Adding a lot of hashtags gets your post deboosted
- On the flip side, posting content outside your cluster gives a penalty with out of network replies.
- A score for the static quality of the text, computed in TweetTextScorer.java in the Ingester, based on the factors such as offensiveness, content entropy, "shout" score, length, and readability, affects your reach and engagement.
Part 2: What you should do to maximize reach
- Get Twitter Blue
- Maintain A High Follower-Following Ratio
- Keep your
Tweepcred
higher than 65
- Niche down and become a trusted voice in one niche.
Source
- Engage the most in your tweets in the first 6 hours.
- Add images & videos.
- Be less controversial. Getting blocked/muted/reported is bad. Really bad.
- Create a reason for people to engage.
User Action | Sentiment | Weight |
Like your tweet | Positive | 0.5 |
Retweet your tweet | Positive | 1 |
Click into your tweet & reply/like a tweet or stay there for >2 mins | Positive | 11 |
Check out your profile and like/reply to a tweet | Positive | 12 |
Reply to your tweet | Positive | 27 |
Reply to your tweet and you engage with this reply | Positive | 75 |
Request "show less often" on your Tweet/you, block or mute you | Negative | -74 |
Report your Tweet | Negative | -369
|
- Reply to every reply on your account.
- Don’t add links unless you know it’s going to get engagement.