File size: 2,806 Bytes
2a0d5f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2693bb
2a0d5f7
 
 
 
 
 
 
 
 
d89c46f
 
2a0d5f7
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
language: 
  - en
tags:
- text2sql
datasets:
- splash
widget:
 - text: "Give the name, population, and head of state for the country that has the largest area. || select name, population, continent from country order by surfacearea desc limit 1 || | world_1 | city : id, name, countrycode, district, population | sqlite_sequence : name, seq | country : code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage : countrycode, language, isofficial, percentage || swap continent with head of state because it is not required."
---
## parkervg/destt5-schema-prediction

Fine-tuned weights for the schema prediction model described in [Correcting Semantic Parses with Natural Language through Dynamic
Schema Encoding](https://arxiv.org/pdf/2305.19974.pdf), based on [t5-large](https://huggingface.co/t5-large).


### Training Data

The model has been fine-tuned on the 7,481 training examples in the [SPLASH interactive semantic parsing dataset](https://github.com/MSR-LIT/Splash).


### Training Objective

This model was initialized with [t5-large](https://huggingface.co/t5-large) and fine-tuned with the text-to-text generation objective.

As this model works in the interactive setting, we utilize the standard text2sql features such as `question` and `db_schema`, in addition to `feedback` and `incorrect_parse`.

```
[question] || [incorrect_parse] || [db_id] | [table] : [column] ( [content] , [content] ) , [column] ( ... ) , [...] | [table] : ... | ... || [feedback]
```

The model then attempts to predict those schema items that appear in the final gold SQL query, prefaced by the `db_id`.

```
[db_id] | [table] : [column] ( [content] , [content] ) , [column] ( ... ) , [...] | [table] : ...
```


### Performance

This model achieves 88.98% F1 score in identifying schema items on the SPLASH test set.

When combined with the [destt5-text2sql model](https://huggingface.co/parkervg/destt5-text2sql), it achieves 53.43% correction accuracy (exact-match) on the SPLASH test set. 


### References

1. [Correcting Semantic Parses with Natural Language through Dynamic
Schema Encoding](https://arxiv.org/pdf/2305.19974.pdf)

2. [DestT5 codebase](https://github.com/parkervg/destt5)

3. [Speak to your Parser: Interactive Text-to-SQL with Natural Language Feedback](https://arxiv.org/pdf/2005.02539v2.pdf)


### Citation

```bibtex
@inproceedings{glenn2023correcting,
  author = {Parker Glenn, Parag Pravin Dakle, Preethi Raghavan},
  title = "Correcting Semantic Parses with Natural Language through Dynamic Schema Encoding",
  booktitle = "Proceedings of the 5th Workshop on NLP for Conversational AI",
  publisher = "Association for Computational Linguistics",
  year = "2023"
}
```