TL;DR
Researchers have transformed Vietnam's largest legal Q&A corpus from a collection of ambiguous text strings into a massive, verifiable knowledge graph of 11.5 million nodes. By grounding "free-text" citations in specific, dated law versions, they discovered that over a third of published legal answers now cite laws that are no longer in force.
What Problem Does This Paper Address?
Legal advice is only as reliable as the statute it rests upon. In Vietnam, the largest open legal portal pairs over 100,000 questions with answers that cite nearly 600,000 documents. However, these citations are often "free text"—phrases like "Clause 3, Article 101 of this Code" are common.
The problem? They don't specify which version of the code. Laws are frequently updated, repealed, or replaced. An answer written in 2016 might cite an article number that exists in 2024 but carries a completely different meaning. For both human readers and AI retrieval systems, this ambiguity makes it impossible to verify if a legal answer is still "correct" or which specific provision actually grounds the advice.
Methods
The authors employed the NVIDIA Auto Ontology framework, a five-stage pipeline to turn messy, flat data into a structured knowledge graph:
- Discover: Profiling the raw datasets to find candidate keys and join paths.
- Ground: Mapping citations to a formal ontology. They distinguish between a
LegalWork(the abstract law) and aLegalDocument(a specific record/version). - Validate: This is the "aha" step. They don't just link a citation; they verify it. Using word 5-gram containment, they check if the answer actually quotes the law's text word-for-word.
- Expose: Serving the graph via a Model Context Protocol (MCP) for AI agents, a CLI for analysts, and a REST API.
- Learn: Creating a feedback loop where failed resolutions become "proposals" for human editors to review.
The ontology itself (Figure 3) is highly granular, parsing legal text down to the "Point" level (the smallest subdivision of a Vietnamese law) and aligning with international standards like Akoma Ntoso and ELI.
Datasets
The study utilized four open datasets drawn from thuvienphapluat.vn:
- vbpl: 573,851 legal documents.
- hdpl: 109,543 legal Q&A pairs.
- tnpl: 17,091 legal terms and their definitions.
- htpl: 681 legal-assistance articles.
Key Insights and Ideas
- The Identity Crisis of Document Numbers: In Vietnam, document numbers are not unique identifiers. The authors found that over 5,500 document numbers are shared by multiple local authorities. One specific number was used by 72 different provinces for entirely different decisions.
- Semantic Drift in Article Numbers: When a law is replaced, article numbers often stay the same but their content "moves." In the Labor Code, "Annual Leave" moved from Article 111 (2012 version) to Article 113 (2019 version). Meanwhile, Article 111 in the new code now refers to "Weekly Breaks." Without version-aware grounding, a reader would be led to the wrong rule.
- Text Evidence Trumps Dates: While publication dates usually signal which law version was in force, the authors found 2,520 cases where the words used in the answer matched a different version of the law than the date suggested. Their system "re-versions" these citations based on textual evidence.
Key Results
The resulting graph contains 11.5 million nodes and 16 million edges.
- Resolution Success: Of 67,868 cited provisions, 91% were successfully resolved to a specific, dated law version.
- Context Recovery: 92% of citations that named no law at all (e.g., "this code") were recovered by analyzing the surrounding text.
- The "Outdated" Problem: The graph revealed that 36% of resolved answers now cite a law that is no longer in force.
- Word-for-Word Confirmation: 19,012 citations were confirmed to be verbatim quotes from the law.
Limitations and Future Work
- Snapshot Limitation: The graph is based on a dataset snapshot. It does not currently sync in real-time with the official government gazette.
- Lexical vs. Semantic Validation: The "Validate" step confirms quotation, not interpretation. An answer could quote a law correctly but apply it to the wrong situation—a nuance the current system doesn't catch.
- Parsing Gaps: Some older legal records have "parse gaps" where certain articles are missing from the digitized text, leading to unresolved citations.
- Future Direction: The authors suggest this graph could serve as a "ground truth" layer for Retrieval-Augmented Generation (RAG) systems, ensuring that AI-generated legal advice is actually based on current, valid statutes.
Summary updated