-
1.
公开(公告)号:US12124440B1
公开(公告)日:2024-10-22
申请号:US17473146
申请日:2021-09-13
Applicant: Amazon Technologies, Inc.
Inventor: Miguel Romero Calvo , Tesfagabir Meharizghi , Thiruvarul Selvan Senthivel , Saman Sarraf , Lin Lee Cheong
IPC: G06F16/00 , G06F16/242 , G06F16/2452
CPC classification number: G06F16/24522 , G06F16/2433
Abstract: An NLQ-SQLQ tool or service of a provider network may receive a natural language query (NLQ) from a client and convert the NLQ to an SQL query using ontological codes and placeholders. For one or more portions of the NLQ, the tool/service determines that the portion is associated with one or more codes of an ontology. The tool/service then assigns, based on criteria, a particular code to the portion. The tool/service replaces portions of the NLQ with different argument placeholders to generate a modified NLQ. A trained model converts the modified NLQ into an initial SQL query that has argument placeholders and subquery placeholders. The tool/service generates a final SQL query based on the initial SQL query, predefined SQL subquery templates associated with the subquery placeholders, and codes associated with the argument placeholders. The tool/service executes the final SQL query and sends results to the client.
-
2.
公开(公告)号:US20250013636A1
公开(公告)日:2025-01-09
申请号:US18892144
申请日:2024-09-20
Applicant: Amazon Technologies, Inc.
Inventor: Miguel Romero Calvo , Tesfagabir Meharizghi , Thiruvarul Selvan Senthivel , Saman Sarraf , Lin Lee Cheong
IPC: G06F16/2452 , G06F16/242
Abstract: An NLQ-SQLQ tool or service of a provider network may receive a natural language query (NLQ) from a client and convert the NLQ to an SQL query using ontological codes and placeholders. For one or more portions of the NLQ, the tool/service determines that the portion is associated with one or more codes of an ontology. The tool/service then assigns, based on criteria, a particular code to the portion. The tool/service replaces portions of the NLQ with different argument placeholders to generate a modified NLQ. A trained model converts the modified NLQ into an initial SQL query that has argument placeholders and subquery placeholders. The tool/service generates a final SQL query based on the initial SQL query, predefined SQL subquery templates associated with the subquery placeholders, and codes associated with the argument placeholders. The tool/service executes the final SQL query and sends results to the client.
-