Instagram Uses AI To Choose Content For Its Explore Tab


Instagram’s Explore page displays highly customised content specific to each user. With billions of posts and an equally large number of users, this feat is only achieved with the use of trained machine learning models. Instagram tackled this challenge by creating a series of custom query languages which support the scale of Explore while boosting developer efficiency.

Before building a recommending engine, Instagram addressed three important needs for its developer tools-

  1. The ability to conduct rapid experimentation at scale
  2. The need to obtain a stronger signal on the breadth of people’s interests
  3. The need for a computationally efficient way to ensure that the recommendations are both high quality and fresh

They created a new domain-specific language, ‘IGQL’, which was optimised for retrieving candidates in the recommender system. IGQL made it simple for performing tasks which are usually quite complex while allowing engineers to focus on ML (machine learning) and business logistics. It provided a high degree of code reusability, with programmers coding in a python-like manner and executing efficiently in C.

As Instagram has a large number of interest-focused accounts with tons of posts within them, they decided to sort on the account-surface level rather than the media-level. There are many ways in which a user can interact with an account including liking or saving posts. Instagram defines a value model to capture the prominence of different signals to decide whether the content is relevant. For example- saving a post takes high precedence compared to liking it. These accounts are called seed accounts and are used as a basis to find similar accounts for recommendations.


Using ‘word embedding’, they would study the order in which words appear in the text to measure how related they are. This is how they predict accounts with which a person is likely to interact in a given session within the Instagram app. They define a distance metric between two accounts and based on a KNN lookup, they find topically similar accounts for an account in the embedding. After the accounts have been selected, they are passed through a simpler ‘distillation’ neural network model before being passed through a main high-performance model. This is mainly done to improve efficiency and decrease the computational power required.

Instagram makes sure that the content they recommend is both safe and appropriate for a global community. Using a variety of signals and ML systems, they filter out policy-violating content and spam. They also make sure you discover a plethora of new interests by downranking posts from the same author or the same seed account.

Here’s what they had to say-

The scale of both the Instagram community and inventory requires enabling a culture of high-velocity experimentation and developer efficiency to reliably recommend the best of Instagram for each person’s individual interests. Our custom tools and systems have given us a strong foundation for the continuous learning and iteration that are essential to building and scaling” 

The best way to discover interesting new content on Explore is by interacting with accounts you like, which in turn helps the algorithm filter through the numerous posts to present you with the content you love.

Further Reading-

Leave a Reply

Latest posts

Dirty Laundry in Space? NASA is Sending Tide Detergent to Space

What about laundry in space? Tide detergent is partnering with NASA to find a laundry solution to help keep astronauts’ clothes fresh in space. Find out how.

Poco F3 GT with 120Hz AMOLED, Dimensity 1200 and 64MP Camera Launched in India – Starts at Rs. 25,999

Poco today announced the much-awaited Poco F3 GT, successor to 2019's Poco F1. Like every other Poco smartphone, the F3 GT is also a...

Deep-Sea Robots Launched by Titanic Discoverer Bob will Help Find Millions of Shipwrecks

Titanic discoverer Bob Ballard, a marine archaeologist, is creating a new class of deep-sea robots that will transform the search for lost shipwrecks.

Loading Next Article