Pollocracy

Methods, models, and verification

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

v1.0-kmeans-full-record ·

Initial launch clustering and snapshot policy over the full posted rulemaking record.

Embedding: gemini-embedding-2 (768d) · Labeling: gemini-4-hydrogen

  • 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)
Docket: BIS-2024-0005 | Project: cs-poc-nmcdeabvxywsrog1t2qnoms | Dataset: pollocracy_us
Using persisted comments_raw artifact: comments_raw_BIS-2024-0005_2b3872602e1a
docket_id agency country    source_system  \
0  BIS-2024-0005    BIS      US  regulations.gov   

                           raw_artifact_id  stored_raw_comments  \
0  comments_raw_BIS-2024-0005_2b3872602e1a                  156   

   artifact_record_count  is_complete  null_jurisdiction_rows  
0                    156         True                       0
Total raw rows loaded from BigQuery comments_raw: 156
comment_id               posted_date  \
0  BIS-2024-0005-0002 2024-03-05 05:00:00+00:00   
1  BIS-2024-0005-0003 2024-03-05 05:00:00+00:00   
2  BIS-2024-0005-0004 2024-03-25 04:00:00+00:00   
3  BIS-2024-0005-0005 2024-04-23 04:00:00+00:00   
4  BIS-2024-0005-0006 2024-04-29 04:00:00+00:00   
5  BIS-2024-0005-0007 2024-04-29 04:00:00+00:00   
6  BIS-2024-0005-0008 2024-04-29 04:00:00+00:00   
7  BIS-2024-0005-0009 2024-04-29 04:00:00+00:00   
8  BIS-2024-0005-0010 2024-04-29 04:00:00+00:00   
9  BIS-2024-0005-0011 2024-04-30 04:00:00+00:00   

                      organization  word_count  has_attachments  \
0                              NaN         219            False   
1                              NaN         538            False   
2               Autonomy Institute         286  
Stage: dedupe (notebooks/02_dedupe.ipynb · BIS-2024-0005)
Docket: BIS-2024-0005 | Project: cs-poc-nmcdeabvxywsrog1t2qnoms | Dataset: pollocracy_us
docket_id                 comments_raw_artifact_id  \
0  BIS-2024-0005  comments_raw_BIS-2024-0005_2b3872602e1a   

                  comments_unique_artifact_id  n_posted  n_distinct_texts  \
0  comments_unique_BIS-2024-0005_a1ae8d60ab81       156                85   

   form_letter_comment_count  form_letter_template_count  \
0                         77                           6   

   personal_addition_count  form_letter_share  cosine_threshold  \
0                        3            0.49359              0.88   

   length_ratio_floor  max_boilerplate_extra_words  \
0                 0.8                            8   

   form_letter_min_multiplicity  
0                             2
Multiplicity distribution:
multiplicity  distinct_texts  posted_comments
3            45               1               45
2            24               1               24
1             2               4                8
0             1              79               79
Top repeated texts (form letters / exact duplicates):
unique_comment_id canonical_comment_id  multiplicity  \
49  BIS-2024-0005::u::aba7a69267dcdef5   BIS-2024-0005-0006            45   
70  BIS-2024-0005::u::dd4ab899cfe2c06d   BIS-2024-0005-0020            24   
10  BIS-2024-0005::u::1531d28a6cc0ea67   BIS-2024-0005-0019             2   
26  BIS-2024-0005::u::526188bf172c838d   BIS-2024-0005-0066             2   
45  BIS-2024-0005::u::a3503b16dc48a6fc   BIS-2024-0005-0033             2   
52  BIS-2024-0005::u::b1bd73591e689024   BIS-2024-0005-0129             2   

    is_form_letter  has_personal_addition  word_count  \
49            True                  False           3   
70            True                  False           2   
10            True                  False           9   
26            True                  False         101
Stage: embed (notebooks/03_embed.ipynb · BIS-2024-0005)
Docket: BIS-2024-0005 | Project: cs-poc-nmcdeabvxywsrog1t2qnoms | Dataset: pollocracy_us
docket_id                 comments_unique_artifact_id  \
0  BIS-2024-0005  comments_unique_BIS-2024-0005_a1ae8d60ab81   

                  embeddings_artifact_id  embedding_model_id  embedding_dim  \
0  embeddings_BIS-2024-0005_7ab6e5dbe790  gemini-embedding-2            768   

   total_distinct_texts  cached_count  newly_embedded_count  
0                    85            85                     0
unique_comment_id  dim  l2_norm  truncated  \
0  BIS-2024-0005::u::00127589f03abb43  768      1.0      False   
1  BIS-2024-0005::u::009c012155519b07  768      1.0      False   
2  BIS-2024-0005::u::02072b4e177e573d  768      1.0      False   
3  BIS-2024-0005::u::032bcf0fb2452385  768      1.0      False   
4  BIS-2024-0005::u::03baac5e83b85f65  768      1.0      False   
5  BIS-2024-0005::u::0784e5c2c2601b22  768      1.0      False   
6  BIS-2024-0005::u::09c6356a5b53290b  768      1.0      False   
7  BIS-2024-0005::u::0e0a74ae78350fcb  768      1.0      False   
8  BIS-2024-0005::u::1306bc8fbc3b6351  768      1.0      False   
9  BIS-2024-0005::u::131f6bd1a463480b  768      1.0      False   

                                     first_5_coords  
