Paper commentary
Vietnamese Legal Ontology: Every legal answer, traced to the article that grounds it
Graph links every Vietnamese legal answer to the exact article it quotes
- Problem Legal answers cite laws as free text, so readers cannot tell which law version or article grounds them. Citations name an article without naming the code, and a reader cannot check whether it is still in force.
- Method The authors turn each citation into a typed edge to one provision of one dated law version. They first resolve the law and version, then the article path, then check whether the answer quotes the provision's words.
- Results Of 78,361 answers with resolved citations, 36% cite a law that is no longer in force. Only 19,012 of 67,868 cited provisions are confirmed word for word.
Why citations in legal answers can't be checked
A legal answer's citation is a plain string, so a reader can't tell which provision the answer rests on. The four open datasets hold 573,851 legal documents and 109,543 questions with answers, all drawn from thuvienphapluat.vn. Their links are strings, so a citation names an article without saying which law or which version of that law is meant.
An answer may write “Điều 35 Bộ luật Lao động” without naming the Labor Code it means. It may also cite “Bộ luật này” and leave the reader to find its antecedent.
Take one 2024 question about resigning, whose published answer cites seven sources. Only point d of Article 35(1) in the 2019 Labor Code, Law 45/2019/QH14, is quoted word for word. The sixth is a decree cited as a whole, so a reader can't separate the grounding source from the rest.
The difficulty lies less in one answer than in how legal knowledge is linked. Profiling the four datasets found 98 columns, 11 candidate keys and 7 join paths. Yet no join among the four datasets is clean.
Document numbers also fail as keys, because numbers alone don't identify a work. The authors separate a LegalWork, identified by its number, from a LegalDocument, which is one record of it.
Making each citation a typed, dated edge
The graph turns each citation into a typed edge from an answer to one exact provision of one dated law version. Instead of keeping the citation as a string, the graph names the clause, article or point that the answer means.
The ontology starts by separating a law from its records, because one legal work can have several records. Numbers alone don't serve as keys, because 231,510 local documents become unique only once the issuing authority is added. The ontology also models structure separately from metadata: every text is parsed into Chương, Mục, Điều, Khoản and Điểm.
The graph forms 336 version families, and 102 of them have more than one version. Repeals come from sentences in which a law declares another expired, repealed or replaced, and they are kept only when rank and metadata agree. Of these repeals, 30,618 whole repeals are kept and 1,061 are rejected. Each edge also records its method, source record and status, in the spirit of PROV-O.
Of 15,958,034 edges, 15,612,341 are validated, while 302,211 are candidates awaiting review.
From citation string to validated edge
Validation turns a citation into an edge only after three questions are answered: which law, which version and which provision. Only then does the pipeline ask whether the answer uses the provision's words. Only 19,219 citations name their law, so 48,649 citations depend on the resolver's reading of context. It can also fall back on the only law the answer cites, or on the question itself.
The resolver recovers 44,926 of 48,649 (92%) of these, and 24,651 of them come through anaphora.
If none of these applies, the only version is taken, and these rules settle 27,032, 199, 25,551 and 6,185 citations respectively. That rule re-versioned 2,520 citations, which Section 7.3 examines. In the running example, the answer's phrase “khoản 3 Điều 101 của Bộ luật này” points back to the Labor Code 2019 mentioned 145 characters earlier.
The citation therefore resolves to Clause 3 of Article 101 of Law 45/2019/QH14, and the answer quotes its text in full with a match of 1.00.
Once the law and version are fixed, the Điều, Khoản and Điểm path is looked up in that version's parsed hierarchy. This lookup finds 51,694 citations. It fails for 5,683 citations, which name an article absent from that version, and for 4,110, which point to a version with no parsed structure. The last step measures how much of the provision's text appears in the answer as word 5-grams.
A score of 0.5 or more validates the edge, and 19,012 citations reach that bar, 28% of all cited provisions. Anything lower stays a structural link that is labelled and queued, so it is never silently promoted.

