# US 2021/0081415 A1 · Query classification alteration based on user input

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

- Number: US 2021/0081415 A1
- Document ID: US20210081415A1
- Status: Published application
- Kind: A1
- Application number: 16/736,621
- Filed: 2020-01-07
- Published: 2021-03-18
- Earliest claimed: 2019-09-18
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Elizabeth Clarke; Alain Ducoulombier; Swapnil Kulkarni; Alexander Lovell; Glenn Sorrentino
- Web page: https://patentgrep.com/patent/US20210081415A1

## CPC

- G06F 16/24534: {Query rewriting; Transformation}
- G06F 16/23: Updating
- G06F 16/2423: {Interactive query statement specification based on a database schema}
- G06F 16/243: {Natural language query formulation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed for classifying a user search query for a database system. In disclosed techniques, a computing system receives a user search query for the database system and determines, based on the user search query, a database query that is compatible with an interface of the database system to implement the user search query. In some embodiments, the computing system causes a query remediation interface to be presented to a user that entered the user search query. In some embodiments, the interface includes: a classification of the user search query that specifies attributes of the database query, and one or more elements selectable to alter the database query. The computing system receives, from the user via the query remediation interface, input for altering the database query and determines an updated database query based on the input. The computing system may access the database system using the updated database query.

## Claims

### Claim 1

A non-transitory computer-readable medium having program instructions stored thereon that are capable of causing a computer system to implement operations comprising:
receiving a user search query for a database system;
determining, based on the user search query, a database query that is compatible with an interface of the database system to implement the user search query;
causing a query remediation interface to be presented to a user that entered the user search query, wherein the query remediation interface includes:
information indicating a classification of the user search query, wherein the classification specifies one or more attributes of the database query;
one or more elements selectable to alter the database query;
receiving, from the user via the query remediation interface, input indicating an alteration of the database query;
determining an updated database query based on the received input; and
accessing the database system using the updated database query.

### Claim 2 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the database system is a multi-tenant database system and wherein the determining the database query is further based on contextual information specifying that the user is associated with a particular tenant within the multi-tenant database system.

### Claim 3 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the operations further comprise:
identifying one or more typographical errors in the user search query; and
correcting the one or more typographical errors identified in the user search query, wherein the classification of the user search query further specifies the corrected typographical errors and wherein the one or more elements are further selectable to alter the corrected typographical errors.

### Claim 4 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the classification of the user search query is generated based on a tagging process that includes tagging a first set of one or more terms in the user search query according to a set of tagging criteria, wherein the set of tagging criteria includes a first criterion that is based on whether one or more terms in the user search query identify an object defined in a schema of a database of the database system.

### Claim 5 (depends on 4)

The non-transitory computer-readable medium of claim 4, wherein the set of tagging criteria further includes a second criterion that is based on whether one or more terms in the user search query are within a specified vocabulary indicative of a natural language query.

### Claim 6 (depends on 5)

The non-transitory computer-readable medium of claim 5, wherein the set of tagging criteria further includes a third criterion that is based on whether one or more terms in the user search query are recognized modifiers for other terms of the user search query, including terms that have been tagged as identifying an object defined in a schema of the database.

### Claim 7 (depends on 6)

The non-transitory computer-readable medium of claim 6, wherein one of the terms in the user search query that is a recognized modifier specifies a date range.

### Claim 8 (depends on 4)

The non-transitory computer-readable medium of claim 4, wherein the information indicating a classification of the user search query includes, in response to the tagging process being unable to tag a second set of one or more terms in the user search query, a message specifying that the first set of terms were used to generate the database query and that the second set of terms were not able to be tagged.

### Claim 9

A method, comprising:
receiving, by a computing system from a user, a user search query for a database;
tagging, by the computing system, one or more terms of the user search query, including assigning a tag to a first term of the user search query that identifies an object defined in a schema of the database;
determining, by the computing system based on the tagging, to present at least one remediation option to the user, wherein the presenting includes:
a classification of the user search query; and
one or more elements that are selectable to alter how the database is accessed to implement the user search query;
receiving input, by the computing system from the user, for the at least one remediation option; and
accessing, by the computing system, the database based on the received input.

### Claim 10 (depends on 9)

The method of claim 9, wherein the at least one remediation option is generated based on contextual information that is independent of the user search query and wherein the contextual information includes a classification history for user search queries previously entered by the user.

### Claim 11 (depends on 9)

The method of claim 9, wherein the one or more elements that are selectable to alter how the database is accessed are further selectable to alter whether the user search query is implemented as a natural language query or a keyword query.

### Claim 12 (depends on 9)

The method of claim 9, wherein the one or more elements that are selectable to alter how the database is accessed are further selectable to alter elements of a database query used for accessing the database.

### Claim 13 (depends on 9)

The method of claim 9, wherein the at least one remediation option specifies:
an indication of one or more terms of the user search query that are untagged; and
an indication of one or more tagged terms of the user search query used to implement the user search query.

### Claim 14 (depends on 9)

The method of claim 9, wherein a first remediation option allows a user to alter the user search query and a second remediation option allows the user to alter a database query that specifies how the database is accessed to implement the user search query.

### Claim 15 (depends on 9)

The method of claim 9, wherein the tagging further includes:
assigning a first type of tag to one or more terms of the user search query that are within a specified vocabulary indicative of a natural language query, wherein the determining to present the at least one remediation option is based on a number of terms in the user search query assigned the first type of tag.

### Claim 16 (depends on 9)

The method of claim 9, wherein the presenting includes a plurality of classifications of the user search query and wherein each of the plurality of classifications includes a preview of search results for the user search query generated based on their respective classifications.

### Claim 17

A non-transitory computer-readable medium having program instructions stored thereon that are capable of causing a computer system to implement operations comprising:
receiving a user search query for a database system;
determining, based on the user search query and contextual information that is independent of the user search query, a database query that is compatible with an interface of the database system to implement the user search query;
causing a query remediation interface to be presented to the user that entered the user search query, wherein the query remediation interface includes:
information indicating a classification of the user search query, wherein the classification specifies whether the user search query was implemented as a natural language query or a keyword query, and wherein the classification specifies one or more attributes of the database query;
one or more elements selectable to receive remediation input relating to the classification of the user search query;
receiving, from the user via the query remediation interface, the remediation input;
determining an updated database query based on the remediation input; and
accessing the database system using the updated database query.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein the one or more elements that are selectable to alter the database query are selectable to alter one or more terms of the user search query that are recognized modifiers for other terms of the user search query, including terms that have been tagged as identifying an object defined in a schema of a database of the database system.

### Claim 19 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein the user search query includes a particular term, wherein determining the database query includes adding a first restriction to the particular term, and wherein one or more elements are further selectable to receive remediation input indicating one or more alternative restrictions of the particular term for the updated database query.

### Claim 20 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein the query remediation interface includes a plurality of classifications of the user search query, wherein a number of the plurality of classifications is based on a number of unrecognized terms in the user search query.
