Datasets:
license: mit
task_categories:
- question-answering
language:
- vi
tags:
- question-generation
- nlp
- faq
- low-resource
pretty_name: HVU_QA
size_categories:
- 10K<n<100K
HVU_QA
HVU_QA is an open-source Vietnamese Question–Context–Answer (QCA) corpus and supporting tools for building FAQ-style question generation systems in low-resource languages. The dataset was created using a fully automated pipeline that combines web crawling from trustworthy sources, semantic tag-based extraction, and AI-assisted filtering to ensure high factual accuracy.
📋 Dataset Description
- Language: Vietnamese
- Format: SQuAD-style JSON
- Total samples: 30,000 QCA triples (full corpus released)
- Domains covered: Social services, labor law, administrative processes, and other public service topics.
- Structure of each sample:
- Question: Generated or extracted question
- Context: Supporting text passage from which the answer is derived
- Answer: Answer span within the context
⚙️ Dataset Creation
Pipeline:
- Selecting relevant QA websites from trusted sources.
- Automated data crawling to collect raw QA webpages.
- Extraction via semantic tags to obtain clean Question–Context–Answer triples.
- AI-assisted filtering to remove noisy or factually inconsistent samples.
📊 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 score | 4.58 / 5 |
| Human usefulness score | 4.29 / 5 |
These results confirm that HVU_QA is a high-quality resource for developing robust FAQ-style question generation models.
📁 Data Fields
.HVU_QA
├── t5-viet-qg-finetuned/
├── fine_tune_qg.py
├── generate_question.py
├── 30ktrain.json
└── README.md
All data files are UTF-8 encoded and ready for use in NLP pipelines.
⚡ How to Use
📦 Install Dependencies
pip install datasets transformers sentencepiece safetensors accelerate evaluate sacrebleu rouge-score nltk scikit-learn
(Install PyTorch separately from pytorch.org if not installed yet.)
📥 Load Dataset from Hugging Face Hub
from datasets import load_dataset
ds = load_dataset("DANGDOCAO/GeneratingQuestions", split="train")
print(ds[0])
🚀 Example Usage
🔹 Fine-tuning
python fine_tune_qg.py
This will:
- Load the dataset from
30ktrain.json. - Fine-tune
VietAI/vit5-base. - Save the trained model into
t5-viet-qg-finetuned/.
(Or download the pre-trained model: t5-viet-qg-finetuned.)
🔹 Generating Questions
python generate_question.py
Example:
Input passage:
Iced milk coffee is a famous drink in Vietnam.
Number of questions: 5
Output:
- What type of coffee is famous in Vietnam?
- Why is iced milk coffee popular?
- What ingredients are included in iced milk coffee?
- Where does iced milk coffee originate from?
- 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, please cite:
@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}
}