Fig. 1 . One answer, traced through the graph. Q&A #138008514 asks how much notice an employee must give before resigning in 2024. Around it, the graph holds 229 nodes and 454 edges of 12 classes: the answer and the 7 sources it cites, the parsed chapters, articles, clauses and points of the 2019 Labor Code, the terms the question mentions, and 43 other questions that cite the same code. The dark path is the only citation the answer quotes word for word: point d of Article 35(1).
Original paper · CC BY 4.0 · Khac-Hoai Nam Bui, Quan Tran Minh · Vietnamese Legal Ontology: Every legal answer, traced to the article that grounds it · Original paper figure · Extracted the figure area from page 1 of the original PDF.The word check runs last because a provision can exist in the right version and still not be quoted. Five of the seven sources in the introduction's answer are related articles whose text the answer doesn't use, and the graph keeps them as structural links. On the introduction's question, point d of Article 35(1) appears word for word, and the graph validates it.
The graph also runs its integrity checks over all 15,958,034 typed edges, finding 0 dangling edges and 0 domain or range violations. The method has limits: word 5-gram containment confirms quotation, not interpretation, so a correct paraphrase stays structural.
Which links survive the word check
Validation runs its last test on 67,868 cited provisions, and 19,012 of them pass it. Of the 67,868 cited provisions, 61,487 get a resolved law and version. Of those, 51,694 are found in the parsed law, and 32,682 are only structure, with no quoted words. The 19,012 confirmed citations make up 28% of all cited provisions. Each bar in Fig.
4 is what survives a step, and the hatched blocks show what drops out and why.

Fig. 4 . From 67,868 cited provisions to 19,012 confirmed by their words. Each bar is what survives a step; hatched blocks are what drops out, and why. Most citations name no law at all; 92% of those are recovered from their context before a version is chosen.
Original paper · CC BY 4.0The check measures quotation, not reading, so a validated edge means the answer's words are present. A correct paraphrase stays a structural link, while a quotation used out of context would still pass. The 19,012 citations reach a match of 0.5 and are validated. The remaining citations are kept as structural links, labelled and queued, and they are never silently promoted.
Every check over the whole graph passes, and the authors report zero duplicate node keys and zero dangling edges. The graph also shows zero domain or range violations among 15,958,034 typed edges. Every node and edge also carries provenance, with zero nodes or edges without it. These structural checks test the graph's shape, and they don't test whether each legal reading is right.
The notice-period answer shows what a validated edge looks like in practice. Point d of Article 35(1) appears in the answer word for word, so it is the one quoted provision. The answer also cites Decree 145/2020/NĐ-CP as a whole, which stays outside the word check. The command vnkg trace a:138008514 prints the chain of that answer as 43 provenance hops.
Answers that cite replaced laws
Answers age because the law they quote keeps changing after publication.

Fig. 13 . A third of the answers now cite a law that is no longer in force. Left: share of answers citing at least one such law, by year of publication; light, the law was in force at publication and was replaced later; dark, every such law was already out of force at publication. Years with fewer than 100 answers are omitted. Right: one of them, drawn like
Original paper · CC BY 4.0Answer #138009981, published on 1 Jan 2025, shows the difference that a dated version makes. It quotes Article 34 of Law 58/2014/QH13 word for word, with a match of 1.00. That law was in force on the day, but Law 41/2024/QH15 replaced it on 01/07/2025. The authors argue that only the version graph can tell an answer that was right when written from one that is out of date now.
The graph breaks the share down law by law, and the pattern holds in every family. The share naming a replaced or not-yet-in-force version runs from 0.4% for Law on Housing to 16% for Law on Corporate Income Tax.
Article numbers keep their names but change rules
Of 178 numbers that appear in both parsed Labor Codes, 155, or 87%, share less than a quarter of their word 3-grams. The authors measure this overlap with Jaccard similarity, and they count a pair as changed when the score falls below 0.25.
The rest-time chapter shows the mechanism most clearly. Annual leave sat at Article 111 in the 2012 code and moved to Article 113 in 2019. Article 111 now governs weekly breaks, and Article 112 now governs public holidays. Answers followed the new numbering, so 161, 319 and 126 answers cite 2019 Articles 111, 112 and 113. The same numbers drew only 20, 11 and 2 citations under the 2012 code.
Someone checking an old answer against today's code would land on a different rule.

