IP Library Granted Patent US 12,265,528
Granted Patent B1
US 12,265,528 · App. 18/187,553 · Granted Apr 1, 2025

Natural language query processing

Inventors: Wuwei Lan (La Jolla, CA); Patrick Ng (Great Neck, NY); Zhiguo Wang (Syosset, NY); Ramesh M. Nallapati (San Jose, CA); Henghui Zhu (Jersey City, NJ); Anuj Chauhan (New York, NY); Sudipta Sengupta (Bellevue, WA); Stephen Michael Ash (Seattle, WA); Bing Xiang (Mount Kisco, NY); Gregory David Adams (Seattle, WA)
Assignee: Amazon Technologies, Inc.
G06F16/243G06F16/221G06F16/24578G06F16/248G06F16/258G06N3/0455G06N3/0499
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 12,265,528
App. No.
18/187,553
Granted
Apr 1, 2025
Kind
B1
Abstract

Techniques for handling natural language query processing are described. In some examples, a sequence-to-sequence model is used to handle a natural language query. Post-processing of a result of the sequence-to-sequence model utilizes fine-grained information from an entity linker. In some examples, the sequence-to-sequence model and aspects of a natural language query pipeline are used to handle a natural language query.

Claims (48)

1. A computer-implemented method comprising:

receiving a natural language query (NLQ);

performing a lexical query to retrieve a set of candidate datasets for the NLQ;

performing named entity recognition (NER) on the NLQ to identify a set of named entities;

performing named entity linking (NEL) to link the set of named entities to corresponding columns or cells in the set of candidate datasets;

based on performing the NEL, selecting a set of top-K candidate datasets from the set of candidate datasets;

generating an intent representation (IR) using a sequence-to-sequence (S2S) machine learning model, the NLQ, and the set of top-K candidate datasets; and

generating a visualization for the intent representation (IR).

2. The computer-implemented method of claim 1 further comprising performing a lexical query to retrieve metadata for the NLQ, wherein the metadata comprises one or more of sorted column names, sorted named entities, sorted named expressions, and sorted named filters.

3. The computer-implemented method of claim 1 , wherein the generated IR comprises the IR and additional data comprising one or more of a metric, a group by listing, a filter, and an indication of a type of visualization to use.

4. A computer-implemented method comprising:

receiving a natural language query (NLQ);

performing a lexical query to retrieve metadata for the NLQ, wherein the metadata is associated with one or more datasets;

generating an intent representation (IR) using a sequence-to-sequence (S2S) machine learning model, wherein input to the S2S machine-learning model includes at least a portion of the retrieved metadata as a schema and the NLQ, and wherein output from the S2S machine-learning model includes the IR;

performing named entity recognition (NER) on the NLQ to identify a set of named entities in the NLQ;

performing named entity linking (NEL) to output fine-grained information, wherein the fine-grained information comprises information for linking one or more entities of the set of named entities to corresponding columns or cells of one or more of the datasets;

post-processing the IR using the fine-grained information by revising at least a subset of data within the IR, re-organizing a structure of the IR, or selecting a final dataset to use from the one or more datasets from an entity linker; and

generating a visualization for the post-processed IR.

5. The computer-implemented method of claim 4 , wherein the S2S machine-learning model is a Transformer-based model.

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

receiving user input from a graphical user interface; and

generating a second IR using the S2S machine learning model based at least in part on the received user input.

7. The computer-implemented method of claim 4 , wherein the schema comprises one or more of sorted column names, sorted named entities, sorted named expressions, and sorted named filters.

8. The computer-implemented method of claim 4 , wherein the generated IR comprises the IR and additional data comprising one or more of a metric, a group by listing, a filter, and an indication of a type of visualization to use.

9. The computer-implemented method of claim 8 , wherein the filter has a particular format.

10. The computer-implemented method of claim 4 , wherein the lexical query is performed by a service of a provider network.

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

processing the natural language query through a query language processing pipeline by:

recognizing one or more entities in the natural language query;

filtering respective candidate linkages for the one or more entities in the natural language query; and

ranking the filtered candidate linkages for the one or more entities in the natural language query.

12. The computer-implemented method of claim 11 , further comprising:

selecting between the intent representation (IR) and the query language processing pipeline.

13. The computer-implemented method of claim 4 , wherein the metadata comprises at least columns that match the one or more entities recognized in the natural language query.

14. The computer-implemented method of claim 13 , wherein the metadata further comprises cell information.

15. A system comprising:

a first one or more electronic devices to implement a database storage service in a multi-tenant provider network; and

a second one or more electronic devices to implement a natural language query processing service in the multi-tenant provider network, the natural language query processing service including instructions that upon execution cause the natural language query processing service to:

receive a natural language query (NLQ);

perform a lexical query to retrieve metadata for the NLQ from the database storage service, wherein the metadata is associated with one or more datasets;

generate an intent representation (IR) using a sequence-to-sequence (S2S) machine learning model, wherein input to the S2S machine-learning model includes at least a portion of the retrieved metadata as a schema and the NLQ, and wherein output from the S2S machine-learning model includes the IR;

