Datasets:
File size: 3,508 Bytes
ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d 81e881b ce03d4d |
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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
---
license: mit
task_categories:
- question-answering
language:
- vi
tags:
- ag
- t5
- vit5
- squad-format
- vietnamese
- education
- nlp
pretty_name: Vietnamese Question Generation
size_categories:
- 10K<n<100K
---
# HVU_QA
**HVU_QA** is an open-source Vietnamese Question–Context–Answer (QCA) corpus for building FAQ-style question generation systems in low-resource languages.
It was created using a fully automated pipeline combining web crawling, semantic tag-based extraction, and AI-assisted filtering to ensure high factual accuracy.
---
## Dataset Description
- **Language:** Vietnamese
- **Format:** SQuAD-style JSON
- **Size:** 30,000 QCA triples
- **Domains:** Social services, labor law, administrative processes, and public service topics.
Each data sample contains:
- `question`: The generated or extracted question
- `context`: The supporting passage
- `answer`: The answer span within the context
---
## ⚙️ Dataset Creation
**Pipeline:**
1. Selecting relevant QA websites from trusted sources
2. Automated crawling to collect raw QA webpages
3. Semantic tag-based extraction to get clean QCA triples
4. AI-assisted filtering to remove noisy or inconsistent samples
**Annotation & Licensing:**
All data are collected from public-domain Vietnamese government and service portals, released under CC BY 4.0.
---
## Quality Evaluation
A fine-tuned `VietAI/vit5-base` model trained on HVU_QA achieved:
| Metric | Score |
|-----------------------|-------------|
| BLEU | 90.61 |
| Semantic similarity | 97.0% (cos ≥ 0.8) |
| Human grammar | 4.58 / 5 |
| Human usefulness | 4.29 / 5 |
---
## Data Fields
```json
{
"question": "string",
"context": "string",
"answer": "string"
}
```
- `question`: The question text
- `context`: The paragraph containing the answer
- `answer`: The answer span
---
## How to Use
### Load from Hub
```python
from datasets import load_dataset
ds = load_dataset("DANGDOCAO/GeneratingQuestions", split="train")
print(ds[0])
```
### Install Dependencies
```bash
pip install datasets transformers sentencepiece safetensors accelerate evaluate sacrebleu rouge-score nltk scikit-learn
```
(Optional) Install PyTorch separately from [pytorch.org](https://pytorch.org)
---
## Example Usage
### Fine-tune a Question Generation Model
```bash
python fine_tune_qg.py
```
This will:
1. Load data from `30ktrain.json`
2. Fine-tune `VietAI/vit5-base`
3. Save model to `t5-viet-qg-finetuned/`
### Generate Questions
```bash
python generate_question.py
```
**Example**
```
Input passage:
Iced milk coffee (Cà phê sữa đá) is a famous drink in Vietnam.
Number of questions: 5
```
**Output**
1. What type of coffee is famous in Vietnam?
2. Why is iced milk coffee popular?
3. What ingredients are included in iced milk coffee?
4. Where does iced milk coffee originate from?
5. How is Vietnamese iced milk coffee prepared?
**You can adjust** in `generate_question.py`:
`top_k`, `top_p`, `temperature`, `no_repeat_ngram_size`, `repetition_penalty`
---
## Citation
If you use **HVU_QA** in your research:
```bibtex
@inproceedings{nguyen2025hvuqa,
title={A Method to Build QA Corpora for Low-Resource Languages},
author={Ha Nguyen-Tien and Phuc Le-Hong and Dang Do-Cao and Cuong Nguyen-Hung and Chung Mai-Van},
booktitle={Proceedings of the International Conference on Knowledge and Systems Engineering (KSE)},
year={2025}
}
``` |