feat(04-02): pinned golden corpus + D-14 corpus runner + Nyquist gate

- golden-corpus.json: 75 hand-written pinned cases (D-13) — landmark 17 /
  abbreviation 15 / glued 7 / typo 14 / alias 15 / negative 7, incl. two
  near-miss negatives (Penang 0.625, Kampung Cina ~0.58) below the 0.72
  admission line; threshold.top3_hit_rate pinned at 0.9
- gazetteer-corpus.mjs: the D-14 runner — imports the SAME src/index.ts the
  bot uses, measures top-1/top-3 + per-category rates + avg ms/query, prints
  the refusal margin and the fixed escalation ladder on failure, exports
  measureCorpus() for the in-process suite, exits 0 only on threshold + zero leaks
- corpus.test.mjs goes green: CO1-CO8 (the Nyquist gate inside npm run search:test)
- delegates: search:corpus (root) + corpus (search workspace)

Measured: top-3 68/68 (100.0%) >= 90%, negatives refused 7/7, margin 0.643 < 0.72 —
threshold met on the first run (D-14 lever: None).
This commit is contained in:
araharah-executor
2026-10-24 00:54:47 +08:00
parent dea7971358
commit b2689f71b1
4 changed files with 307 additions and 1 deletions
+87
View File
@@ -0,0 +1,87 @@
{
"version": 1,
"note": "Hand-written and pinned (D-13). NOT generated from the gazetteer — a generated corpus is tautological. Reviewers extend this file by editing it.",
"threshold": { "top3_hit_rate": 0.9 },
"cases": [
{ "q": "KLCC", "expectId": "suria-klcc", "kind": "landmark" },
{ "q": "Sunway Pyramid", "expectId": "sunway-pyramid", "kind": "landmark" },
{ "q": "DUKE", "expectId": "the-duke", "kind": "landmark" },
{ "q": "Pavilion", "expectId": "pavilion-kl", "kind": "landmark" },
{ "q": "Mid Valley", "expectId": "mid-valley", "kind": "landmark" },
{ "q": "Berjaya Times Square", "expectId": "berjaya-times-square", "kind": "landmark" },
{ "q": "IOI City Mall", "expectId": "ioi-city-mall", "kind": "landmark" },
{ "q": "Merdeka 118", "expectId": "merdeka-118", "kind": "landmark" },
{ "q": "KL Sentral", "expectId": "kl-sentral", "kind": "landmark" },
{ "q": "Nu Sentral", "expectId": "nu-sentral", "kind": "landmark" },
{ "q": "Petronas Twin Towers", "expectId": "petronas-twin-towers", "kind": "landmark" },
{ "q": "Taman Bangsar", "expectId": "bangsar", "kind": "landmark" },
{ "q": "KL Tower", "expectId": "kl-tower", "kind": "landmark" },
{ "q": "Bukit Bintang", "expectId": "bukit-bintang", "kind": "landmark" },
{ "q": "Central Market", "expectId": "central-market", "kind": "landmark" },
{ "q": "Petaling Street", "expectId": "petaling-street", "kind": "landmark" },
{ "q": "Masjid Jamek", "expectId": "masjid-jamek", "kind": "landmark" },
{ "q": "Jln Ampang", "expectId": "suria-klcc", "kind": "abbreviation" },
{ "q": "Jalan Ampang", "expectId": "suria-klcc", "kind": "abbreviation" },
{ "q": "Tmn Bangsar", "expectId": "bangsar", "kind": "abbreviation" },
{ "q": "Kg Ampang", "expectId": "kampung-ampang", "kind": "abbreviation" },
{ "q": "Kpg Ampang", "expectId": "kampung-ampang", "kind": "abbreviation" },
{ "q": "Kampung Ampang", "expectId": "kampung-ampang", "kind": "abbreviation" },
{ "q": "Sg Wang", "expectId": "sungei-wang", "kind": "abbreviation" },
{ "q": "Sungai Wang", "expectId": "sungei-wang", "kind": "abbreviation" },
{ "q": "Bkt Bintang", "expectId": "bukit-bintang", "kind": "abbreviation" },
{ "q": "Bkt Bintang KL", "expectId": "bukit-bintang", "kind": "abbreviation" },
{ "q": "Jln Tun Razak", "expectId": "tun-razak", "kind": "abbreviation" },
{ "q": "Jln Petaling", "expectId": "petaling-street", "kind": "abbreviation" },
{ "q": "Stesen Sentral", "expectId": "kl-sentral", "kind": "abbreviation" },
{ "q": "Tmn Tasik Titiwangsa", "expectId": "titiwangsa", "kind": "abbreviation" },
{ "q": "Tmn Perdana", "expectId": "lake-gardens", "kind": "abbreviation" },
{ "q": "tamanbangsar", "expectId": "bangsar", "kind": "glued" },
{ "q": "sungaiwang", "expectId": "sungei-wang", "kind": "glued" },
{ "q": "bukitbintang", "expectId": "bukit-bintang", "kind": "glued" },
{ "q": "jalanampang", "expectId": "suria-klcc", "kind": "glued" },
{ "q": "kampungampang", "expectId": "kampung-ampang", "kind": "glued" },
{ "q": "jalanpetaling", "expectId": "petaling-street", "kind": "glued" },
{ "q": "jalantunrazak", "expectId": "tun-razak", "kind": "glued" },
{ "q": "KCLC", "expectId": "suria-klcc", "kind": "typo" },
{ "q": "Pavillion", "expectId": "pavilion-kl", "kind": "typo" },
{ "q": "Pavilon", "expectId": "pavilion-kl", "kind": "typo" },
{ "q": "Sunwya Pyarmid", "expectId": "sunway-pyramid", "kind": "typo" },
{ "q": "Mid Vally", "expectId": "mid-valley", "kind": "typo" },
{ "q": "Berjaya Time Square", "expectId": "berjaya-times-square", "kind": "typo" },
{ "q": "Sentrl", "expectId": "kl-sentral", "kind": "typo" },
{ "q": "Kl Towr", "expectId": "kl-tower", "kind": "typo" },
{ "q": "Sunway Vellocity", "expectId": "sunway-velocity", "kind": "typo" },
{ "q": "Merdeaka 118", "expectId": "merdeka-118", "kind": "typo" },
{ "q": "Akuaria", "expectId": "aquaria-klcc", "kind": "typo" },
{ "q": "Sngi Wang", "expectId": "sungei-wang", "kind": "typo" },
{ "q": "Petrnas Twin Towers", "expectId": "petronas-twin-towers", "kind": "typo" },
{ "q": "Titiwangsaa", "expectId": "titiwangsa", "kind": "typo" },
{ "q": "IJN", "expectId": "ijnp", "kind": "alias" },
{ "q": "PWTC", "expectId": "pwtc", "kind": "alias" },
{ "q": "Stesen KL Sentral", "expectId": "kl-sentral", "kind": "alias" },
{ "q": "KL Central", "expectId": "kl-sentral", "kind": "alias" },
{ "q": "BTS", "expectId": "berjaya-times-square", "kind": "alias" },
{ "q": "IOI", "expectId": "ioi-city-mall", "kind": "alias" },
{ "q": "Velocity", "expectId": "sunway-velocity", "kind": "alias" },
{ "q": "Pudu", "expectId": "pudu-raya", "kind": "alias" },
{ "q": "Pasar Seni", "expectId": "central-market", "kind": "alias" },
{ "q": "Muzium Negara", "expectId": "national-museum", "kind": "alias" },
{ "q": "Titiwangsa", "expectId": "titiwangsa", "kind": "alias" },
{ "q": "Aquaria", "expectId": "aquaria-klcc", "kind": "alias" },
{ "q": "Little India", "expectId": "little-india-brickfields", "kind": "alias" },
{ "q": "Chinatown", "expectId": "chinatown", "kind": "alias" },
{ "q": "Tun Razak", "expectId": "tun-razak", "kind": "alias" },
{ "q": "Kuching", "expectId": null, "kind": "negative" },
{ "q": "Penang", "expectId": null, "kind": "negative" },
{ "q": "Johor Bahru", "expectId": null, "kind": "negative" },
{ "q": "Kota Kinabalu", "expectId": null, "kind": "negative" },
{ "q": "Singapore", "expectId": null, "kind": "negative" },
{ "q": "London", "expectId": null, "kind": "negative" },
{ "q": "Kampung Cina", "expectId": null, "kind": "negative" }
]
}