trips/mock
Greg Pomerantz d192b1dcab spatial: replace pgvector semantic search with targeted tag+name search
The embedding approach was overkill: it embedded only 'name — kind'
(short strings), spent a 4B model + ~2.5GB VRAM + 4.6GB of vectors + a
one-time 450k-row job to do what indexed SQL does directly.

New default — no embedding model, no extra VRAM:
- The LLM agent is the semantic layer: it maps the user's concept to
  OSM kinds + local-language name keywords. It is already in VRAM for
  chat, so this costs nothing.
- /kinds: returns the tag vocabulary that actually exists (GROUP BY kind
  with counts) so the agent grounds its choices in real data.
- /search: indexed retrieval — kind IN/ILIKE (poi_kind), name FTS
  (to_tsvector) + trigram (pg_trgm) for fuzzy/substring, optional
  ST_DWithin radius. Ranked by trigram similarity then distance.
- schema.sql: real trigram GIN index (poi_name_trgm_ops); renamed the
  misnamed FTS index to poi_name_fts.
- Agent tools: poi_semantic -> poi_kinds + poi_search (both pin results
  on the map).

pgvector demoted to an opt-in path (embed/ + /semantic) — still works
if poi_vec is built, but no longer the default. Dropped the half-built
poi_vec and stopped the background embed run.
2026-09-10 15:00:33 -04:00
..
scripts Move runtime artifacts out of the source tree to ~/trips 2026-09-10 10:03:04 -04:00
app.js spatial: replace pgvector semantic search with targeted tag+name search 2026-09-10 15:00:33 -04:00
data.js Fix Cartagena old-city points placed in the bay + misplaced CTG airport 2026-09-09 21:02:19 -04:00
index.html Route card: put walk/taxi on the leg popup; make the drop-off ride hoverable 2026-09-09 17:56:58 -04:00
server.js PostGIS: live — imports, spatiald, and fixes from real runs 2026-09-10 12:23:49 -04:00
styles.css spatial: replace pgvector semantic search with targeted tag+name search 2026-09-10 15:00:33 -04:00