Generation of complex database queries and API calls from natural language utterances
Generating queries corresponding to natural language questions is a long standing problem. Traditional methods lack language flexibility, while newer sequence-to-sequence models require large amount of data. Schema-agnostic sequence-to-sequence models can be fine-tuned for a specific schema using a small dataset but these models have relatively low accuracy. We present a method that transforms the query generation problem into an intent classification and slot filling problem. This method can work using small datasets. For questions similar to the ones in the training dataset, it produces complex queries with high accuracy. For other questions, it can use a template-based approach or predict query pieces to construct the queries, still at a higher accuracy than sequence-to-sequence models. On a real-world dataset, a schema fine-tuned state-of-the-art generative model had 60\% exact match accuracy for the query generation task, while our method resulted in 92\% exact match accuracy.
Code (0)
등록된 구현이 없습니다.
Tasks
intent-classificationIntent ClassificationIntent Classification and Slot Fillingslot-fillingSlot FillingSimilar Papers 제목 키워드 기반
Declarative Techniques for NL Queries over Heterogeneous Data
In many industrial settings, users wish to ask questions in natural language, the answers to which require assembling information from diverse structured data sources. With the advent of Large Language Models (LLMs), app…
Code GenerationAre LLMs Overkill for Databases?: A Study on the Finiteness of SQL
Translating natural language to SQL for data retrieval has become more accessible thanks to code generation LLMs. But how hard is it to generate SQL code? While databases can become unbounded in complexity, the complexit…
Code GenerationHI-SQL: Optimizing Text-to-SQL Systems through Dynamic Hint Integration
Text-to-SQL generation bridges the gap between natural language and databases, enabling users to query data without requiring SQL expertise. While large language models (LLMs) have significantly advanced the field, chall…
Hint GenerationText to SQLText-To-SQLAuto-Cypher: Improving LLMs on Cypher generation via LLM-supervised generation-verification framework
Graph databases like Neo4j are gaining popularity for handling complex, interconnected data, over traditional relational databases in modeling and querying relationships. While translating natural language into SQL queri…
Knowledge GraphsSynthetic Data Generationtext-to-CypherStructure Guided Large Language Model for SQL Generation
Recent advancements in large language models (LLMs) have shown promise in bridging the gap between natural language queries and database management systems, enabling users to interact with databases without the backgroun…
Language ModelingLanguage ModellingLarge Language Modelmodel+3