File size: 4,547 Bytes
8560eef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
68
69
70
71
72
73
74
75
76
---
language:
- en
license: apache-2.0
tags:
- NatSight-AdpSeq2Seq
---

## Paper

## [NatSight: A framework for building domain agnostic Natural Language Interface to Databases for next-gen Augmented Analytics](https://dcal.iimb.ac.in/baiconf2022/full_papers/2346.pdf)
Aurthors: *Rohit Sroch*, *Dhiraj Patnaik*, *Jayachandran Ramachandran*

## Abstract

In modern organizations, a large volume of customer, transactional and operational data is stored in relational database management systems (RDBMS). It provides scalability and agility for various business use cases. However, the interaction between these databases and business users is limited as users often lack the knowledge of query languages such as SQL and they need to rely on technical experts to interact with the database for curating insights & analytics. Recent advances in augmented analytics platforms have enabled business users to engage with data in natural language and consume insights in the form of data tables and charts. There are still limitations as the experience is still suboptimal.
The development of natural language interfaces to databases has long been a challenge as previous approaches rely on a considerable amount of human-labeled data for domain adaptation. Moreover, most interfaces provide a constrained environment and do not allow the users to freely and naturally interact with data.
In this work, we propose our framework for building domainagnostic natural language (NL) interfaces to relational databases (NLIDBs) in few-shot and zero-shot scenarios. Also, recent advancements in the area of Transfer learning allowed us to leverage Transformer-based pre-trained language models (PLMs), resulting in various real-world applications in functional areas like CRM, Supply Chain, Ecommerce, Health Care, etc. for getting real-time insights.
More specifically, our framework works in the following ways: First, it provides graph focused auto-suggestions to complete the natural language queries based on the graph representation of database schema, and Second, it uses an adaptive sequenceto-sequence translator model that translates natural language queries to corresponding SQL queries. Furthermore, a feedback loop is used to improve the system based on active learning.
Experiment results on benchmark datasets show that our approach achieves a state-of-the-art performance and can be effective in the few-shot and zero-shot scenarios for domainagnostic applications.

*Sroch, R. & Patnaik, D. & Ramachandran, J. (2022). [NatSight: A framework for building domain agnostic Natural Language Interface to Databases for next-gen Augmented Analytics](https://dcal.iimb.ac.in/baiconf2022/full_papers/2346.pdf). 
        9th International Conference on Business Analytics and Intelligence, IIM Banglore (BAI Conf’22).*

## NatSight-bart-base-wikisql

 For weights initialization, we used [facebook/bart-base](https://huggingface.co/facebook/bart-base)


## Intended uses & limitations

More information needed

### Training hyperparameters

Please take a look at the `training_args.bin` file

```python
$ import torch
$ hyperparameters = torch.load(os.path.join('training_args.bin'))

```
        

### Evaluation results

| ckpt_name        | eval_bp | eval_em_accuracy | eval_ref_len | eval_runtime | eval_samples | eval_samples_per_second | eval_score | eval_steps_per_second | eval_sys_len |
|:----------------:|:-------:|:----------------:|:------------:|:------------:|:------------:|:-----------------------:|:----------:|:---------------------:|:------------:|
| checkpoint-42879 | 0.9955  | 82.3051          | 55163        | 365.8382     | 4821         | 13.178                  | 95.3419    | 1.648                 | 54917        |


### Framework versions

- Transformers >=4.8.0
- Pytorch >=1.6.0
- TensorFlow >=2.5.0
- Flax >=0.3.5
- Datasets >=1.10.2
- Tokenizers >=0.11.6

If you use these models, please cite the following paper:


        ```
        @article{article, 
            author={Sroch, R. & Patnaik, D. & Ramachandran, J}, 
            title={NatSight: A framework for building domain agnostic Natural Language Interface to Databases for next-gen Augmented Analytics}, 
            journal={9th International Conference on Business Analytics and Intelligence, IIM Banglore (BAI Conf’22)},
            day={17},
            year={2022}, 
            month={Dec},
            url = {https://dcal.iimb.ac.in/baiconf2022/full_papers/2346.pdf}                                                  
        } 
        ```