0    [0.01876, -0.00416, -0.00261, 0.03
Stage: cluster (notebooks/04_cluster.ipynb · BIS-2024-0005)
Docket: BIS-2024-0005 | Project: cs-poc-nmcdeabvxywsrog1t2qnoms | Dataset: pollocracy_us
clusters_artifact_id=clusters_snapshot_BIS-2024-0005_03c5074268ed | chosen_k=4 | seeds=(11, 23, 37, 53, 71) | canonical_seed=11 | layout=pca_2d_display_only | pca_var_ratio=(0.179487, 0.101)
Cross-seed stability evaluations (k in 4..7):
k  mean_ari   min_ari   std_ari  silhouette_cosine    inertia
0  4  1.000000  1.000000  0.000000           0.218571  11.192510
1  5  0.827096  0.757746  0.051205           0.190671  10.852738
2  6  0.621036  0.510020  0.093295           0.191500  10.476381
3  7  0.557836  0.488658  0.060753           0.139541  10.173602
Deterministic per-cluster sizes (ordered largest distinct-text cluster first):
cluster_index         cluster_id  distinct_text_count  \
0              0  BIS-2024-0005::c0                   29   
1              1  BIS-2024-0005::c1                   26   
2              2  BIS-2024-0005::c2                   21   
3              3  BIS-2024-0005::c3                    9   

   posted_comment_count  form_letter_comment_count  \
0                    30                          2   
1                    27                          2   
2                    22                          2   
3                    77                         71   

             medoid_unique_comment_id  centroid_layout_x  centroid_layout_y  
0  BIS-2024-0005::u::2af0c297193e410c           0.101732          -0.103836  
1  BIS-2024-0005::u::1306bc8fbc3b6351          -0.160861          -0.074648
Stage: label (notebooks/05_label.ipynb · BIS-2024-0005)
Docket: BIS-2024-0005 | Project: cs-poc-nmcdeabvxywsrog1t2qnoms | Dataset: pollocracy_us
docket_id                          clusters_artifact_id  \
0  BIS-2024-0005  clusters_snapshot_BIS-2024-0005_03c5074268ed   

            model_id      model_version                  temperature_setting  \
0  gemini-4-hydrogen  gemini-4-hydrogen  provider_default_deprecated_omitted   

                                       prompt_path  \
0  backend/pollocracy/prompts/cluster_label_v1.txt   

                                                      prompt_sha256  \
0  3919fcb8e11a9807ba4538d26306a16c5378940cd89507943c0fb9d59ae39db6   

   total_rejected_candidate_ids  
0                             0
cluster_index         cluster_id  \
0              0  BIS-2024-0005::c0   
1              1  BIS-2024-0005::c1   
2              2  BIS-2024-0005::c2   
3              3  BIS-2024-0005::c3   

                                                                            position_label  \
0                    Please see the attached comments on the Notice of Proposed Rulemaking   
1  Consider attached comments on connected vehicles; clarify 'subject to the jurisdiction'   
2        Address vehicle security and privacy risks without broad supply chain disruptions   
3                                 See attached file(s) and comments; no body text provided   

                                                                                                           neutral_summary  \
0  These s
Stage: snapshot (notebooks/06_snapshot.ipynb · BIS-2024-0005)
Docket: BIS-2024-0005 | Project: cs-poc-nmcdeabvxywsrog1t2qnoms | Dataset: pollocracy_us
snapshot_id      docket_id  n_posted  \
0  map_BIS-2024-0005_2026-11-20T064322Z_fabee423  BIS-2024-0005       156   

   n_distinct_texts  form_letter_comment_count  form_letter_share  \
0                85                         77            0.49359   

   is_thin_map thin_map_label  percentages_suppressed  \
0        False           None                   False   

              more_posted_label                     ingestion_coverage_rule  \
0  0 more posted since this map  full posted record, ingested incrementally   

            method_version  
0  v1.0-kmeans-full-record
Citation line: Pollocracy map, BIS-2024-0005, snapshot 2026-11-20T06:43:22Z, 156 / 85, method v1.0-kmeans-full-record
Independent audit PASSED: raw_table=156, snapshot_posted=156, distinct=85, form_letter_comments=77, dedupe_share=0.49359
cluster_index         cluster_id  \
0              0  BIS-2024-0005::c0   
1              1  BIS-2024-0005::c1   
2              2  BIS-2024-0005::c2   
3              3  BIS-2024-0005::c3   

                                                                            position_label  \
0                    Please see the attached comments on the Notice of Proposed Rulemaking   
1  Consider attached comments on connected vehicles; clarify 'subject to the jurisdiction'   
2        Address vehicle security and privacy risks without broad supply chain disruptions   
3                                 See attached file(s) and comments; no body text provided   

   distinct_text_count  posted_comment_count  form_letter_comment_count  \
0                   29                    30                 
Wrote snapshot JSON to /Users/bkusuma/.gemini/antigravity/brain/fb3336fb-250f-4290-81b6-3e40a8fe6da7/scratch/bis_notebook_snapshot.json

Stage: timeline

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:

  1. Ingest public comments from regulations.gov into BigQuery
  2. Deduplicate exact and near-duplicate texts with deterministic Python code
  3. Embed distinct texts and cluster them by position with seeded k-means
  4. Label each cluster with Gemini inside untrusted text delimiters
  5. Serve static position maps and synopses from Cloud Run, with Firestore holding session state
  6. Run ADK agents behind engine-enforced human review gates and automated evaluation checks that block publication on failure