hoailebads/VLSP-Legal-Reranker-Train
VLSP Vietnamese Legal Reranker — Training + Eval data Bộ dữ liệu listwise reranking cho truy hồi điều luật tiếng Việt (VLSP). Đây chính xác là dữ liệu đã dùng để fine-tune 2 model reranker: 🤗 hoailebads/Qwen3-Reranker-8B-VLSP-Legal-LoRA (bản chính, vượt SOTA VLSP) 🤗 hoailebads/Qwen3-Reranker-0.6B-VLSP-Legal-LoRA (bản nhẹ) 📦 Code, pipeline & script tạo dữ liệu: https://github.com/hoaileba/Qwen-Retrieval-Tuning (file gốc: dataset/train_rankllama_hn23_v3.jsonl, tạo bằng… See the full description on the dataset page: https://huggingface.co/datasets/hoailebads/VLSP-Legal-Reranker-Train.
VLSP Vietnamese Legal Reranker — Training + Eval data
Bộ dữ liệu listwise reranking cho truy hồi điều luật tiếng Việt (VLSP). Đây chính xác là dữ liệu đã dùng để fine-tune 2 model reranker:
- 🤗 `hoailebads/Qwen3-Reranker-8B-VLSP-Legal-LoRA` (bản chính, vượt SOTA VLSP)
- 🤗 `hoailebads/Qwen3-Reranker-0.6B-VLSP-Legal-LoRA` (bản nhẹ)
📦 Code, pipeline & script tạo dữ liệu: https://github.com/hoaileba/Qwen-Retrieval-Tuning (file gốc: dataset/train_rankllama_hn23_v3.jsonl, tạo bằng data_prep/mine_hard_negatives_v3.py).
Nội dung
train.jsonl — schema mỗi dòng
{
"id": "d9189b1cc63747b4e879984e5a72d190",
"question": "Những trường hợp nào không tiếp tục sử dụng đối với công trình hết thời hạn...",
"positive": {"id": "06/2021/nđ-cp|41", "text": "Điều 41. Xử lý đối với công trình..."},
"negatives": ["Điều 19. Vi phạm quy định về bảo hành...", "..."],
"_source": "zalo",
"_neg_source": "teacher_aiteamvn_v3"
}positivelà điều luật đúng (index 0 khi train listwise).negativeslà hard negative mine bằng dense retriever + teacher reranker (23/query cho phần lớn mẫu).- Loss listwise: positive ở vị trí 0, negatives là các lựa chọn còn lại (InfoNCE, không dùng in-batch negative).
eval.json — schema mỗi record
{"id": "11075", "question": "Người đi xe máy đâm vào xe ôtô...", "positive": {"id": 56886, "text": "Luật quy định về giao thông..."}}Query eval chỉ có ground-truth positive; ứng viên để rerank được sinh riêng bằng bi-encoder (top-100), xem repo GitHub.
Thống kê train.jsonl
Cách nạp
from datasets import load_dataset
train = load_dataset("hoailebads/VLSP-Legal-Reranker-Train", "train", split="train")
eval_ = load_dataset("hoailebads/VLSP-Legal-Reranker-Train", "eval", split="train")
print(train[0]["question"], train[0]["positive"]["id"], len(train[0]["negatives"]))Giới hạn
- Miền hẹp: điều luật tiếng Việt (VLSP + Zalo legal). Không dùng cho miền khác mà không re-mine hard negative.
- 55% mẫu train là
synthetic(câu hỏi sinh tự động) — xem thảo luận về overfit/nhãn trong `results/` của repo. - Hard negative là teacher-mined, có thể chứa false negative (điều luật thực ra liên quan).
License
Apache-2.0. Văn bản luật gốc thuộc phạm vi công (VLSP / Zalo legal corpus).
