vaishali's picture
Update README.md
ec274b1 verified
metadata
dataset_info:
  features:
    - name: tables
      sequence: string
    - name: table_names
      sequence: string
    - name: query
      dtype: string
    - name: answer
      dtype: string
    - name: db_name
      dtype: string
    - name: source
      dtype: string
    - name: target
      dtype: string
  splits:
    - name: train
      num_bytes: 109666452654
      num_examples: 132645
  download_size: 21580956560
  dataset_size: 109666452654
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
task_categories:
  - table-question-answering

Usage

import pandas as pd
from datasets import load_dataset

multitableQA_pretraining = load_dataset("vaishali/multitabqa_pretraining")

for sample in multitableQA_pretraining['train']:
  sql_query = sample['query']
  input_table_names = sample["table_names"]
  input_tables = [pd.read_json(table, orient='split') for table in sample['tables']]
  answer = pd.read_json(sample['answer'], orient='split')

  # flattened input/output
  input_to_model = sample["source"]
  target = sample["target"]

BibTeX entry and citation info

@inproceedings{pal-etal-2023-multitabqa,
    title = "{M}ulti{T}ab{QA}: Generating Tabular Answers for Multi-Table Question Answering",
    author = "Pal, Vaishali  and
      Yates, Andrew  and
      Kanoulas, Evangelos  and
      de Rijke, Maarten",
    booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2023",
    address = "Toronto, Canada",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.acl-long.348",
    doi = "10.18653/v1/2023.acl-long.348",
    pages = "6322--6334",
    abstract = "Recent advances in tabular question answering (QA) with large language models are constrained in their coverage and only answer questions over a single table. However, real-world queries are complex in nature, often over multiple tables in a relational database or web page. Single table questions do not involve common table operations such as set operations, Cartesian products (joins), or nested queries. Furthermore, multi-table operations often result in a tabular output, which necessitates table generation capabilities of tabular QA models. To fill this gap, we propose a new task of answering questions over multiple tables. Our model, MultiTabQA, not only answers questions over multiple tables, but also generalizes to generate tabular answers. To enable effective training, we build a pre-training dataset comprising of 132,645 SQL queries and tabular answers. Further, we evaluate the generated tables by introducing table-specific metrics of varying strictness assessing various levels of granularity of the table structure. MultiTabQA outperforms state-of-the-art single table QA models adapted to a multi-table QA setting by finetuning on three datasets: Spider, Atis and GeoQuery.",
}