Skip to main content

Layman's View of Facebook's Graph Search Algorithm

Facebook graph search algorithm is composed of hundreds of nodes and thousands of edges. It is the connections of the relationships between nodes that powers Facebook to understand the searcher's intent behind the queries. It is necessary to point out that Facebook Graph search algorithm and Google semantic search algorithm have various similarities. Let us now understand how Facebook processes user queries?

Every node in the graph represents entities. Some of the entities can be:

Groups etc.

Each node in the graph is composed of structured data. These large sets of structured data helps in better classification of each nodes. Some of the examples of structured data are as follows:

Entity                              Structured Data

User                                      Gender
Places                                   Address
Images                                  Post date etc.

Components of Graph Search Algorithm

The algorithm is divided into 3 main parts:

1- Entity recognition and resolution - Every search query revolves around entities. Entity recognition helps to identify entities from within the search queries and resolves them by categorizing them and matching them with their associated databases.

2- Lexical Analysis - This helps to interpret the meaning of the words behind the query. Instead of matching the keywords present in the query, lexical analysis helps to rephrase the query in order to interpret the real purpose of the user behind the query.

3- Semantic Parsing- Graph search algorithm has to find all the possible meanings the main query. This is done with the help of semantic parsing. Mathematical probability is made to use in this step.

An Example to Demonstrate the Working of Facebook's Natural Language Interface Algorithm 

Suppose we enter the query "Apps my friends use". As per the above algorithm, Facebook will first try and find out entities from the query which are "friends" and "apps". Friends means users of Facebook and Apps means applications present on Facebook. Second step would be the lexical analysis under which it will predict that my means friends of the user entering the query and use means friends of the user who use apps. Every individual user has a separate user id and every application has a specific app id so it becomes easier for Facebook to process this query and this is what Facebook returns:

As a last step semantic parsing is done to identify are they any other probabilities that the user is asking for something other than apps used by friends present in the friend's list? But. as this query is pretty much direct so other probabilities have possibly low scores to show up in the search results.

Reference: NLI for Graph Search 

Also See:

How to Use Open Graph Protocol
Best Time to Post on Facebook
Facebook Graph Search Optimization Guide
Facebook Graph Search Vs Google Search
Measuring Social Media ROI
How to Start a Social Media Campaign
Social Media Widgets for Websites
Add Ratings and Reviews on Google Search Results
Seo Guide for Schema