Fuzzy cache architecture for serving content items
Techniques for retrieving and presenting content items using a fuzzy cache are presented herein. A computing system can include a fuzzy cache having a plurality of cluster identifiers. Each cluster identifier in the plurality of cluster identifiers can have a result associated with a previously executed request. Additionally, the computing system can include a first machine-learned model configured to generate a vector embedding, and a second machine-learned model configured to generate a cluster identifier. Moreover, the system can receive, from a user device, a first request having a first feature. Furthermore, the system can process, using the first machine-learned model, the request to generate a first vector embedding associated with the first request. Subsequently, the system can process, using the second machine-learned model, the first vector embedding to determine a first cluster identifier. The system can retrieve, from the fuzzy cache, a first result on the first cluster identifier.
1 . A computing system, comprising:
one or more processors; and
one or more non-transitory computer-readable media that collectively store:
a fuzzy cache having a plurality of cluster identifiers, each cluster identifier in the plurality of cluster identifiers having a result associated with a previously executed request;
a first machine-learned model, wherein the first machine-learned model is configured to generate a vector embedding;
a second machine-learned model, wherein the second machine-learned model is configured to generate a cluster identifier; and
instructions that, when executed by the one or more processors, cause the computing system to perform operations, the operations comprising:
receiving, from a user device, a first request having a first feature and a second feature;
processing, using the first machine-learned model, the first request to generate a first vector embedding associated with the first request, wherein the first machine-learned model processes the first feature and the second feature to generate the first vector embedding;
processing, using the second machine-learned model, the first vector embedding to determine a first cluster identifier; and
retrieving, from the fuzzy cache, a first result on the first cluster identifier, wherein the first result is associated with queries that are similar to the first request, wherein probabilistic data structures are used to determine the queries that are similar to the first request, and wherein the fuzzy cache serves the first result when an original data store is unavailable.
2 . The computer system of claim 1 , wherein the first result includes a set of content items, each content item in the set of content items having a relevancy score associated with a relevance to queries associated with the first cluster identifier.
3 . The computer system of claim 1 , wherein the first feature is based on user information associated with a user of the user device.
4 . The computer system of claim 1 , wherein the second feature is based on browsing information of the user device.
5 . The computer system of claim 4 , wherein the first request further includes a third feature that is based on context information.
6 . The computer system of claim 5 , wherein the first machine-learned model processes the first feature, the second feature, and the third feature to generate the first vector embedding.
7 . The computer system of claim 1 , wherein the second machine-learned model determines the first cluster identifier by using a nearest-neighbor technique.
8 . The computer system of claim 7 , wherein the second machine-learned model identifies a closest centroid of a first cluster to the first vector embedding, and wherein the first cluster identifier is associated with the closest centroid of the first cluster.
9 . The computer system of claim 7 , wherein the first cluster identifier includes a plurality of content items, the operation further comprising:
ranking the plurality of content items to select a first content item having a highest score, wherein the first content item is transmitted to the user device in response to receiving the first request.
10 . The computing system of claim 1 , wherein the first cluster identifier includes a plurality of content items, wherein each content item in the plurality of content items is associated with a relevance score, the operations further comprising:
determining a subset of content items from the plurality of content items based on the relevance score of each content item;
transmitting the subset of content items to an auction, wherein the auction determines a selected content item to be transmitted to the user device in response to receiving the first request.
11 . The computer system of claim 10 , the operations further comprising:
performing safeguard operation to ensure that the subset of content items abide by a predetermined privacy and security protocol prior to transmitting the subset of content items to the auction.
12 . The computer system of claim 1 , wherein the first result is a plurality of content items, and the operations further comprising:
processing, based on a relevancy score of each content item, the plurality of content items to select a final content item to present on a display of the user device.
13 . The computer system of claim 1 , wherein the first result is a single content item that is presented on a display of the user device.
14 . The computer system of claim 1 , wherein the first vector embedding is an N-dimensional space.
15 . The computer system of claim 1 , wherein the fuzzy cache includes a plurality of clusters, wherein each cluster includes at least one content item.
16 . The computer system of claim 1 , wherein the fuzzy cache uses similarity measures to match queries to cached entries that are similar based on the first feature.
17 . The computer system of claim 1 , wherein the probabilistic data structures is a bloom filter.
18 . A computer-implemented method for presenting a content item in response to a first request, the method comprising:
receiving, by a computing device, the first request for the content item from a user device, the first request having a first feature and a second feature;
processing, using a first machine-learned model, the first request to generate a vector embedding, wherein the first machine-learned model processes the first feature and the second feature to generate the vector embedding;
processing, using a second machine-learned model, the vector embedding to generate a cluster identifier; and
retrieving, from a fuzzy cache, a first result based on the cluster identifier, wherein the fuzzy cache includes a plurality of cluster identifiers associated with a plurality of clusters, wherein the first result is associated with queries that are similar to the first request, wherein probabilistic data structures are used to determine the queries that are similar to the first request, and wherein the fuzzy cache serves the first result when an original data store is unavailable.
19 . One or more non-transitory computer-readable media that collectively instructions that, when executed by the one or more processors, cause a computing system to perform operations, the operations comprising:
receiving a request for a content item from a user device, the request having a first feature and a second feature;
processing, using a first machine-learned model, the request to generate a vector embedding, wherein the first machine-learned model processes the first feature and the second feature to generate the vector embedding;
processing, using a second machine-learned model, the vector embedding to generate a cluster identifier; and
retrieving, from a fuzzy cache, a first result based on the cluster identifier, wherein the fuzzy cache includes a plurality of cluster identifiers associated with a plurality of clusters, wherein the first result is associated with queries that are similar to the request, wherein probabilistic data structures are used to determine the queries that are similar to the request, and wherein the fuzzy cache serves the first result when an original data store is unavailable.