municiPal AI
AI-powered search that answers residents' questions from a city's own website, bylaws, and council records — grounded only in approved municipal sources.
A multi-tenant RAG platform that lets municipal websites answer resident questions instantly from crawled city content, bylaws, and council agendas/minutes — with cited, plain-language answers and strict content guardrails. Live across Canadian municipalities including Kitchener and Kawartha Lakes.
Context & challenge
Residents can't find what they need on large municipal websites, and the most important civic information — what council actually decided — is locked inside PDF agendas and minutes. Staff field the same repetitive questions by phone and email, while generic chatbots hallucinate answers no government can stand behind.
What we delivered
We built the two-part system behind the product. (1) A scheduled, tenant-scoped ingestion pipeline discovers sitemaps, crawls pages with WAF/Cloudflare-resistant headers, backoff, and browser fallback, runs a four-layer soft-404/content-quality validation stage, chunks markdown by heading, hashes content for change tracking, and dumps 1024-dim BGE-large embeddings into per-tenant Pinecone namespaces; eScribe council agendas/minutes are ingested with agenda/minutes metadata. (2) A streaming RAG API where an LLM query router (RunnableBranch over LCEL) classifies each query — with a dedicated council-meetings sub-classifier — and dispatches to semantic retrieval (Pinecone with metadata filters + full-document reassembly), a MongoDB structured fallback, or Exa/Google/Vertex web search. A runtime fallback manager wraps every LLM call in a three-provider chain with a circuit breaker, and automatic PII detection runs before anything reaches a model — supporting the product's PIPEDA / MFIPPA / WCAG 2.2 AA posture.
Project overview
municiPal AI is an AI-powered search platform built specifically for local government. Our team engineered the retrieval backend and ingestion pipeline: a tenant-aware async crawler (crawl4ai, Playwright, aiohttp) that ingests, cleans, and validates municipal websites, bylaws, and eScribe council agendas/minutes into MongoDB and Pinecone, paired with a FastAPI + LangChain (LCEL) RAG service that routes each question to semantic, structured, or web search. Every answer is grounded strictly in the municipality's approved content, reranked with BM25 + FlashRank, PII-anonymized, and streamed token-by-token over SSE with source citations. The platform is fully multi-tenant — each municipality gets an isolated Pinecone namespace, its own feature flags, prompts, and credentials — and is deployed in production for Canadian municipalities such as Kitchener, Kawartha Lakes, Leamington, and Sechelt.
Outcome
Cities get an assistant that answers only from their own content, with citations staff can verify — removing the hallucination risk that blocks most government chatbot adoption. Residents self-serve against both the live website and historical council decisions, call volume on routine questions drops, and onboarding a new municipality is a configuration exercise (namespace, feature flags, sitemaps) rather than a rebuild. The platform earned national media coverage (CBC, CityNews) for the municipalities that launched it.
Results
"Deployed in production for Canadian municipalities including the City of Kitchener
City of Kawartha Lakes
Municipality of Leamington
and District of Sechelt"
"Powers resident website search featured in national coverage by CBC and CityNews"
"99.9% uptime target backed by three-tier LLM failover (OpenAI
Gemini
Claude) with circuit breaking"
"Sub-second semantic retrieval over tenant-isolated Pinecone namespaces using 1024-dimension embeddings"
"Cut routine resident call and email volume by an estimated 35% through accurate self-service answers"
"Answers grounded only in approved municipal sources with automatic PII detection
meeting PIPEDA / MFIPPA / WCAG 2.2 AA standards"
Have a project like this in mind?
Tell us the problem — we'll show you a working product before you commit.