Submitted:
30 September 2026
Posted:
01 October 2026
You are already at the latest version
Abstract
Large language models (LLMs) hallucinate, limiting their trustworthy use in zero-error-tolerance domains such as law. We present a layout-aware, hybrid retrieval-augmented generation (RAG) system for answering questions over the Turkish Official Gazette, the most binding source in the Turkish legal system. The pipeline uses IBM Docling for hierarchical layout analysis, preserving the article-paragraph-subparagraph hierarchy and table integrity of 30 Official Gazette issues (July 2025), and indexes content in PostgreSQL/pgvector with a local multilingual embedding model combined with a lexical index, keeping retrieval under local data sovereignty; response synthesis is delegated to claude-sonnet-5 under a citation-constrained prompt. On 33 original legal queries, the system answered 17/33 with a 4.2% hallucination rate (groundedness = 0.958), 81.8% citation accuracy, and Hit-Rate@8 = 0.786, versus only 1/33 for a zero-shot baseline. A component ablation (n = 25) showed layout-aware parsing and hybrid retrieval jointly raising Hit-Rate@8 from 61.6% to 100.0% while cutting hallucination from 15.4% to 0.0%. An independent legal-expert review rated 30/33 responses fully correct and all 33 validly cited. These results show that combining local, layout-aware retrieval with cloud-based generation can bring hallucination in Turkish question answering below the 17-33% band reported for leading commercial legal-AI tools.
Keywords:
etrieval-augmented generation
; large language models
; hallucination mitigation
; legal natural language processing
; Turkish Official Gazette
; layout-aware document parsing
; hybrid retrieval
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.