IP Library Granted Patent US 12694220
Granted Patent B2
US 12694220 · App. 18/114,888 · Granted Jul 28, 2026

Method and system for personalized embedding search engine

Inventor: Michael Galli (Boston, MA)
Assignee: Klaviyo, Inc.
G06F40/30G06F16/9535G06F16/954
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12694220
App. No.
18/114,888
Granted
Jul 28, 2026
Kind
B2
Abstract

Methods and systems for optimized large-scale semantic search and information retrieval are disclosed. Via comparing similarity scores between the search query and the resources, the personalized embedding-based search engine and system can select probable answers with the consideration of the query's intent and context. The resources can comprise all relevant content or customized content related to the searched site or domain. The system can apply custom score adjustments to the similarity scores. In addition, the system can partition and process a resource in a number of different manners to generate different resource vectors. Further, the search query can be an explicit query or an implied query that is inferred from the user's actions.

Claims (77)

1 . A computer-implemented method for answering a query, the method comprising:

partitioning, by a plurality of sentence transformers, each resource in a list of resources into a plurality of resource portions;

pre-calculating, by the plurality of sentence transformers, a plurality of resource vectors, wherein the pre-calculating of the plurality of resource vectors comprises:

vectorizing all text of whole resources in the list of resources into a first set of resource vectors of the plurality of resource vectors; and

vectorizing text of at least some resource portions of the plurality of resource portions that have been partitioned into a second set of resource vectors of the plurality of resource vectors;

receiving, by a server, a textual query from a user at search time;

partitioning, by the plurality of sentence transformers, the textual query into a plurality of query portions;

iteratively embedding, by the plurality of sentence transformers, a plurality of query vectors based on the plurality of query portions;

generating, by the server, similarity scores between the plurality of query vectors and the plurality of resource vectors;

tracking, by the server, user behavior associated with the user and a location of the user when submitting the textual query, wherein the tracking of the user behavior occurs at search time;

adjusting, by the server, at least some of the similarity scores based on feedback from the user, one or more attributes of the textual query, and the list of resources, wherein the feedback from the user comprises the user behavior at search time, wherein the adjusting of the similarity scores at search time further comprises limiting comparison of the plurality of query vectors to a subset of the plurality of resource vectors selected based on the adjusted similarity scores;

selecting, by the server, one or more vectorized pairs of query vector and resource vectors from the subset of the plurality of resource vectors based on the similarity scores;

determining, by the server, one or more probable answers to the textual query based on the one or more vectorized pairs that were selected;

displaying the one or more probable answers; and

applying model reinforcement to the similarity scores and the resource vectors based on the feedback from the user, wherein the similarity scores or resource vectors stored by the server are modified and used in subsequent executions of the method.

2 . The computer-implemented method of claim 1 , further comprising:

partitioning each resource in the list of resources in a number of manners by the plurality of sentence transformers, wherein each resource is embedded differently in the pre-calculating.

3 . The computer-implemented method of claim 1 , further comprising:

increasing at least some of the similarity scores between a same or similar query and a confirmed answer, wherein the textual query is a query from a support ticket, wherein the confirmed answer is based on a successful closing of the support ticket, and wherein the closing of the support ticket confirms accuracy of a probable answer.

4 . The computer-implemented method of claim 1 , further comprising:

tracking one or more user actions;

generating descriptions of the one or more user actions; and

determining the textual query based on the one or more descriptions, wherein the textual query is an implied textual query.

5 . The computer-implemented method of claim 1 , wherein the adjusting of the similarity scores is based at least in part on one or more user-specific factors.

6 . The computer-implemented method of claim 5 , wherein one of the one or more user-specific factors comprises user's experience level.

7 . The computer-implemented method of claim 6 , further comprising:

applying a numerical scalar to the similarity scores based on the user's experience level.

8 . The computer-implemented method of claim 1 , further comprising:

generating a mean query vector of the textual query based on the plurality of query vectors; and

generating a mean resource vector of the list of resources based on the plurality of resource vectors, wherein the similarity scores are based on the mean query vector of the textual query and the mean resource vector of the list of resources.

9 . The computer-implemented method of claim 1 , further comprising:

determining the one or more probable answers to the textual query having similarity scores higher than a predetermined threshold.

10 . The computer-implemented method of claim 9 , further comprising:

ranking the one or more probable answers to the textual query based on the similarity scores in descending order.

11 . The computer-implemented method of claim 1 , wherein the one or more probable answers comprises identified portions of the list of resources.

12 . The method of claim 1 , wherein the subset of the plurality of resource vectors comprises one or more mean resource vectors generated from a plurality of resource vectors.

