Scientific Journal of Computer Science
Vol. 2 No. 1 (2026): June Article in Process

A Self-Reflection Mechanism for Reducing Hallucination in Vietnamese Legal Question Answering Systems

Pham, Thi Vuong (Unknown)
Phan, Nguyet Minh (Unknown)
Cao, Bao Quynh (Unknown)
Truong, Cong Phuc (Unknown)
Nguyen, Thanh Duy (Unknown)
Tien, Minh Vy (Unknown)
Nguyen, Ngoc Son (Unknown)



Article Info

Publish Date
02 Mar 2026

Abstract

Legal question answering is essential for compliance, dispute resolution, and everyday HR decision-making, yet large language models may produce persuasive but incorrect legal statements when supporting evidence is incomplete. While Retrieval-Augmented Generation and graph-based retrieval can ground responses in statutes and structured relations, Vietnamese legal QA often lacks an explicit, automated quality-control step that scores an answer, decides whether it should be refined, and checks that citations are actually supported. In this paper, we propose a self-reflection mechanism that adds an iterative generate–evaluate–refine loop to a Graph-RAG pipeline for Vietnamese labor-law questions. Each draft is evaluated with a hybrid score that combines how closely the answer matches retrieved legal context with a model-derived confidence estimate, and the system iterates until it reaches a quality threshold or a stopping limit. On a Vietnamese Labor Law benchmark, the approach improves accuracy from 81.5% to 86.7% and reduces hallucination from 18.7% to 9.3%, with only a modest increase in end-to-end latency in typical use. We also examine component contributions and remaining failure cases, finding that pairing contextual alignment with confidence produces more stable answers than relying on a single signal. These results indicate that self-reflection can serve as a lightweight, deployment-friendly safety layer for high-stakes legal QA without requiring additional labeled data or model fine-tuning, and it can be adapted to other Vietnamese legal domains that demand transparent, article- and clause-level evidence.

Copyrights © 2026






Journal Info

Abbrev

sjcs

Publisher

Subject

Computer Science & IT

Description

The Scientific Journal of Computer Science (SJCS) (e-ISSN: 3110-3170) is a peer-reviewed and open-access scientific journal, managed and published by PT. Teknologi Futuristik Indonesia in collaboration with Universitas Qamarul Huda Badaruddin Bagu and Peneliti Teknologi Teknik Indonesia. The SJCS ...