Beaver Dataset
Collection
Beaver is a holistic framework designed to evaluate performance on complex, private‑enterprise text‑to‑SQL tasks. • 2 items • Updated
beaver-query
Homepage and leaderboard | Github repository | Paper
Beaver is a holistic framework for evaluating performance on complex, private‑enterprise text‑to‑SQL tasks. This repository includes questions and corresponding annotations. We reserve a portion of the full question set as a private, hidden test set. Each sample contains:
real, complex query, domain-specific query, domain-specific complex query.real indicates the query originates from actual query logs. All other categories refer to queries synthesized from templates derived from real queries.complex query: queries with high structural complexity (e.g., many joins, nesting) but no domain-specific knowledgedomain-specific query: queries with low structural complexity but requiring domain-specific knowledgedomain-specific complex query: queries with both high complexity and domain knowledgereal, base, cte, nested, cte-nested, nested-cte. A base query is not treated as a complex query, while a cte, nested, cte-nested, nested-cte query is considered a complex query.real indicates the query originates from actual query logs. All other categories refer to queries synthesized from templates derived from real queries.base indicates queries synthesized from base templatescte indicates queries synthesized from Common-Table-Expression (CTE) templatesnested indicates queries synthesized from nesting templatescte-nested indicates queries synthesized from nesting templates, followed by CTE templatesnested-cte indicates queries synthesized from CTE templates, followed by nesting templatesfrom datasets import load_dataset
import json
domain = 'dw'
data = load_dataset('beaverbench/beaver-query')
json_fields = ['tables', 'join_keys', 'column_mapping', 'domain_knowledge', 'sub_questions', 'sub_sqls']
for sample in data[domain]:
sample = {k: (json.loads(v) if k in json_fields else v) for k, v in sample.items()}
# print(json.dumps(sample, indent=2))
@article{chen2024beaver,
title={BEAVER: an enterprise benchmark for text-to-sql},
author={Chen, Peter Baile and Yang, Devin and Li, Weiyue and Wenz, Fabian and Zhang, Yi and Tatbul, Nesime and Cafarella, Michael and Demiralp, {\c{C}}a{\u{g}}atay and Stonebraker, Michael},
journal={arXiv preprint arXiv:2409.02038},
year={2024}
}