13 . A system for answering a query, the system comprising:

one or more processors; and

logic encoded in one or more non-transitory computer-readable storage media for execution by the one or more processors and when executed operable to cause the one or more processors to perform operations comprising:

partitioning, by a plurality of sentence transformers, each resource in a list of resources into a plurality of resource portions;

pre-calculating, by the plurality of sentence transformers, a plurality of resource vectors, wherein the pre-calculating of the plurality of resource vectors comprises:

vectorizing all text of whole resources in the list of resources into a first set of resource vectors of the plurality of resource vectors; and

vectorizing text of at least some resource portions of the plurality of resource portions that have been partitioned into a second set of resource vectors of the plurality of resource vectors;

receiving, by a server, a textual query from a user at search time;

partitioning, by the plurality of sentence transformers, the textual query into a plurality of query portions;

iteratively embedding, by the plurality of sentence transformers, a plurality of query vectors based on the plurality of query portions;

generating, by the server, similarity scores between the plurality of query vectors and the plurality of resource vectors;

tracking, by the server, user behavior associated with the user and a location of the user when submitting the textual query, wherein the tracking of the user behavior occurs at search time;

adjusting, by the server, at least some of the similarity scores based on feedback from the user, one or more attributes of the textual query, and the list of resources, wherein the feedback from the user comprises the user behavior at search time, wherein the adjusting of the similarity scores at search time further comprises limiting comparison of the plurality of query vectors to a subset of the plurality of resource vectors selected based on the adjusted similarity scores;

selecting, by the server, one or more vectorized pairs of query vector and resource vectors from the subset of the plurality of resource vectors based on the similarity scores;

determining, by the server, one or more probable answers to the textual query based on the one or more vectorized pairs that were selected;

displaying the one or more probable answers; and

applying model reinforcement to the similarity scores and the resource vectors based on the feedback from the user, wherein the similarity scores or the resource vectors stored by the system are modified and used in subsequent query processing operations.

14 . The system of claim 13 , wherein the textual query comprises a textual query entered by the user.

15 . The system of claim 13 , wherein the logic when executed is further operable to cause the one or more processors to perform operations comprising:

tracking one or more user actions;

generating descriptions of the one or more user actions; and

determining the textual query based on the one or more descriptions, wherein the textual query is an implied textual query.

16 . The system of claim 13 , wherein the logic when executed is further operable to cause the one or more processors to perform operations comprising:

partitioning each resource in the list of resources in a number of manners by the plurality of sentence transformers, wherein each resource is embedded differently in the pre-calculating.

17 . The system of claim 13 , wherein the subset of the plurality of resource vectors comprises one or more mean resource vectors generated from a plurality of resource vectors.

18 . A computer-implemented method for finding content related to a query, the method comprising:

partitioning, by a plurality of sentence transformers, each resource in a list of resources into a plurality of resource portions;

pre-calculating, by the plurality of sentence transformers, a plurality of resource vectors, wherein the pre-calculating of the plurality of resource vectors comprises:

vectorizing all text of whole resources in the list of resources into a first set of resource vectors of the plurality of resource vectors; and

vectorizing text of at least some resource portions of the plurality of resource portions that have been partitioned into a second set of resource vectors of the plurality of resource vectors;

receiving, by a server, a textual query from a user at search time;

partitioning, by the plurality of sentence transformers, the textual query into a plurality of query portions;

iteratively embedding, by the plurality of sentence transformers, a plurality of query vectors based on the plurality of query portions;

generating, by the server, similarity scores between the plurality of query vectors and the plurality of resource vectors;

tracking, by the server, user behavior associated with the user and a location of the user when submitting the textual query, wherein the tracking of the user behavior occurs at search time;

adjusting, by the server, at least some of the similarity scores based on feedback from the user, one or more attributes of the textual query, and the list of resources, wherein the feedback from the user comprises the user behavior at search time, wherein the adjusting of the similarity scores at search time further comprises limiting comparison of the plurality of query vectors to a subset of the plurality of resource vectors selected based on the adjusted similarity scores;

selecting, by the server, one or more vectorized pairs of query vector and resource vectors from the subset of the plurality of resource vectors based on the similarity scores;

determining, by the server, one or more probable answers to the textual query based on the one or more vectorized pairs that were selected;

displaying the one or more probable answers; and

applying model reinforcement to the similarity scores and the resource vectors based on the feedback from the user, wherein the similarity scores or resource vectors stored by the server are modified and used in subsequent executions of the method.

19 . The method of claim 18 , wherein the subset of the plurality of resource vectors comprises one or more mean resource vectors generated from a plurality of resource vectors.