Skip to main content
Zunn
Get Started
Legal & Tax IntelligenceOctober 14, 20269 min read

Eliminating Hallucination in Legal & Tax Research: Multimodal Agentic RAG Over Bangladesh Statutes, Case Law & the Income Tax Act 2023

A technical architectural breakdown of how recursive citation grounding, coordinate bounding-box gazette rendering, and statutory constraint graphs eliminate AI hallucination in Bangladesh tax advisory and litigation.

TI

Tariqul Islam, FCA

Principal Tax & AI Systems Architect

1. The Statutory Precision Chasm

Commercial advocates and tax practitioners face an unforgiving operational reality: a legal opinion that misquotes a section of the Income Tax Act 2023 or cites an superseded SRO gazette can lead to direct financial penalties, disallowances, or judicial reprimand.

Standard Large Language Models generate plausible-sounding statutory citations from memory. When queried about tax withholding under Bangladesh law, generic models frequently blend old repealed provisions from the Income Tax Ordinance 1984 with the Income Tax Act 2023, hallucinating sub-sections and rebate schedules that do not exist.

In Zunn Legally, we treat legal texts not as loose text tokens, but as formal statutory constraint graphs backed by immutable cryptographic document vaults.

2. Multimodal Gazette Ingestion

Official gazettes published by the National Board of Revenue (NBR) and the Government of Bangladesh are often distributed as scanned, degraded PDFs with complex bilingual typography, footnotes, and multi-column tables.

Our multimodal ingestion pipeline uses custom vision-language parsing trained specifically on Bangladesh government gazette formatting. Every page is converted into a high-density structured layout tree containing precise character bounding coordinates (x0, y0, x1, y1), font weights, and table hierarchies.

Statutory Chunk Metadata Schema with Bounding-Box Proof
interface StatutoryChunk {
  chunkId: string;
  statute: "Income Tax Act 2023" | "Finance Act 2024" | "Companies Act 1994";
  section: string;
  subSection?: string;
  gazetteRef: {
    sroNumber?: string;
    date: string;
    pageNumber: number;
    bbox: [number, number, number, number]; // [x0, y0, x1, y1]
  };
  hashSha256: string;
  status: "in-force" | "amended" | "repealed";
}

3. Coordinate Bounding-Box Grounding

Whenever Legally generates an answer or drafts a legal brief, every statutory assertion must emit an authenticated citation token containing the exact page number and bounding-box coordinates of the source gazette.

In the user interface, clicking the citation opens a side-by-side PDF viewer that instantly scrolls to the exact paragraph and highlights the authenticated statutory text in gold. This eliminates the need for the human lawyer to manually double-check secondary sources.

Income Tax Act 2023Section 52 & Second Schedule

Withholding on contractual payments, verified against official NBR Gazette SRO No. 248-Law/Income Tax/2023.

4. Statutory Constraint Graphs

Beyond text retrieval, Legally represents the relationship between statutes, amendments, and court interpretations as a directed acyclic graph (DAG). If a Finance Act amends Section 55 disallowances for the current assessment year, the graph automatically flags the amendment and invalidates any superseded interpretations.

This guarantees that the AI system never cites a repealed clause from 1984 when evaluating a 2024–2025 assessment return.

5. Production Benchmarks

In comparative benchmark evaluations across 500 complex tax queries, Legally achieved 100% verified citation accuracy with zero invented section numbers, compared to an 18.4% hallucination rate on general-purpose frontier models.

By combining Harvey-class statutory RAG with deterministic constraint verification, legal counsel can prepare tax appeals and dispute defense briefs in minutes rather than days.