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
- n<1K
|
| 9 |
+
task_categories:
|
| 10 |
+
- text2text-generation
|
| 11 |
+
- table-question-answering
|
| 12 |
+
tags:
|
| 13 |
+
- text-to-sql
|
| 14 |
+
- chichewa
|
| 15 |
+
- low-resource-language
|
| 16 |
+
- semantic-parsing
|
| 17 |
+
- nlp
|
| 18 |
+
- malawi
|
| 19 |
+
- sql
|
| 20 |
+
- qlora
|
| 21 |
+
- few-shot
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
# Chichewa Text-to-SQL
|
| 25 |
+
|
| 26 |
+
The **first structured Text-to-SQL benchmark for Chichewa**, a low-resource Bantu language spoken by over 12 million people in Malawi and neighboring regions.
|
| 27 |
+
The dataset contains **400 manually curated natural language–SQL pairs** in both **Chichewa (Nyanja)** and **English**, grounded in a unified relational SQLite database covering five real-world domains from Malawi.
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
## Dataset Summary
|
| 32 |
+
|
| 33 |
+
This benchmark was constructed to investigate the adaptation of Large Language Models (LLMs) for Text-to-SQL generation in Chichewa. It supports systematic evaluation of zero-shot, few-shot (random and retrieval-augmented), and parameter-efficient fine-tuning (QLoRA) approaches for low-resource semantic parsing.
|
| 34 |
+
|
| 35 |
+
Key findings from the accompanying research:
|
| 36 |
+
- **English** zero-shot execution accuracy: 20% → 50% (random few-shot) → 70% (RAG few-shot) → **76.7% (QLoRA)**
|
| 37 |
+
- **Chichewa** zero-shot execution accuracy: 0% across all models → 41.7% (RAG few-shot) → **41.7% (QLoRA)**
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## Database Schema
|
| 42 |
+
|
| 43 |
+
The SQLite database (`database/chichewa_text2sql.db`) contains five tables:
|
| 44 |
+
|
| 45 |
+
| Table | Description |
|
| 46 |
+
|---|---|
|
| 47 |
+
| `production` | Agricultural crop yield by district and season |
|
| 48 |
+
| `population` | Census data with geographic and demographic breakdowns |
|
| 49 |
+
| `mse_daily` | Malawi Stock Exchange daily trading data |
|
| 50 |
+
| `commodity_prices` | Commodity price data across markets |
|
| 51 |
+
| `food_insecurity` | Food insecurity indicators by region |
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Dataset Structure
|
| 56 |
+
|
| 57 |
+
### Files
|
| 58 |
+
|
| 59 |
+
| File | Description |
|
| 60 |
+
|---|---|
|
| 61 |
+
| `data/all.json` | Full dataset (400 examples) |
|
| 62 |
+
| `data/train.json` | Training split |
|
| 63 |
+
| `data/dev.json` | Development/validation split |
|
| 64 |
+
| `data/test.json` | Test split |
|
| 65 |
+
| `data/human_translations.csv` | Human-verified translations |
|
| 66 |
+
| `data/split_verification.json` | Split integrity verification |
|
| 67 |
+
| `database/chichewa_text2sql.db` | SQLite database |
|
| 68 |
+
| `database_tables_csv/` | Raw CSV files for each table |
|
| 69 |
+
|
| 70 |
+
### Data Fields
|
| 71 |
+
|
| 72 |
+
Each example contains:
|
| 73 |
+
|
| 74 |
+
```json
|
| 75 |
+
{
|
| 76 |
+
"id": 1,
|
| 77 |
+
"question_en": "Which district produced the most Maize",
|
| 78 |
+
"question_ny": "Ndi boma liti komwe anakolola chimanga chambiri?",
|
| 79 |
+
"sql_statement": "SELECT district, MAX(yield) AS max_yield FROM production WHERE crop = 'Maize';",
|
| 80 |
+
"sql_result": "[('Lilongwe', 444440.0)]",
|
| 81 |
+
"difficulty_level": "easy",
|
| 82 |
+
"table": "production"
|
| 83 |
+
}
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### Difficulty Levels
|
| 87 |
+
|
| 88 |
+
- `easy` — single table, simple SELECT / WHERE / ORDER BY
|
| 89 |
+
- `medium` — aggregations, GROUP BY, LIMIT
|
| 90 |
+
- `hard` — multi-condition queries, subqueries, JOINs
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## Splits
|
| 95 |
+
|
| 96 |
+
| Split | Size |
|
| 97 |
+
|---|---|
|
| 98 |
+
| Train | ~280 |
|
| 99 |
+
| Dev | ~60 |
|
| 100 |
+
| Test | ~60 |
|
| 101 |
+
| **Total** | **400** |
|
| 102 |
+
|
| 103 |
+
---
|
| 104 |
+
|
| 105 |
+
## Usage
|
| 106 |
+
|
| 107 |
+
```python
|
| 108 |
+
import json
|
| 109 |
+
|
| 110 |
+
with open("data/train.json") as f:
|
| 111 |
+
train = json.load(f)
|
| 112 |
+
|
| 113 |
+
print(train[0]["question_ny"]) # Chichewa question
|
| 114 |
+
print(train[0]["question_en"]) # English question
|
| 115 |
+
print(train[0]["sql_statement"]) # Ground-truth SQL
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
+
## Citation
|
| 121 |
+
|
| 122 |
+
If you use this dataset, please cite:
|
| 123 |
+
|
| 124 |
+
```bibtex
|
| 125 |
+
@dataset{eze2026chichewa,
|
| 126 |
+
author = {Eze, John Emeka},
|
| 127 |
+
title = {Chichewa Text-to-SQL: A Low-Resource Benchmark for Semantic Parsing in Chichewa},
|
| 128 |
+
year = {2026},
|
| 129 |
+
publisher = {HuggingFace},
|
| 130 |
+
url = {https://huggingface.co/datasets/johneze/chichewa-text2sql}
|
| 131 |
+
}
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
---
|
| 135 |
+
|
| 136 |
+
## License
|
| 137 |
+
|
| 138 |
+
[MIT](https://opensource.org/licenses/MIT)
|