Cross-Domain Text-to-SQL Parsing with Anchor Text Alignment

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional text-to-SQL semantic parsing systems are resource-intensive and unscalable due to the need for separate parsers for each database, as they struggle to handle different database schemas and cross-database queries effectively.

Innovation Solution

A sequential text-database encoding framework that contextualizes question and schema representations using large-scale pre-trained language models like BERT, with anchor texts and pointer-generator decoders to align natural language queries with database structures, enabling cross-database query translation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional semantic parsers are trained for each individual database, then parsing accuracy for that database is improved, but device complexity and resource consumption increase significantly

Engineering Contradiction:
Improveparsing accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies universality by developing a single semantic parser that can handle multiple databases with different schemas. The parser uses a pre-trained transformer language encoder and anchor text mechanism to generalize across domains, eliminating the need for separate parsers for each database while maintaining parsing accuracy through cross-domain adaptation

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Adaptability or versatility

If conventional semantic parsers are trained on large-scale datasets from numerous databases, then cross-database capability is improved, but the parser cannot reliably handle different schemas due to memorization limitations

Engineering Contradiction:
Improvecross-database capabilityVSAvoidquery translation accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The patent introduces anchor text as an intermediary mechanism that bridges the gap between natural language queries and database schemas. The anchor text represents database entities and serves as a mediator that allows the parser to generalize query patterns across different schemas without relying on memorization, thereby improving both cross-database capability and query translation accuracy

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If separate semantic parsers are developed for each database, then parsing performance is optimized for that database, but the process becomes unscalable and resource intensive

Engineering Contradiction:
Improveparsing performanceVSAvoidscalability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements a universal semantic parser that can serve multiple databases simultaneously. By using a pre-trained transformer encoder and anchor text mechanism, the system achieves reliable parsing performance across diverse schemas without requiring separate parsers for each database, thereby improving scalability and reducing resource consumption

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11720559B2Bridging textual and tabular data for cross domain text-to-query language semantic parsing with a pre-trained transformer language encoder and anchor text
Publication Date: 2023.08.08 SALESFORCE INC
  • US11720559B2 patent drawing
  • US11720559B2 patent drawing
  • US11720559B2 patent drawing

AI summary

A text-to-database neural network architecture is provided. The architecture receives a natural language question and a database schema and generates a serialized question-schema representation that includes a question and at least one table and at least one field from the database schema. The serialized question-schema representation is appended with at least one value that matches a word in the natural language question and at least one field in a database picklist. An encoder in the architecture generates question and schema encodings from the appended question-schema representation. Schema encodings are associated with metadata that indicates a data type of the fields and whether fields are associated with primary or foreign keys. A decoder in the architecture generates an executable query from the question encodings and schema encodings.