Natural Language Database Query Translation via Thesaurus Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current solutions for translating natural language queries into database queries are inadequate, particularly for non-software developers, as they require large training datasets and are often domain-specific, leading to lower-quality search results due to ambiguity in queries.
Innovation Solution
A method that receives a natural language query, divides it into clauses, identifies keywords, and maps these keywords to native database queries using a custom index with synonyms, and employs autonomous agents to clarify ambiguities, enabling better matching and more meaningful results.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If trained neural networks are used to translate natural language queries to database queries, then translation capability is improved, but large training datasets are required and the solutions become domain-specific
Solution Approach 1:
The patent introduces an intermediary mapping layer between natural language queries and database queries. Instead of directly training neural networks to translate NL to SQL, the system uses a thesaurus as an intermediary that maps NL keywords to database fields and tables through synonym relationships. This intermediary structure reduces the need for large training datasets by providing a structured knowledge base that guides the translation process.
Solution Approach 2:
The patent segments the translation process into distinct components: NL query parsing, keyword extraction, thesaurus-based mapping, and query generation. By breaking down the complex translation task into smaller, manageable segments, each component can be optimized independently, reducing the overall complexity and data requirements compared to end-to-end neural network approaches.
2Ease of operation
If traditional keyword mapping is used to translate natural language queries, then simplicity is maintained, but ambiguity in queries leads to lower-quality results
Solution Approach 1:
The patent combines traditional keyword mapping simplicity with thesaurus-based synonym expansion to create a hybrid approach. The system maintains the simplicity of direct keyword matching while enhancing it with composite knowledge from thesaurus relationships, allowing multiple synonyms to map to the same database field. This composite structure resolves ambiguities by providing multiple potential mappings that can be disambiguated through the structured thesaurus relationships.
3Productivity
If natural language queries are translated without resolving ambiguities, then processing speed is maintained, but query accuracy deteriorates
Solution Approach 1:
The patent performs preliminary action by pre-building the thesaurus structure with synonym relationships and mapping rules before query processing. This advance preparation allows the system to quickly resolve ambiguities during query translation without adding significant processing time. The thesaurus acts as a pre-computed knowledge base that enables fast lookup and disambiguation, maintaining productivity while improving accuracy.
Data Source
AI summary
An aspect of the present disclosure relate to translating natural language queries into native database queries. For example, a database application receives a natural language query from a user, divides the query into clauses, determines keywords from the clauses, and maps keywords in the query to native query that can query a database. In the case that the natural language query includes keywords that are not mapped, the application resolves an ambiguity by communicating with a user device. In the case that a keyword cannot be mapped, the application can map the keyword to a custom index that includes synonyms derived using pair-wise generalization or other techniques. Once all keywords are mapped, the database application generates a native database query and obtains results from a database.


