CoolFace
Datasetpublic

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.

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes61downloads
Dataset Card

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:

📦 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

FileSplitSố dòngĐịnh dạngMô tả
train.jsonltrain9,994JSONLmỗi dòng = 1 query + 1 positive + tối đa 23 hard negative
eval.jsoneval296JSON arrayquery + 1 positive (dedup theo aid còn 219 query unique)

train.jsonl — schema mỗi dòng

json
{
  "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"
}
  • positiveđiều luật đúng (index 0 khi train listwise).
  • negativeshard 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

json
{"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

Thuộc tínhGiá trị
Tổng số mẫu9,994
Nguồn (_source)synthetic 5,530 · zalo 2,477 · vlsp 1,987
Nguồn negative (_neg_source)teacher_aiteamvn_v3 (toàn bộ)
Số negative/mẫu23 (9,051 mẫu) · 19 (59) · các mức thấp hơn cho phần còn lại

Cách nạp

python
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).