tmquan/thuvienphapluat-vn-hdpl
Hỏi đáp pháp luật Việt Nam — Vietnamese Legal Q&A VI — Bộ dữ liệu 109.543 bài hỏi đáp pháp luật Việt Nam từ thuvienphapluat.vn/hoi-dap-phap-luat: câu hỏi ↔ câu trả lời dài có trích dẫn văn bản, kèm embedding Nemotron-3-Embed-8B và toạ độ giảm chiều trong không gian chung của 6 bộ dữ liệu pháp luật. EN — 109,543 Vietnamese legal question-and-answer articles from thuvienphapluat.vn, each pairing a legal question with a citation-grounded long-form answer, embedded with… See the full description on the dataset page: https://huggingface.co/datasets/tmquan/thuvienphapluat-vn-hdpl.
Hỏi đáp pháp luật Việt Nam — Vietnamese Legal Q&A
VI — Bộ dữ liệu 109.543 bài hỏi đáp pháp luật Việt Nam từ thuvienphapluat.vn/hoi-dap-phap-luat: câu hỏi ↔ câu trả lời dài có trích dẫn văn bản, kèm embedding Nemotron-3-Embed-8B và toạ độ giảm chiều trong không gian chung của 6 bộ dữ liệu pháp luật.
EN — 109,543 Vietnamese legal question-and-answer articles from thuvienphapluat.vn, each pairing a legal question with a citation-grounded long-form answer, embedded with Nemotron-3-Embed-8B and placed into a shared common-corpus t-SNE/UMAP space jointly fit over 6 Vietnamese legal datasets.
3. Overview
This is one of 6 Vietnamese legal datasets published under a single unified standard (documents / embeddings / reduces, plus dataset-specific extras). Each dataset carries its own cleaned content, a single 8B embedding table, and its rows' coordinates in one joint dimensionality-reduction space fit over all 6 corpora together (≈2.33M points, nvidia/Nemotron-3-Embed-8B-BF16, no PCA).
- Domain: Vietnamese legal Q&A (Hỏi đáp pháp luật) — a legal-question knowledge base with long-form, citation-grounded answers.
- Provenance: crawled from the public Hỏi đáp pháp luật section of THƯ VIỆN PHÁP LUẬT (thuvienphapluat.vn).
- Size: 109,543 Q&A · 27 legal areas · 19,219 extracted citations (73.6% of Q&A cite ≥1 law) · avg. answer 4,766 chars · published 2016-08-24 → 2026-08-18.
- Representative vector in the shared corpus: the answer embedding of each Q&A.
4. Configs
5. Schema
`documents` (default) — one row per Q&A:
`embeddings` — Nemotron-3-Embed-8B vectors, keyed by id:
`reduces` — long table of shared common-corpus coordinates:
`pages` (extra) — the raw crawl artifact, kept separate so the crawl itself can be studied:
6. Embeddings
Every question and every answer is embedded with `nvidia/Nemotron-3-Embed-8B-BF16` (4096-d, one vector per field), living in the embeddings config as question_embedding and answer_embedding. The question uses the model's query prompt; the answer is encoded as a passage/document. Content is Vietnamese (`vi`). The answer embedding is this dataset's representative vector in the shared corpus below.
7. Dimensionality reduction — the common corpus
The reduces config is the centrepiece. It holds this dataset's rows' coordinates in one joint t-SNE / UMAP space fit over all 6 Vietnamese legal datasets together (≈2.33M points, nvidia/Nemotron-3-Embed-8B-BF16, no PCA). Because every dataset is embedded and reduced in the same space, coordinates are directly comparable across corpora.
- Long format:
{id, dataset, language, method, dim, coords}— one row per (id × method × dim). - Methods:
tsne,umap· Dims:2,3· All 109,543 documents present in every (method, dim) combination → 438,172 rows. - Shared fit: a single reduction was fit over the concatenation of all 6 datasets' 8B vectors;
dataset/languagetag each point's origin.
red = load_dataset("tmquan/thuvienphapluat-vn-hdpl", "reduces")["train"].to_pandas()
umap2d = red[(red.method == "umap") & (red.dim == 2)] # this dataset's points in the joint UMAP8. Visualizations
The whole common corpus (all 6 datasets) in the shared space:
This dataset on its own (coloured by legal area) — coordinates taken from the shared 6-dataset reduce above (not a per-dataset re-fit), so this map is a zoom onto just this dataset's points within the same joint t-SNE/UMAP space:
Citation Sankey — legal area → most-cited laws:
Areas (Lĩnh vực) — all 27
9. Analysis pointers
The shared coordinates support cross-dataset geometric analysis directly:
- kNN graph over the joint
reduces(or the raw 8B vectors) to find nearest Q&A across all 6 corpora — e.g. link a legal question to statutes, judgments, or terminology entries living in sibling datasets. - Clustering (HDBSCAN / k-means) on the 2-D/3-D coords to surface legal-topic structure, then compare cluster composition by
dataset/area. - Cross-dataset geometry: measure how the Q&A cloud overlaps the legislation / case-law clouds in the shared space (density, boundary regions, bridges) to study coverage and retrieval reach.
10. Usage
import gzip
from datasets import load_dataset
docs = load_dataset("tmquan/thuvienphapluat-vn-hdpl", "documents") # Q&A + metadata (no vectors, no raw page)
emb = load_dataset("tmquan/thuvienphapluat-vn-hdpl", "embeddings") # Nemotron-8B question/answer vectors
red = load_dataset("tmquan/thuvienphapluat-vn-hdpl", "reduces") # shared common-corpus 2D/3D t-SNE/UMAP coords
pages = load_dataset("tmquan/thuvienphapluat-vn-hdpl", "pages") # raw gzipped crawl HTML, keyed by id
html = gzip.decompress(pages["train"][0]["page_html_gz"]).decode("utf-8") # raw source HTML (gzip bytes)Join all configs on id.
11. Provenance & crawl
Content was crawled from the public Hỏi đáp pháp luật section of THƯ VIỆN PHÁP LUẬT (thuvienphapluat.vn) for research. The clean documents table (question, answer, parsed citations, area, metadata) is derived from the raw source pages preserved byte-for-byte in the `pages` extra config (gzipped HTML, keyed by id) so the full extraction pipeline is reproducible. Embeddings and shared-corpus coordinates were computed downstream with nvidia/Nemotron-3-Embed-8B-BF16.
12. License & citation
License: other — content © thuvienphapluat.vn, redistributed for research. This is informational legal material and is not legal advice; answers reflect the law as published at crawl time.
@misc{tvpl_hdpl_2026,
title = {Hỏi đáp pháp luật Việt Nam — Vietnamese Legal Q&A (thuvienphapluat.vn)},
author = {TMQuan},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/tmquan/thuvienphapluat-vn-hdpl}},
note = {109,543 Vietnamese legal Q&A with parsed citations, Nemotron-3-Embed-8B question/answer embeddings, and shared common-corpus 2D/3D t-SNE/UMAP coordinates jointly fit over 6 Vietnamese legal datasets.}
}
@misc{tvpl_hdpl_source_2026,
title = {Hỏi đáp pháp luật — THƯ VIỆN PHÁP LUẬT},
author = {{Hỏi đáp pháp luật — THƯ VIỆN PHÁP LUẬT}},
year = {2026},
howpublished = {\url{https://thuvienphapluat.vn/hoi-dap-phap-luat}},
note = {Official Vietnamese legal question-and-answer knowledge base published by THƯ VIỆN PHÁP LUẬT (thuvienphapluat.vn).}
}