
Let’s say you’re an average Twitter user named Bill.
Twitter makes money when it shows you ads. The more ads you watch, the more money Twitter makes. It’s trying to get you to spend as much time on the app, so that you watch more ads.
The algorithm’s job is to show you content that will make you spend more time on the app.
To show you content that’ll make you spend more time on the app, it tries to guess:
“What type of content is Bill most likely to engage with?”
“What is trending among users that have similar tastes as Bill?”
The Algorithm is basically Twitter’s way of making an educated guess about these questions. It does so in 3 steps:
1) It guesses which 1500 tweets you will most like from the 100 million tweets on the platform.
2) It gives each tweet an ‘engagement probability score’ and ranks them from best to worst. The top tweets are the ones you’ll most likely engage with.
3) It cleans up the tweet list by removing misinformation, blocked accounts etc. shows you the tweets with the highest score first, and throws in an ad for every 2-3 tweets.
After going through these 3 steps, what Twitter shows you is called the Twitter Feed.
Understanding how it picks, ranks, and filters tweets can help you write content reaching millions of people.
✅ Boost Your Twitter Game with Tweet Hunter!
We want to understand how the algorithm finds relevant tweets, ranks them and what it filters out. The technical terms for these steps are:
1) Candidate Sourcing (Picking Tweets)
2) Ranking System
3) Heuristics and Filtering
Let’s break this down.

Twitter uses three types of data points:
This data is used to source relevant tweets, which is also called candidate sourcing.

Twitter attempts to extract the best 1500 Tweets from a pool of hundreds of millions of through candidate sources.
This includes:

How can we tell if a certain Tweet will be relevant to you if you don’t follow the author?
There are 2 approaches to this taken up by Twitter.
These currently serve about 15% of Home Timeline Tweets.
For this, 2 things are taken into consideration.
What Tweets did the people I follow recently engaged with?
Who likes similar Tweets to me, and what else have they recently liked?
The tweets resulting to this are then ranked using a logistic regression model - GraphJet, a graph processing engine that maintains a real-time interaction graph between users and Tweets.

This works on content similarities.
What Tweets and Users are similar to your interests?
This is done with the help of embeddings. Embeddings work by generating numerical representations of users’ interests and Tweets’ content.
Next I’m buying Coca-Cola to put the cocaine back in
— Elon Musk (@elonmusk) April 28, 2022
We can then calculate the similarity between the above tweet and a users interest using the following:
One of Twitter’s most useful embedding spaces is SimClusters.
SimClusters discover communities anchored by a cluster of influential users using a custom matrix factorization algorithm.

The more users from a community like a Tweet, the more that Tweet will be associated with that community. These tweets are ranked after this.
At the sourcing stage, Twitter rewards great engagement with great reach and vice versa.

At this point, we have 1500 candidates which are probably relevant. Scoring these directly predicts the relevance of each candidate Tweet and is the primary signal for ranking Tweets on the timeline.
💡 Reach = f (likes, retweets, replies, images, videos, profile tap, twitter blue, account reputation, new words, unknown language, links, misinformation, hashtags, type of writing, etc)
These variables contribute your tweet’s ranking positively and negatively and eventually decides wether your tweet will be chosen in the top 1500 tweets or not.
| 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 |
After this, in each user’s feed, based on the actions they are likely to take on that tweet, these tweets are served in an order that is most likely to maximise retention.
It calculates the probability of you taking a user action and assigns a weight to it. For eg: the probability of some replying to your tweet matters 54x times the the probability of someone liking it.
| 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 |
This means that,
After ranking tweets, Heuristics & Filters are used in order to create a balanced and diverse field.
Some examples:

At this point, Home Mixer has finished preparing a series of Tweets to be sent to your device.
The system also weaves in additional content like ads, follow recommendations, and onboarding prompts, creating a seamless user experience.

Once complete, this content is returned to your device for display.
Engagement
Likes > Retweets > Replies
Aim for likes, ask for retweets & keep replies as the last priority.
💡 Retweets may be ranked lower than likes but it also multiplies your reach which may give better likes in return

User Actions that matter
| 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 |

Images & videos:

Following to follower ratio make a difference?
(Mass unfollowing people also gets you shadowbanned so don’t just go and unfollow everyone suddenly)

Does Twitter Blue matter?

How do you show up in ‘For you’ tab?
Increase your chances of getting on the "For You" tab by considering these factors:
Good account reputation

Content quality
Your content not being marked as ‘low-quality’ will also make sure that your ‘tweepcred’ is high enough to be considered.
Interacting with low quality accounts
Interacting with blacklisted topics
Tweets relevancy over time
Tweets have a half-life of 360 minutes, which means that a Tweet's relavancy score will decrease by 50% every 6 hours.
Links

Mutes & Unfollows

New words or unknown language
Anything under point 1 in the algorithm is bad.


Misinformation

Multiple hashtags

Posting outside your cluster

Type of writing
Reference Links
https://github.com/twitter/the-algorithm-ml
https://github.com/twitter/the-algorithm
If you're a Twitter Blue subscriber, you get a 4x boost in the algorithm if you're in the same network as the author of the tweet, and a 2x boost if you're not. Source
This method reduces the page rank of users who have a low number of followers but a high number of followings. It calculates a division factor based on the ratio of followings to followers, and reduces the user's page rank by dividing it by this factor. Source
Tweepcredhigher than 65Tweepcred is a score given to users based on the number & quality of interactions they have with others, account age, followers and device usage which determines if more than 3 of your tweets (including threads) should get featured or not. Having healthy engagement can help you keep it high and getting spam reports, blocks and mutes can hurt really badly. Source
Out of network replies get a penalty. Become popular within a specific community by engaging with prominent accounts in that niche. As more users from that community interact with your content, it becomes more associated with the niche, boosting visibility to their users. You can quickly build a strong relevance with your content if you niche down.
Tweets have a half-life of 360 minutes, so a Tweet's relevancy score will decrease by 50% every 6 hours. Older Tweets become less relevant (and are shown less to others) over time. Engaging and replying to comments during this time can work in your favour. Source
In the current light ranking model (Earlybird), tweets with images & videos seem to get a nice 2x boost (source). However, this is an old model that Twitter is planning to rebuild completely, so things might change in the future. source
Negative feedback loops reduce your "reputation score" on Twitter. Getting blocked, muted, abuse reports, spam reports and unfollows can cause a big hit on your tweepscore. Avoid having a score less than 65. Source
After getting ranked in the 1500 tweets, the likelihood of your tweet reaching someone’s feed is heavily based on factors such as time spent on the tweet, profile visit and replies. Content that makes users take these action can skyrocket your reach.
| 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 |
If someone liking your tweet gives that tweet 1 point, you engaging with someone’s reply on your tweet gives you 150 points. Source
External links mark you as spam and only posting URLs can reduce your rank drastically unless your tweet gets really good engagement in the first few hours.