Methodology
This page records the models, clustering rules, sampling policy, snapshot rules, and evaluation checks behind every Pollocracy position map.
Clustering method and model versions
Comments are grouped by position (what commenters want the agency to do and why), not by topic, tone, or sentiment. Deduplication runs first in deterministic code: exact duplicates and template form letters collapse to one distinct text carrying its exact multiplicity weight, while form letters carrying meaningful personal additions stay separate distinct texts.
Each distinct text is embedded once into a unit-normalized 768-dimension vector using gemini-embedding-2. Seeded Lloyd k-means (k-means++, n_init=10) runs across seeds 11, 23, 37, 53, 71 for k from 4 to 7, selecting k by mean cross-seed Adjusted Rand Index stability. Cluster labels come from gemini-4-hydrogen with comment bodies enclosed in untrusted delimiters. Two-dimensional coordinates use pca_2d_display_only for layout only.
Sampling and thin-map policy
Launch dockets use no most-recent cap and no random sampling. Ingestion runs incrementally across modification windows until the full posted record is stored. Closed archive dockets may load from a verified bulk download taken outside the app.
An “Early map” warning displays and percentages are suppressed when posted comments are below 100 or distinct texts are below 50. When distinct texts fall below a docket's sparse-record threshold, Pollocracy renders a plain table of the record instead of a cluster map.
Snapshot policy and citability
Every map is a frozen snapshot with a permanent ID, UTC timestamp, posted count, distinct text count, and method version. Before a snapshot publishes, an independent evaluation recomputes all counts from stored raw comments and confirms every representative comment belongs to its shown cluster. Re-clustering creates a new snapshot rather than editing an old one.
Movement-statistic definitions
Draft revision metrics stay separated into two layers. Both layers report their exact scope and denominator n whenever published:
- Layer 1 (all-session aggregates): computed per docket without storing version text outside session lifetime — share of completed drafts whose final cluster differs from their pre-map cluster, median version count, median time between saves, and edit-suggestion acceptance rate. No movement score is ever shown to a drafter.
- Layer 2 (opt-in research traces): collected only when a drafter checks an unchecked-by-default consent box, storing the version chain, cluster assignments, timestamps, and suggestion accept/reject log under an unlinked random research ID.
Methods changelog
Initial launch clustering and snapshot policy over the full posted rulemaking record.
- Deterministic exact and (1,2)-gram cosine near-duplicate deduplication (threshold 0.88, length ratio 0.80, extra-word limit 8) preserving template-plus-addition comments as distinct texts.
- Unit-normalized gemini-embedding-2 vectors (768 dimensions) clustered with Lloyd k-means (k-means++ init, n_init 10) across seeds 11, 23, 37, 53, and 71, picking k in 4..7 by cross-seed Adjusted Rand Index stability.
- 2D display coordinates use pca_2d_display_only. Cluster labels are generated from representative samples with comment text wrapped inside untrusted delimiters.
- Thin-map threshold set to posted comments below 100 or distinct texts below 50, suppressing all percentages when triggered.
Countdown escalation policy
Live docket pages display deadline reminders driven mechanically from each rulemaking's official Eastern Time close timestamp, identically for every docket with no editorial override. Closed archive pages never display a countdown. No seconds appear anywhere, and relative time recomputes at most once per minute.
- T-7 days: banner in the docket header showing the full close date, 11:59pm ET deadline, days left, agency attribution, a 15-minute calendar plan prompt, and draft progress.
- T-3 days: larger sticky banner switching to days and hours, repeating the deadline inline at the comment CTA, noting that filing a day early avoids last-day regulations.gov slowdowns.
- T-24 hours: persistent page-dominant banner switching to hours and minutes, displaying autosave status, a short-comment path, and the direct regulations.gov docket fallback. A conditional arrival-only dialog appears at most once per browser per docket when no draft is open, running as a 50/50 split test against banner-only and marked for removal if it produces no submission lift or lowers next-docket return.
Annotated pipeline walkthrough: Public Charge (USCIS-2010-0012)
The USCIS-2010-0012 (Public Charge, 266,064 posted comments) stage notebooks have not been executed against a cost cap yet, so no Public Charge intermediate artifacts exist in this build.
Below are the real intermediate stage outputs extracted from the executed Phase 2 notebooks on fixture docket BIS-2024-0005 (run through ingest → dedupe → embed → cluster → label → snapshot), alongside the post-close timeline stage.
Stage: ingest (notebooks/01_ingest.ipynb · BIS-2024-0005)
Stage: dedupe (notebooks/02_dedupe.ipynb · BIS-2024-0005)
Stage: embed (notebooks/03_embed.ipynb · BIS-2024-0005)
Stage: cluster (notebooks/04_cluster.ipynb · BIS-2024-0005)
Stage: label (notebooks/05_label.ipynb · BIS-2024-0005)
Stage: snapshot (notebooks/06_snapshot.ipynb · BIS-2024-0005)
Post-close milestones for USCIS-2010-0012 (2019 final rule, 2019 correction, and 2021 court vacatur) appear on the Public Charge archive page.
Research
Site copy on docket pages states measured counts and leaves interpretation separate. Signed research articles and analyses appear under founder Bharat Kusuma (ORCID 0009-0006-4013-9500).
How Pollocracy works
Built on Google Cloud for transparent public-record analysis:
- Ingest public comments from regulations.gov into BigQuery
- Deduplicate exact and near-duplicate texts with deterministic Python code
- Embed distinct texts and cluster them by position with seeded k-means
- Label each cluster with Gemini inside untrusted text delimiters
- Serve static position maps and synopses from Cloud Run, with Firestore holding session state
- Run ADK agents behind engine-enforced human review gates and automated evaluation checks that block publication on failure