Back to Search
Start Over
Domain-Specific Few-Shot Table Prompt Question Answering via Contrastive Exemplar Selection.
- Source :
-
Algorithms . Jul2024, Vol. 17 Issue 7, p278. 18p. - Publication Year :
- 2024
-
Abstract
- As a crucial task in natural language processing, table question answering has garnered significant attention from both the academic and industrial communities. It enables intelligent querying and question answering over structured data by translating natural language into corresponding SQL statements. Recently, there have been notable advancements in the general domain table question answering task, achieved through prompt learning with large language models. However, in specific domains, where tables often have a higher number of columns and questions tend to be more complex, large language models are prone to generating invalid SQL or NoSQL statements. To address the above issue, this paper proposes a novel few-shot table prompt question answering approach. Specifically, we design a prompt template construction strategy for structured SQL generation. It utilizes prompt templates to restructure the input for each test data and standardizes the model output, which can enhance the integrity and validity of generated SQL. Furthermore, this paper introduces a contrastive exemplar selection approach based on the question patterns and formats in domain-specific contexts. This enables the model to quickly retrieve the relevant exemplars and learn characteristics about given question. Experimental results on the two datasets in the domains of electric energy and structural inspection show that the proposed approach outperforms the baseline models across all comparison settings. [ABSTRACT FROM AUTHOR]
Details
- Language :
- English
- ISSN :
- 19994893
- Volume :
- 17
- Issue :
- 7
- Database :
- Academic Search Index
- Journal :
- Algorithms
- Publication Type :
- Academic Journal
- Accession number :
- 178696574
- Full Text :
- https://doi.org/10.3390/a17070278