# US 12,111,858 B1 · Database system interaction embedding and indexing for text retrieval and generation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,111,858 B1
- Document ID: US12111858B1
- Status: Granted
- Kind: B1
- Application number: 18/481,036
- Filed: 2023-10-04
- Granted: 2024-10-08
- Earliest claimed: 2023-10-04
- Assignees: Salesforce, Inc.
- Applicants: Salesforce, Inc.
- Inventors: Regunathan Radhakrishnan; Zachary Alexander; Yuanxin Wang; Sitaram Asur; Aron Kale
- Web page: https://patentgrep.com/patent/US12111858B1

## CPC

- G06F 16/3347: {using vector based model}
- G06F 16/31: Indexing; Data structures therefor; Storage structures
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A text interaction record including interaction text from one or more messages between a client machine and a service provider is received at a database system. A search vector including a text embedding representing the interaction text in a multi-dimensional vector space may be determined based on the interaction text via a processor at the database system. A reference interaction record including reference interaction text may be retrieved from the database system based on the search vector. The reference interaction record may include a reference vector representing the reference interaction text in the multi-dimensional vector space. Recommended reply text is determined based on the interaction text and the reference interaction text by a large language model configured to generate the recommended reply text in response to a prompt that includes one or more natural language instructions.

## Claims

### Claim 1

A method comprising:
receiving a text interaction record at a database system, the text interaction record including interaction text from one or more messages between a client machine and a service provider;
determining a search vector based on the interaction text via a processor at the database system, the search vector including a text embedding representing the interaction text in a multi-dimensional vector space;
retrieving a reference interaction record from the database system based on the search vector, the reference interaction record including reference interaction text, the reference interaction record including a reference vector representing the reference interaction text in the multi-dimensional vector space;
determining recommended reply text based on the interaction text and the reference interaction text, the recommended reply text being determined by a large language model configured to generate the recommended reply text in response to a prompt that includes one or more natural language instructions; and
transmitting a response message from the database system to the client machine, the response message including some or all of the recommended reply text.

### Claim 2 (depends on 1)

The method recited in claim 1, the method further comprising:
determining a text interaction topic based on the interaction text, wherein the search vector also includes the text interaction topic.

### Claim 3 (depends on 2)

The method recited in claim 2, wherein the text interaction topic is determined by applying the large language model to some or all of the interaction text.

### Claim 4 (depends on 2)

The method recited in claim 2, wherein the text interaction topic is determined by applying a topic model to some or all of the interaction text, the topic model being trained using a plurality of training data interaction records including the reference interaction record.

### Claim 5 (depends on 2)

The method recited in claim 2, wherein the reference interaction record includes a database index that includes the reference vector and a reference interaction topic determined based on the reference interaction text.

### Claim 6 (depends on 1)

The method recited in claim 1, wherein the text interaction record includes one or more metadata elements, and wherein the reference interaction record is determined based at least in part on the one or more metadata elements.

### Claim 7 (depends on 6)

The method recited in claim 6, wherein the reference interaction text includes one or more reference messages between a reference client machine and a reference service provider, and wherein the one or more metadata elements includes an identity of a participant in the one or more reference messages.

### Claim 8 (depends on 6)

The method recited in claim 6, wherein the reference interaction text includes one or more reference messages between a reference client machine and a reference service provider, and wherein the one or more metadata elements includes timing information identifying when the one or more reference messages were transmitted.

### Claim 9 (depends on 1)

The method recited in claim 1, wherein the text embedding is determined via a text embedding model trained using a plurality of training data interactions including the reference interaction record.

### Claim 10 (depends on 1)

The method recited in claim 1, wherein the one or more messages are text-based messages transmitted in a live chat session.

### Claim 11 (depends on 1)

The method recited in claim 1, wherein the one or more messages are voice-based messages, and wherein the interaction text is determined by converting the one or more messages to text.

### Claim 12

A database system comprising at least one processor and configured to perform a method, the method comprising:
receiving a text interaction record, the text interaction record including interaction text from one or more messages between a client machine and a service provider;
determining a search vector based on the interaction text via a processor at the database system, the search vector including a text embedding representing the interaction text in a multi-dimensional vector space;
retrieving a reference interaction record from the database system based on the search vector, the reference interaction record including reference interaction text, the reference interaction record including a reference vector representing the reference interaction text in the multi-dimensional vector space;
determining recommended reply text based on the interaction text and the reference interaction text, the recommended reply text being determined by a large language model configured to generate the recommended reply text in response to a prompt that includes one or more natural language instructions; and
transmitting a response message to the client machine, the response message including some or all of the recommended reply text.

### Claim 13 (depends on 12)

The database system recited in claim 12, wherein the text interaction topic is determined based on the interaction text, and wherein the search vector also includes the text interaction topic.

### Claim 14 (depends on 13)

The database system recited in claim 13, wherein the text interaction topic is determined by applying the large language model to some or all of the interaction text.

### Claim 15 (depends on 13)

The database system recited in claim 13, wherein the reference interaction record includes a database index that includes the reference vector and a reference interaction topic determined based on the reference interaction text.

### Claim 16 (depends on 12)

The database system recited in claim 12, wherein the text interaction record includes one or more metadata elements, and wherein the reference interaction record is determined based at least in part on the one or more metadata elements.

### Claim 17 (depends on 12)

The database system recited in claim 12, wherein the text embedding is determined via a text embedding model trained using a plurality of training data interactions including the reference interaction record.

### Claim 18

One or more non-transitory computer readable media having instructions stored thereon for performing a method, the method comprising:
receiving a text interaction record at a database system, the text interaction record including interaction text from one or more messages between a client machine and a service provider;
determining a search vector based on the interaction text via a processor at the database system, the search vector including a text embedding representing the interaction text in a multi-dimensional vector space;
retrieving a reference interaction record from the database system based on the search vector, the reference interaction record including reference interaction text, the reference interaction record including a reference vector representing the reference interaction text in the multi-dimensional vector space;
determining recommended reply text based on the interaction text and the reference interaction text, the recommended reply text being determined by a large language model configured to generate the recommended reply text in response to a prompt that includes one or more natural language instructions; and
transmitting a response message from the database system to the client machine, the response message including some or all of the recommended reply text.

### Claim 19 (depends on 18)

The one or more non-transitory computer readable media recited in claim 18, the method further comprising:
determining a text interaction topic based on the interaction text, wherein the search vector also includes the text interaction topic, wherein the reference interaction record includes a database index that includes the reference vector and a reference interaction topic determined based on the reference interaction text.

### Claim 20 (depends on 18)

The one or more non-transitory computer readable media recited in claim 18, wherein the text interaction record includes one or more metadata elements, and wherein the reference interaction record is determined based at least in part on the one or more metadata elements, wherein the reference interaction text includes one or more reference messages between a reference client machine and a reference service provider, and wherein the one or more metadata elements includes an identity of a participant in the one or more reference messages.
