IP Library Granted Patent US 11,934,403
Granted Patent B2
US 11,934,403 · App. 16/876,755 · Granted Mar 19, 2024

Generating training data for natural language search systems

Inventors: Mario Sergio Rodriguez (Santa Clara, CA); Arvind Srikantan (San Mateo, CA); Ahmet Bugdayci (Los Altos, CA)
Assignee: Salesforce, Inc.
G06F16/24553G06F16/2433G06F40/295G06F40/30G06F40/40G06N20/00
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 11,934,403
App. No.
16/876,755
Granted
Mar 19, 2024
Kind
B2
Abstract

System and methods are described for generating training data for a natural language search system, the training data including synthetic user queries and associated structured query language (SQL) statements. A method includes generating an abstract query representation from a probabilistic context-free grammar (PCFG), selecting a sample record from a database using the abstract query representation, generating a tagged user query from the abstract query representation and the sample record, and generating the one or more SQL statements from the tagged user query and one or more SQL templates.

Claims (33)

1. A computer-implemented method comprising:

generating, by a training data generator, an abstract query representation from a probabilistic context-free grammar (PCFG), the PCFG having a set of rules to which probabilities are assigned, wherein generating the abstract query representation includes performing a top-down expansion of a semantic structure of the PCFG by traversing the PCFG and sampling non-terminals based on the assigned probabilities, wherein generating an abstract query representation includes applying a beam search process;

selecting, by the training data generator, a sample record from a database using the abstract query representation;

generating, by the training data generator, a tagged user query from the abstract query representation and the sample record by replacing tokens of the abstract query representation with one or more values from the sample record;

generating, by the training data generator, one or more structured query language (SQL) statements from the tagged user query and one or more SQL templates;

generating, by the training data generator, the tagged user query by replacing tokens of the abstract query representation with one or more values from the sample record;

incorporating, by the training data generator, variants into the tagged user query, the variants including misspellings; and

performing, by the training data generator, a lookup operation for every token of the abstract query representation against the sample record to find one or more values for each token and assembling the one or more values as the tagged user query.

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

applying the tagged user query to a natural language search system, including a named entity recognition (NER) model, to train the NER model.

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

generating the abstract query representation by repeated symbol expansion.

4. The computer-implemented method of claim 1 , comprising: selecting the sample record from a target table of the database.

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

generating the one or more SQL statements by pattern matching the tagged user query against the one or more SQL templates.

6. A tangible, non-transitory computer-readable storage medium having instructions stored thereon which, when executed by a processing device, cause the processing device to:

generate, by a training data generator, an abstract query representation from a probabilistic context-free grammar (PCFG), the PCFG having a set of rules to which probabilities are assigned, wherein generating the abstract query representation includes performing a top-down expansion of a semantic structure of the PCFG by traversing the PCFG and sampling non-terminals based on the assigned probabilities, wherein generating an abstract query representation includes applying a beam search process;

select, by the training data generator, a sample record from a database using the abstract query representation;

generate, by the training data generator, a tagged user query from the abstract query representation and the sample record by replacing tokens of the abstract query representation with one or more values from the sample record;

generate, by the training data generator, one or more structured query language (SQL) statements from the tagged user query and one or more SQL templates;

incorporating, by the training data generator, variants into the tagged user query, the variants including misspellings; and

perform, by the training data generator, a lookup operation for every token of the abstract query representation against the sample record to find one or more values for each token and assemble the one or more values as the tagged user query.

7. The tangible, non-transitory computer-readable storage medium of claim 6 having instructions stored thereon which, when executed by a processing device, cause the processing device to generate the abstract query representation by repeated symbol expansion.

8. The tangible, non-transitory computer-readable storage medium of claim 6 having instructions stored thereon which, when executed by a processing device, cause the processing device to generate the one or more SQL statements by pattern matching the tagged user query against the one or more SQL templates.

9. A system comprising:

one or more servers, the servers configurable to cause:

generating, by a training data generator, an abstract query representation from a probabilistic context-free grammar (PCFG), the PCFG having a set of rules to which probabilities are assigned, wherein generating the abstract query representation includes performing a top-down expansion of a semantic structure of the PCFG by traversing the PCFG and sampling non-terminals based on the assigned probabilities, wherein generating an abstract query representation includes applying a beam search process;

selecting, by the training data generator, a sample record from a database using the abstract query representation;

generating, by the training data generator, a tagged user query from the abstract query representation and the sample record by replacing tokens of the abstract query representation with one or more values from the sample record;

generating, by the training data generator, one or more structured query language (SQL) statements from the tagged user query and one or more SQL templates; and

introducing, by the training data generator, variants into the tagged user query, the variants including misspellings;

performing, by the training data generator, a lookup operation for every token of the abstract query representation against the sample record to find one or more values for each token and assembling the one or more values as the tagged user query.

10. The system of claim 9 , the servers further configurable to cause generating the one or more SQL statements by pattern matching the tagged user query against the SQL templates.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0499 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2020
From: RODRIGUEZ, MARIO SERGIO; SRIKANTAN, ARVIND; BUGDAYCI, AHMET
To: SALESFORCE.COM, INC.
Reel/Frame 052780/0318 →
Continuity (1)
Related Publication 20210357409A1 · Nov 18, 2021
Cited By (1)
US 12,436,946