A Retrieval-Augmented Generation Chatbot for Accessible, Hallucination-Resistant Access to the Constitution of Nepal
DOI:
https://doi.org/10.65091/icicset.v3i1.93Abstract
The constitution and laws of Nepal remain limited
to static PDF documents, leaving users to interpret dense legal
language largely unaided. This paper presents ArticleWise,
a retrieval-augmented generation (RAG) system for question
answering over the Constitution of Nepal (2015/2072) that is
designed to be accessible and hallucination-resistant. The system
combines a deterministic citation router that provides O(1)
lookup of statutes with a dense semantic search pipeline: the
full set of 308 numbered constitutional provisions was extracted
through layout-aware parsing, represented in a 1024-dimensional
semantic space with multilingual-e5-large and asymmetric task
prefixes, and indexed in PostgreSQL with pgvector using an exact
flat nearest-neighbor scan. The top-ranked article is supplied
to Google Gemini 3.5 Flash-Lite for a succinct, plain-language
explanation generated under closed-domain prompting, while
the statutory text itself is always returned verbatim from an
immutable database record and never passed through the generative
model. On a stratified benchmark of N = 50 questions
spanning paraphrases, citizen phrasing, underspecified keywords,
and multi-article workflow queries, the system achieves Top-1
retrieval accuracy of 62.0% (95% CI 48.2–74.1%) and Top-3
accuracy of 84.0% (95% CI 71.5–91.7%), with median retrievalonly
latency of 72.2 ms and average end-to-end latency of
372.5 ms. A faithfulness evaluation shows a 0.0% hallucination
rate relative to whatever article is retrieved, with unanimous
inter-annotator agreement — a result that speaks to the fidelity of
the explanation step but not to the correctness of article selection,
a distinction we treat as a first-class limitation of the system
rather than a footnote to the headline result