Municipal 311 deduplication. Converts how many people complained into how many problems exist. Toronto 311 open data, 2025.
Not available on this deployment.
This page runs free-text intake: embed, classify into the city's taxonomy, geocode, and run the hybrid duplicate query. This page runs the live system: Postgres 17 with PostGIS and pgvector, and an embedding model. Neither is configured on this deployment.
The three pages that carry the argument, Ward coverage, Concentration and Evidence, are fully live here. Every number on them is read from out/evidence.json, which was produced by running sql/10_evidence.sql against all 500,269 rows of the published file, and each result is stored beside the exact statement that produced it.
These are recordings, not simulations. Each is an actual run of the pipeline against the real database and the real hybrid query, captured on 2026-09-12 and rendered here verbatim. Nothing on this page is computed at page load and no number is invented. Run the system yourself with the commands below and you get the same three answers.
| ID | Existing report | Text similarity | Metres | Days apart | Combined | Checks |
|---|---|---|---|---|---|---|
| 17 | synth theres a ded animal on the grass it smell bad and its been ther for days | 0.7422 | 0.0 | 0.61 | 0.8387 | all three pass |
| Rank | Service request type | Would route to | Confidence | Reasoning |
|---|---|---|---|---|
| 1 | Park Lighting Maintenance | Parks and Recreation → Parks | 0.30 | Streetlight out is closest to park lighting maintenance but may not be correct as this might be a road streetlight. |
Units: cosine similarity and distance (dimensionless);
metres (geodesic, PostGIS geography); days; classifier confidence 0–1.
Captured by scripts/capture_worked_examples.py →
out/worked_examples.json.
It is a local Postgres cluster and one command:
git clone https://github.com/Greatodu/undercount.git && cd undercount make db # local Postgres 17 + PostGIS + pgvector make part1 # load 500,269 rows, cluster, write out/evidence.json make part2 # taxonomy, centreline, seed the demo rows [needs OPENAI_API_KEY] make part4 # 150-pair eval; writes out/thresholds.json make link # apply the tuned rule across the seeded queue make serve # http://localhost:8311
Nothing is faked here to make the page work. A duplicate check without an embedding model and a spatial index is not a duplicate check, and a page that pretended otherwise would be the exact failure this project is about.