Systems, non-transitory computer-readable mediums, and methods for modifying a graphical user interface based on semantic analysis
Systems and methods including one or more processors and one or more non-transitory storage devices storing computing instructions configured to run on the one or more processors and perform: receiving a search query from a user during a current user session; generating a query embedding for the search query; determining one or more entity embeddings with similarity scores that satisfy a threshold, the one or more entity embeddings including keywords associated with entities; filtering the one or more entity embeddings based on filtering criteria; generating a mapping for the search query based on the one or more entity embeddings, the mapping including an association between keywords in the search query and an entity; and modifying a graphical user interface to display items associated with the entity in an upper portion of the graphical user interface during the current user session. Other embodiments are disclosed herein.
1 . A system comprising:
one or more processors; and
one or more non-transitory computer-readable media storing computing instructions that, when run on the one or more processors, cause the one or more processors to perform operations comprising:
generating, using an offline system architecture and in an offline stage, entity embeddings for named entities stored in one or more databases, wherein generating the entity embeddings comprises extracting the named entities and synonyms associated with the named entities;
loading, using the offline system architecture and in the offline stage, the entity embeddings into an Approximate Nearest Neighbor (ANN) index of entity embeddings;
receiving, from a user device and in an online stage, a search query during a current user session that is initiated based on a user device accessing a web server;
generating a query embedding for the search query after receiving the search query in the online stage;
determining, using an ANN retrieval system that includes the ANN index of the named entity embeddings, one or more entity embeddings, of the entity embeddings, with similarity scores that satisfy a threshold by analyzing the query embedding using a nearest neighbor search based on the one or more entity embeddings being loaded, in the offline stage, into the ANN index of entity embeddings and based on receiving the search query in the online stage, the one or more entity embeddings including keywords associated with the named entities;
filtering the one or more entity embeddings based on filtering criteria after determining the one or more entity embeddings using the ANN retrieval system;
generating, based on filtering the one or more entity embeddings, a mapping for the search query based on the one or more entity embeddings, the mapping including an association between keywords in the search query, one or more of the synonyms, and an entity of the named entities; and
modifying a graphical user interface by causing display of items associated with the entity in an upper portion of the graphical user interface during the current user session.
2 . The system of claim 1 , wherein generating the query embedding further comprises inputting the search query into a bi-encoder embedding model, wherein the bi-encoder embedding model is configured to generate one or more vectors for each keyword in the search query.
3 . The system of claim 2 , wherein generating the query embedding further comprises aggregating the one or more vectors to generate the query embedding.
4 . The system of claim 2 , wherein the bi-encoder embedding model is a bidirectional encoder representations from transformers (BERT) model.
5 . The system of claim 1 , wherein filtering the one or more entity embeddings based on the filtering criteria comprises removing one or more of the one or more entity embeddings that have a similarity score below 0.75.
6 . The system of claim 1 , wherein generating the entity embeddings comprises:
utilizing, using the offline system architecture, a bi-encoder embedding model in the offline stage to generate the entity embeddings for the named entities.
7 . A method implemented via execution of computing instructions configured to run at one or more processors and stored at one or more non-transitory computer-readable media, the method comprising:
generating, using an offline system architecture and in an offline stage, entity embeddings for named entities stored in one or more databases, wherein generating the entity embeddings comprises extracting the named entities and synonyms associated with the named entities;
loading, using the offline system architecture and in the offline stage, the entity embeddings into an Approximate Nearest Neighbor (ANN) index of entity embeddings;
receiving, from a user device and in an online stage, a search query from a user during a current user session that is initiated based on the user device accessing a web server;
generating a query embedding for the search query;
determining, using an ANN retrieval system that includes the ANN index of entity embeddings, one or more entity embeddings, of the entity embeddings, with similarity scores that satisfy a threshold by analyzing the query embedding using a nearest neighbor search based on the one or more entity embeddings being loaded, in the offline stage, into the ANN index of entity embeddings and based on receiving the search query in the online stage, the one or more entity embeddings including keywords associated with the named entities;
filtering the one or more entity embeddings based on filtering criteria after determining the one or more entity embeddings using the ANN retrieval system;
generating, based on filtering the one or more entity embeddings, a mapping for the search query based on the one or more entity embeddings, the mapping including an association between keywords in the search query, the synonyms, and an entity; and
modifying a graphical user interface by causing a display of items associated with the entity in an upper portion of the graphical user interface during the current user session.
8 . The method of claim 7 , wherein generating the query embedding further comprises inputting the search query into a bi-encoder embedding model, wherein the bi-encoder embedding model is configured to generate one or more vectors for each keyword in the search query.
9 . The method of claim 8 , wherein generating the query embedding further comprises aggregating the one or more vectors to generate the query embedding.
10 . The method of claim 8 , wherein the bi-encoder embedding model is a bidirectional encoder representations from transformers (BERT) model.
11 . The method of claim 7 , wherein filtering the one or more entity embeddings based on the filtering criteria further comprises removing one or more of the one or more entity embeddings that have a similarity score below 0.75.
12 . The method of claim 7 , wherein generating the entity embeddings comprises:
extracting the named entities and synonyms associated with the named entities.
13 . The method of claim 7 , wherein generating the entity embeddings comprises:
utilizing, using the offline system architecture, a bi-encoder embedding model in the offline stage to generate the entity embeddings for the named entities.
14 . The method of claim 7 , wherein filtering the one or more entity embeddings comprises:
filtering the one or more entity embeddings based on the filtering criteria by removing, from further processing, at least one of the one or more entity embeddings having a similarity score below the threshold, thereby reducing a number of entity embeddings subjected to the further processing.
15 . A non-transitory, computer-readable medium comprising instructions that, when executed by a processing resource, cause the processing resource to perform operations comprising:
generating, using an offline system architecture and in an offline stage, entity embeddings for named entities stored in one or more databases, wherein generating the entity embeddings comprises extracting the named entities and synonyms associated with the named entities;
loading, using the offline system architecture and in the offline stage, the entity embeddings into an Approximate Nearest Neighbor (ANN) index of entity embeddings;
receiving, from a user device and in an online stage, a search query from a user during a current user session that is initiated in response to determining that the user device accesses a web server;
generating a query embedding for the search query after receiving the search query in the online stage;
determining, using an ANN retrieval system that includes the ANN index of entity embeddings, one or more entity embeddings, of the entity embeddings, with similarity scores that satisfy a threshold by analyzing the query embedding using a nearest neighbor search based on the one or more entity embeddings being loaded, in the offline stage, into the ANN index of entity embeddings and based on receiving the search query in the online stage, the one or more entity embeddings including keywords associated with the named entities;
filtering the one or more entity embeddings based on filtering criteria after determining the one or more entity embeddings using the ANN retrieval system;
generating, based on filtering the one or more entity embeddings, a mapping for the search query based on the one or more entity embeddings, the mapping including an association between keywords in the search query, the synonyms, and an entity; and
modifying, during the current user session, a graphical user interface by causing display of items associated with the entity in an upper portion of the graphical user interface.
16 . The non-transitory, computer-readable medium of claim 15 , wherein filtering the one or more entity embeddings comprises:
filtering the one or more entity embeddings based on the filtering criteria by removing, from further processing, at least one of the one or more entity embeddings having a similarity score below the threshold, thereby reducing a number of entity embeddings subjected to the further processing.
17 . The non-transitory, computer-readable medium of claim 15 , wherein the offline system architecture is configured for utilizing a bi-encoder embedding model in the offline stage to generate the entity embeddings.
18 . The non-transitory, computer-readable medium of claim 15 , wherein generating the query embedding further comprises inputting the search query into a bi-encoder embedding model, wherein the bi-encoder embedding model is configured to generate one or more vectors for each keyword in the search query.
19 . The non-transitory, computer-readable medium of claim 15 , wherein filtering the one or more entity embeddings based on the filtering criteria comprises removing one or more of the one or more entity embeddings that have a similarity score below a particular value.
20 . The non-transitory, computer-readable medium of claim 15 , wherein generating the entity embeddings comprises:
utilizing, using the offline system architecture, a bi-encoder embedding model in the offline stage to generate the entity embeddings for the named entities.