Generation of complex database queries and API calls from natural language utterances

Generating queries corresponding to natural language questions is a long\nstanding problem. Traditional methods lack language flexibility, while newer\nsequence-to-sequence models require large amount of data. Schema-agnostic\nsequence-to-sequence models can be fine-tuned for a specific schema using a\nsmall dataset but these models have relatively low accuracy. We present a\nmethod that transforms the query generation problem into an intent\nclassification and slot filling problem. This method can work using small\ndatasets. For questions similar to the ones in the training dataset, it\nproduces complex queries with high accuracy. For other questions, it can use a\ntemplate-based approach or predict query pieces to construct the queries, still\nat a higher accuracy than sequence-to-sequence models. On a real-world dataset,\na schema fine-tuned state-of-the-art generative model had 60\\% exact match\naccuracy for the query generation task, while our method resulted in 92\\% exact\nmatch accuracy.\n

Paper

Similar papers

© 2026 NYSGPT2525 LLC