Selected work

FinSight HK

Describe a business and a Hong Kong district, get a financial model where every number shows its working.

Role
Architecture and technical review
Year
2026
Status
Live
Stack
ReactViteTypeScriptTailwindLLM integration
FinSight HK home screen asking the user to describe a business idea

How it fits together

Business idea + district

typed by the founder

1. Assumption layer

LLM returns strict JSON only: rent per sq ft, headcount, wages, COGS %, transaction value, setup costs, growth. Never a result.

blend

2. HK benchmark layer

Typed data, not prompt text: district rent bands, MPF 5%, two-tier profits tax 8.25% then 16.5%, licence costs, COGS ranges

no model output crosses this line

3. Deterministic model

Pure functions, unit-testable: startup costs, 3-year P&L, break-even, month-by-month cash runway with the trough flagged, sensitivity

Every figure is an editable line

change rent or headcount and the whole model re-runs in the browser

The language model only ever produces assumptions. A typed Hong Kong benchmark layer checks and blends them, and a pure-function model computes every figure, so each number on screen traces to an input a person can change.

Try it here

Live app, embedded

If the frame does not load, open it in a new tab.

The production build is a from-scratch React and Vite rebuild. I own the architecture and the technical review rather than the day-to-day implementation.

The problem

Ask any AI tool whether your business idea works and it will hand you a confident set of numbers with no working shown. That is useless the moment a bank, a landlord or a partner asks where a figure came from. It is also wrong in ways that matter locally: rent per square foot in Causeway Bay is not rent in Sha Tin, and Hong Kong profits tax is two-tier, not a flat rate.

What was built

  • Layer one, assumptions. The model is given one job: read the idea and return a JSON object of assumptions and benchmarks, never an answer. Industry category, district, floor area, rent per square foot, headcount and wage per role, cost of goods as a percentage of revenue, average transaction value, daily transactions, one-off setup costs and expected growth. Strict JSON only, parsed defensively, falling back to industry defaults when parsing fails.
  • Layer two, local benchmarks. A hand-written Hong Kong reference set the model output is sanity-checked and blended against: retail and food-and-beverage rent per square foot by district band, MPF at five percent employer contribution, statutory holidays, profits tax at 8.25 percent on the first two million Hong Kong dollars and 16.5 percent above it, typical cost-of-goods ranges, and licence costs such as a food business licence. Region-aware from day one even though only Hong Kong ships.
  • Layer three, the model. Pure functions, no AI, unit-testable: itemised startup costs plus a working capital buffer, a three-year profit and loss statement monthly for year one and annual after, break-even in units and in revenue with months to reach it, a month-by-month cash runway that flags the trough, and sensitivity analysis on the assumptions that move the answer most.
  • Every assumption surfaces in the interface as an editable line item, so changing rent or headcount re-runs the whole model in the browser.

Decisions worth explaining

  • The model writes the inputs, never the output. An LLM that produces the final number cannot be tested, because there is nothing to compare against. An LLM that produces assumptions, with pure functions computing the result, makes everything downstream unit-testable and every figure traceable to something a human can argue with.
  • Local tax and payroll rules belong in typed data, not in a prompt. Two-tier profits tax and MPF are not opinions, they are rules, and rules in a prompt drift between runs and cannot be reviewed.
  • Audit before features. Reviewing the first implementation against the actual Hong Kong rules surfaced real defects, including how a user override was recorded and how losses were carried forward, and those were worth more than another screen.

Outcome

A founder with no spreadsheet skills can reach a defensible three-year model in minutes, and can answer the only question that matters when they show it to a bank: where did this number come from.

More work