perform named entity recognition (NER) on the NLQ to identify a set of named entities in the NLQ;

perform named entity linking (NEL) to output fine-grained information, wherein the fine-grained information comprises information for linking one or more entities of the set of named entities to corresponding columns or cells of the one or more datasets;

post-process the IR using the fine-grained information by revising at least a subset of data within the IR, re-organizing a structure of the IR, or selecting a final dataset to use from the one or more datasets; and

generate a visualization for the post-processed IR.

16. The system of claim 15 , wherein the S2S machine-learning model is a Transformer-based model.

17. The system of claim 15 , wherein the schema comprises one or more of sorted column names, sorted named entities, sorted named expressions, and sorted named filters.

18. The system of claim 15 , wherein the metadata comprises cell information and at least columns that match the one or more entities recognized in the natural language query.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2024
From: LAN, WUWEI; NG, PATRICK; WANG, ZHIGUO; NALLAPATI, RAMESH M.; ZHU, HENGHUI; CHAUHAN, ANUJ; SENGUPTA, SUDIPTA; ASH, STEPHEN MICHAEL; XIANG, BING; ADAMS, GREGORY DAVID
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 067426/0583 →
References Cited (47)
US 7475010B2 · Chao · 2009 [cited by applicant]
US 7526425B2 · Marchisio et al. · 2009 [cited by applicant]
US 8301438B2 · Ferrucci et al. · 2012 [cited by applicant]
US 8856096B2 · Marchisio et al. · 2014 [cited by applicant]
US 8983994B2 · Neels et al. · 2015 [cited by applicant]
US 9135238B2 · Bunescu et al. · 2015 [cited by applicant]
US 9703861B2 · Brown et al. · 2017 [cited by applicant]
US 9798748B2 · Brocato · 2017 [cited by applicant]
US 10303999B2 · Hertz et al. · 2019 [cited by applicant]
US 10304444B2 · Mathias et al. · 2019 [cited by applicant]
US 10318586B1 · Rose · 2019 [cited by applicant]
US 10657125B1 · Gautam et al. · 2020 [cited by applicant]
US 10747761B2 · Zhong et al. · 2020 [cited by applicant]
US 10956469B2 · Butler · 2021 [cited by applicant]
US 11086861B2 · Staar · 2021 [cited by applicant]
US 11360969B2 · Lal · 2022 [cited by applicant]
US 20030217052A1 · Rubenczyk et al. · 2003 [cited by applicant]
US 20050262051A1 · Dettinger · 2005 [cited by applicant]
US 20080016049A1 · Dettinger · 2008 [cited by applicant]
US 20110131216A1 · Chakravarthy et al. · 2011 [cited by applicant]
US 20120254143A1 · Varma et al. · 2012 [cited by applicant]
US 20150073798A1 · Karov et al. · 2015 [cited by applicant]
US 20160041986A1 · Nguyen · 2016 [cited by applicant]
US 20170060868A1 · Rais Ghasem · 2017 [cited by examiner]
US 20170212895A1 · Ahmed · 2017 [cited by applicant]
US 20180060422A1 · Wegryn · 2018 [cited by applicant]
US 20180082183A1 · Hertz · 2018 [cited by examiner]
US 20180218042A1 · Krishnan · 2018 [cited by applicant]
US 20180329993A1 · Bedadala · 2018 [cited by examiner]
US 20190095444A1 · Payne · 2019 [cited by applicant]
US 20190197185A1 · Miseldine · 2019 [cited by applicant]
US 20200034362A1 · Galitsky · 2020 [cited by applicant]
US 20200073983A1 · Sen · 2020 [cited by applicant]
US 20200117737A1 · Gopalakrishnan · 2020 [cited by applicant]
US 20200302122A1 · Lai · 2020 [cited by applicant]
US 20200372219A1 · Relangi et al. · 2020 [cited by applicant]
US 20210019309A1 · Yadav et al. · 2021 [cited by applicant]
US 20210042307A1 · Mustafi · 2021 [cited by applicant]
US 20210390099A1 · Rahmfeld · 2021 [cited by applicant]
US 20220121656A1 · Zheng · 2022 [cited by applicant]
US 20220138216A1 · Kesarwani · 2022 [cited by applicant]
CN 116842185A · 2023 [cited by applicant]
WO 2020263711A1 · 2020 [cited by applicant]
U.S. Appl. No. 17/219,656, filed Mar. 31, 2021, Wang et al. [cited by applicant]
U.S. Appl. No. 17/219,689, filed Mar. 31, 2021, Wang et al. [cited by applicant]
U.S. Appl. No. 17/219,706, filed Mar. 31, 2021, Wang et al. [cited by applicant]
Non-Final Office Action, U.S. Appl. No. 18/187,569, filed Jan. 31, 2024, 25 pages. [cited by applicant]
Cited By (6)
US 12,412,077 US 12,443,595 US 12,505,098 US 12,554,711 US 12,681,925 US 12,717,811