← work
data · 2026 — present

Zoning-compliance RAG / GraphRAG

Scrapers feed a chatbot answering US city zoning ordinance questions. RAG over text, GraphRAG over overlay districts and amendment chains. Citation verifier checks generated section numbers against source PDFs.

roleQA Data Engineer at AIAEC
timespan2026 — present
stackpythonraggraphragclaude-apikafkaairflow
statusoperational

Problem

US zoning ordinances are dense, jurisdiction-specific legal documents. A compliance professional checking whether a proposed development satisfies local rules needs answers like "Does section 4.3 of the Riverside overlay district modify the setback requirements from the parent R-2 zone?" — a question that requires navigating overlapping, cross-referenced regulatory text.

Retrieval architecture

Two complementary retrieval layers:

RAG over document text

Standard dense retrieval over chunked PDF text. Docling handles layout-aware extraction, preserving section hierarchy, table structure, and footnotes. Chunks are embedded and stored for semantic search.

GraphRAG over zoning relationships

Zoning ordinances have explicit graph structure: overlay districts that modify parent zones, amendment chains, cross-references between sections. A small graph index captures:

The GraphRAG retriever traverses this graph at query time, surfacing structurally related sections that semantic search alone would miss.

Citation verifier

The most operationally important component. After the Claude API generates an answer, a verifier:

  1. Extracts cited section numbers from the response
  2. Looks up each citation in the source PDF (by page and bbox from Docling extraction)
  3. Checks that the cited text supports the generated claim
  4. Flags hallucinated or drifted citations in the QA Dashboard

The ChatAEC dashboard surfaces these flags in < 2s p95.

Infrastructure