Fig. 15 . Same number, different rule. Articles of the 2012 Labor Code (left) and the 2019 Labor Code (right) in the rest-time chapter, aligned by number; lines join articles with the same title or similar text. Annual leave moved from Article 111 to Article 113, and Article 111 now governs weekly breaks; the numbers at the outer edges count the answers that cite each article.
Original paper · CC BY 4.0The problem extends beyond one code. For 1,287 of them, the article doesn't exist at all in the latest version. The authors list the laws most affected in Table 7.
The 2012 Labor Code record parses into 186 of its 242 articles, so the comparison stays inside articles parsed in both codes. Fig. 15 therefore covers only the rest-time articles that both parsed codes contain.
When the words choose the version
Dates tell a reader little about which version a writer had in mind, so the graph lets the answer's words decide. Those rules settle 27,032, 199, 25,551 and 6,185 citations respectively. Only after this date-based chain does the text test come into play.
The authors test this rule on an answer about summer breaks for primary school teachers, written on 4 Jun 2024. The authors read the question as one about annual leave, so the answer quotes the repealed code's article verbatim.
Text evidence re-versions 2,520 citations in 2,013 answers, in both directions. The rule also catches 116 answers that resolve to the 2019 Labor Code by date but quote the repealed 2012 code.
These re-versioned citations feed the learning loop, which turns them into resolver rules. The 2,520 text-evidence version fixes become resolver rules, so the next build applies them automatically.
Where the checks stop
Lexical verification shows only that a quotation is present in the answer, not what the quotation means. A correct paraphrase therefore stays a structural link, and the authors don't count it as verified. A quotation used out of context would still pass the word check. In-force status follows the dataset's status metadata and the repeal sentences the authors extract from the text.
They don't check in-force status against the official gazette.
Only 186 of the 242 articles in the 2012 Labor Code parse, and numbers 118 to 132 and 194 to 234 are missing. So Fig. 15 keeps its rest-time comparison inside articles parsed in both codes. For the 2019 Labor Code, the metadata lists 34 articles while the parsed text has 220. Counts therefore depend on the parsing, and the authors flag this as a limit of their own pipeline.
The cards in Fig. 7 and Fig. 8 show one recent answer per verdict, chosen by hand rather than sampled at random. The twelve laws in Fig. 12 and Fig. 6 were picked for having the most text-verified answers.
Citations to placeholder versions without a resolved number stay out of the lanes. Two issuer names that the source records truncate appear in full in Fig. 10. The authors machine-assist the English for Q&A titles and for two 2012 article titles.
All counts in the paper refer to the one dataset snapshot the authors used. The authors model the htpl records as assistance articles with intents, not as dialogues. They didn't deploy the NVIDIA Auto Ontology service. Instead, their own implementation of its interfaces evaluated the Table 2 calls over this graph.
Paper info
- Authors
- Khac-Hoai Nam Bui, Quan Tran Minh
- Venue
- arXiv · Preprint
- First published
- 2026-11-8
- Added
- 2026-11-10
- Updated
- 2026-11-8
- Version
- v1
- arXiv
- 2611.11426
- Category
- cs.CL · cs.AI
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
A legal answer is only as good as the article it rests on. Vietnam's largest open legal corpus pairs 109,543 published questions and answers with 573,851 legal documents, yet its citations are free text: "Khoan 3 Dieu 101 cua Bo luat nay" ("Clause 3, Article 101 of this Code") names neither the code nor its version. Following the five stages of NVIDIA Auto Ontology, Discover, Ground, Validate, Expose and Learn, we turn four open datasets into a knowledge graph of 11.5 M nodes and 16.0 M edges in which every node and edge carries its source record and method, with no duplicate keys, dangling edges or schema violations. Of 67,868 cited provisions, 61,487 resolve to a dated law version, 51,694 to a parsed article, clause or point, and 19,012 are confirmed word for word. The ontology then shows what flat records hide. 36% of the 78,361 answers whose citations resolve now cite a law that is no longer in force; 2,525 verified citations point to an article number that says something else in the current law; 2,520 citations were re-versioned because their words match a different version than their date suggests; and 5,575 document numbers are shared by several local authorities, one of them by 72. Every number in this paper is computed from the graph.
Quote from the paper
Khac-Hoai Nam Bui, Quan Tran Minh (2026). Vietnamese Legal Ontology: Every legal answer, traced to the article that grounds it. arXiv:2611.11426v1. https://arxiv.org/abs/2611.11426v1
BibTeX
@misc{bui2026vietnamese,
title = {{Vietnamese Legal Ontology: Every legal answer, traced to the article that grounds it}},
author = {Khac-Hoai Nam Bui and Quan Tran Minh},
year = {2026},
eprint = {2611.11426},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.11426v1}
}