Natural Language Query to Structured Database Conversion
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Natural language bots struggle to effectively translate natural language queries into structured database queries in B2B environments due to the variability, complexity, and ambiguity of natural language utterances, leading to incomplete or incorrect results.
Innovation Solution
A system that employs a natural language understanding (NLU) engine to identify intent and entities in a natural language query, preprocesses candidate query fields and operands, and generates a structured database query by determining subject fields, conditional expressions, and sorting criteria, using query parameters and default fields to create a query plan.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If natural language processing is used to interface with B2B databases, then ease of operation is improved, but measurement precision deteriorates due to variability and ambiguity in natural language
Solution Approach 1:
The patent introduces an intermediary natural language processing system that includes entity recognition, entity resolution, and query generation components. This intermediary layer translates ambiguous natural language queries into precise database queries by identifying entities, resolving their meanings based on context, and generating structured SQL queries, thereby maintaining both ease of operation and measurement precision
Solution Approach 2:
The system performs preliminary actions by pre-defining entity types, attributes, and relationships in a domain-specific ontology before processing queries. This preliminary structuring of knowledge allows the system to accurately map natural language terms to database fields in advance, improving translation accuracy while keeping the interface simple
2Measurement precision
If highly-structured database query language is used to access B2B database, then measurement precision is improved, but ease of operation deteriorates due to complexity
Solution Approach 1:
The natural language processing system acts as an intermediary that automatically converts simple user queries into highly-structured database queries. Users interact with the system using natural language while the intermediary handles the complexity of generating precise SQL queries, thus improving ease of operation without sacrificing query accuracy
Solution Approach 2:
The system employs self-service by using automated entity recognition and resolution algorithms that independently analyze natural language queries, identify intended entities and attributes, and generate appropriate database queries without requiring user expertise in SQL or database structure, making complex database access simple for users
3Adaptability or versatility
If natural language variability is accommodated, then adaptability is improved, but device complexity increases due to need for handling multiple expressions
Solution Approach 1:
The system handles natural language variability by changing parameters in a structured way - it identifies key parameters (entities, attributes, relationships) from varied natural language expressions and maps them to consistent database parameters. This parameter-based approach allows the system to accommodate different phrasings and expressions while maintaining a manageable processing structure
Solution Approach 2:
The patent implements a universal entity recognition and resolution framework that can handle multiple types of entities (products, customers, orders, etc.) and their various attributes through a single unified processing system. This multi-functional approach allows the system to adapt to different query variations without requiring separate processing logic for each case, thus improving adaptability while controlling complexity
Data Source
AI summary
The present disclosure describes a system, method, and computer program for converting a natural language query to a structured database query. In response to receiving a natural language query for a database, an NLU model is applied to the query to identify an intent and entities associated with the query. The intent is mapped to a database object, and candidate query fields and operands are identified from the entities. The candidate query fields and operands are evaluated to identify any subject fields, conditional expressions, record count limit, and ordering/sorting criteria for the query. This including matching certain query fields and operands based on query parameters, operand types, and locations of operands relative to query fields. A query plan is created based on the evaluation of the candidate query fields and operands, and a database query is generated from the query plan.


