Work
AI / RAGSemantic searchSecurity2025

DOGEPLOT

A US Congress bill tracker with an AI "Policy Lens of Truth" — ask in plain English and get an answer grounded in the real bills, every claim citing the bill it came from. 17,000+ bills, auto-synced daily.

Visit dogeplot.com

The problem

Congressional bills are long, dense, and slow to make sense of. Keyword search misses anything phrased differently, and there's no fast way to track a bill from Introduced to Law, understand what it actually does, or find related bills by meaning — grounded in the real text rather than an AI's guess.

What I built

  • Grounded RAG, not a chatbot that guesses — pgvector semantic search retrieves the most relevant bills and feeds them to an LLM that answers in plain English and cites every bill it used. The vector query stays index-friendly (ORDER BY embedding <=> q) so search stays fast as the corpus grows.
  • Every one of 17,000+ bills gets its own page, SEO-rendered at the Cloudflare edge via HTMLRewriter — a per-bill title/meta, JSON-LD (schema.org Legislation) and a paginated sitemap — so a Google search for a bill lands straight on it.
  • Hardened the data layer: Postgres RLS deny-by-default, closed an exec_sql arbitrary-SQL path that an anonymous key could have used to take over the database, and locked down the embeddings table.
  • Built so it can't be botted into a big bill — the LLM key lives in a private edge "ask-worker" behind per-IP rate limits and a hard daily AI-spend cap, with an SSRF-hardened proxy for outbound fetches.
  • Zero-server data pipeline: a GitHub Actions cron auto-syncs new bills daily (sync → extract → embed → analyze), so the corpus stays current with no box to babysit.

A look inside

dogeplot.com — plain-English ask bar and the live bill feed
The home feed — ask anything in plain English or browse by policy area; 17,000+ bills tracked from Introduced to Law, auto-synced daily.
The Policy Lens of Truth — an AI answer with a citation for every bill
The Policy Lens of Truth — ask a question, get a plain-English answer grounded in real bills, with a citation chip for every bill it drew from.
A per-bill page — policy subjects, full text, sponsor and status journey
Every bill gets its own edge-rendered page — policy subjects, official text, sponsor and a status journey — with per-bill SEO title/meta injected at the Cloudflare edge.

The result

Live at dogeplot.com (v2.1.0) — 17,000+ US congressional bills with plain-English cited answers, per-bill SEO pages and a daily auto-sync, all on Supabase + Cloudflare Workers at the edge. A Swiss edition is planned next — the same tool for Swiss federal bills (parlament.ch + Fedlex, in DE/FR/IT/EN) — extending it into a two-country legislative-transparency mission.

Built with

React 18 + TypeScriptViteTailwind + Radix UISupabase (Postgres + pgvector)Cloudflare Workers (edge SEO + ask-worker)OpenRouter (LLM)RAG (retrieval-augmented generation)GitHub Actions (daily sync)Congress.gov API