Schema-Agnostic Text-to-SQL Training Data Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing deep learning models for Text-to-SQL face challenges in maintaining accuracy when transitioning between different database schemas, requiring extensive computing resources for individual training and lacking sufficient training coverage.
Innovation Solution
A method and system for generating training data that includes selecting values, adverbs, and adjectives from a database schema, determining join paths, and creating structured query language patterns to train a text-to-SQL model using a first artificial neural network, reducing the need for individual schema-specific training.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If deep learning models are trained individually for different database schemas, then accuracy for specific schemas is improved, but computing resource usage increases significantly
Solution Approach 1:
The patent creates a universal training data generation system that produces schema-agnostic training examples. The system generates synthetic database schemas and corresponding SQL queries using templates that can be applied across different database types, allowing a single model to serve multiple schema-specific functions without requiring separate training processes for each schema.
Solution Approach 2:
The system dynamically generates diverse training data by varying parameters such as schema structure, table relationships, and query patterns. By changing these parameters systematically, the model learns to adapt to different schemas during training, reducing the need for retraining while maintaining accuracy across varying database configurations.
2Measurement precision
If deep learning models are trained individually for different database schemas, then schema-specific accuracy is improved, but training time increases
Solution Approach 1:
The system performs preliminary action by pre-generating a comprehensive corpus of synthetic training data that covers multiple database schemas and query patterns. This pre-generated training data is then used to train a single model that can handle various schemas, eliminating the need for repeated training processes and significantly reducing overall training time.
3Measurement precision
If extensive computing resources are allocated for individual schema training, then model accuracy is improved, but system complexity increases
Solution Approach 1:
The system uses copying by creating synthetic replicas of database schemas through template-based generation. Instead of training separate models on actual diverse schemas, the system generates copied representations of various schemas using predefined templates, which simplifies the training process while maintaining the diversity needed for accurate query generation across different real schemas.
4Productivity
If training data coverage is limited, then training speed is maintained, but model adaptability to different schemas deteriorates
Solution Approach 1:
The training data generation system is dynamic, automatically creating diverse schema configurations and query patterns on demand. Rather than relying on static, limited training datasets, the system dynamically generates training examples that adapt to cover various schema types, improving model adaptability without requiring proportionally more training resources.
Data Source
AI summary
A set of values can be selected from a plurality of fields of a table in a database. At least one adverb or adjective can be selected for the set of values. Join paths for values in the set of values can be determined. A structured query language pattern can be determined based, at least in part, on at least one value in the set of values, the at least one adverb or adjective for the set of values, and the join paths for the set of values. The structured query language pattern can be stored to first training data configured, at least in part, for use in machine learning to train a text-to-SQL model, the text-to-SQL model comprising a first artificial neural network and configured to convert first natural language text to a first structured query language query.


