Skip to content
Nat Lee

Keyboard shortcuts

Turn these off if they get in the way of a screen reader or voice control. The setting is saved in this browser.

1
Home
2
Work
3
Projects
4
About
5
Experience
/
Search projects
?
Show this panel

Web Application

Ask Taipei City Hall

City-service answers, with sources

Search 8,000-plus Taipei city-service FAQs in your browser. Every result links back to its source; an optional model-assisted mode can summarise the answers.

Role
Creator & Maintainer
Period
2026 – 2026.11
Status
Completed
Categories
Web apps & extensions
Stack
  • TypeScript
  • React
  • BM25
  • Web Workers
Ask Taipei City Hall, screenshot 1

Overview

The 2017 Taipei city-government chatbot competition project, rebuilt in 2026 as a static web app. Chinese BM25 retrieval runs locally in a Web Worker and returns the issuing agency, date and source for each FAQ. An optional mode uses your own API key to summarise the retrieved material.

What it's good for

For a Taipei resident with a city-service question: ask in everyday words (狗, not 犬) and get the official FAQ with its agency, date and page, so you can judge whether it still applies. Free mode costs nothing; AI mode bills your own key and shows how much.

Diagrams

Main paths only. The edge cases stayed in the code.

"I lost my ID card" used to find "I lost my house number plate" first.

Point at a box to see what it connects to.

  1. Type a question → Just small talk?
  2. Just small talk?(near-exact lines only) → yes: Yee chats back → no: Strip filler, use the city's words
  3. Yee chats back(lines from the 2017 bot)
  4. Strip filler, use the city's words(狗 is filed under 犬) → Rank the FAQs with BM25
  5. Rank the FAQs with BM25(inside a Web Worker) → AI mode on?
  6. AI mode on?(uses your own API key) → no: Anything close enough? → yes: Send the top six to Claude
  7. Anything close enough?(covers 35% of the question) → yes: One clear winner? → no: Offer search links instead
  8. One clear winner?(80% match, 15% ahead) → yes: Answer with its source → no: Offer three candidates
  9. Offer three candidates("Did you mean…?") → one picked: Answer with its source
  10. Offer search links instead(city site, Google and more) → rephrase: Type a question
  11. Answer with its source(agency, date, original page)
  12. Send the top six to Claude(only FAQs sharing a word) → Stream a cited answer
  13. Stream a cited answer(cost shown, billed to your key)

Features

  • Local search across 8,000-plus public FAQs
  • Agency, update date and original source on results
  • Chinese retrieval in a Web Worker
  • Optional answers grounded in retrieved FAQs
Free mode answers a lost senior-card question with the agency, date and source link
Free mode answers a lost senior-card question with the agency, date and source link

What I learned

  • "身分證不見了" (my ID card is gone) used to rank a lost house-number plate first: the colloquial 不見 outweighed 遺失, the city's word. Synonyms now count as one idea.
  • A Chinese embedding model would add about 38 MB of downloads, over 15 times the gzipped FAQ file, so meaning is left to the optional AI mode.
  • Word matching has limits: asking about moving to Mars (火星移民) lists questions for new immigrants, thanks to the word 移民.
  • AI mode: a short answer with numbered citations, the FAQs it used and what it cost
    AI mode: a short answer with numbered citations, the FAQs it used and what it cost
  • On a phone, dark mode: Did you mean…? choices, and polite defeat on a Mars expedition
    On a phone, dark mode: Did you mean…? choices, and polite defeat on a Mars expedition
  • Browsing a topic: tax and finance FAQs, newest first, filterable by agency
    Browsing a topic: tax and finance FAQs, newest first, filterable by agency
  • Web apps & extensions77 stars on GitHub

    Streaming Player

    Twitch, YouTube live chat and chat bots share one song queue. A Rust backend keeps the OBS player, overlay and moderator dashboard in sync.

    2023Completed
  • Web apps & extensions11 stars on GitHub

    Gantt Studio

    Drag a schedule into place, draw dependencies and see the critical path. Switch to Mermaid text without losing the plan. Everything stays in your browser.

    2026Completed
  • Web apps & extensions33 stars on GitHub

    MorphKit

    Converts and edits images, audio, video, PDFs and documents entirely in the browser. Nothing gets uploaded, mostly because there is nowhere to upload it to.

    2026Active