Back to daigan.xyzEssay · Japan Regulatory Radar

The model was the easy part

What building a Japanese regulatory research tool taught me about where AI should stop.

AI systems rarely fail where the demo tells you to look. The JSON parses, the English reads cleanly, and the model even cites its source. Then, somewhere between a Japanese working-group report and an English summary, a proposal hardens into a rule, a background date turns into a compliance deadline, or a company mentioned in a foreign case study quietly joins the list of project participants. Because the output looks finished, you stop checking.

I built Japan Regulatory Radar to test a harder question than whether a language model can summarise Japanese regulation. Obviously it can. Having spent the past year in Tokyo studying Japanese and working in institutional digital assets, I kept running into a different problem: an English summary can be faithful word for word and still misread what a Japanese document is actually doing. I wanted to see what it took to build a small system I had actual reasons to trust: one that kept the original evidence close, measured its own mistakes, and knew when to stop and hand the decision back to a person.

I kept the scope narrow. Radar watches five primary feeds across the Financial Services Agency (FSA), Japan Exchange Group (JPX) and Progmat. It archives the raw HTML and PDFs, breaks them into page- or slide-numbered segments, filters for relevance, and drafts a short English brief that waits for my approval before anything goes live. There is no autonomous newsletter; if I have not read it, it does not go out.

Why Japanese originals remain canonical

Japan’s digital-asset rules do not live in one tidy English feed. A material shift might surface in an FSA notice, a consultation attachment, a sixty-slide working-group deck on SpeakerDeck, or an infrastructure provider’s press release. Official English translations are patchy and usually arrive weeks later, if at all.

The tempting shortcut is to hand the whole problem to a model in one go: search, translate and summarise. That is quick to build and almost impossible to audit. When a brief comes back wrong, you have no way of knowing whether discovery missed a file, the source page changed, the PDF parser mangled a table, the translation drifted, or the model simply guessed.

So I treated the Japanese original as a file to keep, not text to throw into a prompt and forget. Every fetched revision records its final URL, retrieval timestamp, content hash, MIME type and raw file. PDF pages and HTML headings become fixed evidence segments, and SpeakerDeck decks are indexed by slide. A draft brief can cite page 2 or slide 31, but it cannot hallucinate page 7 because the validator checks every locator against the stored extraction and requires a continuous, verbatim Japanese excerpt that actually appears on that page.

That strictness paid off almost immediately. My first SpeakerDeck parser kept returning near-empty strings like "Slide 1 text". The Japanese text was right there in the archived HTML, tucked inside hidden player nodes outside the main document body. Had I been debugging the prompt, I would have wasted days trying to coax better summaries out of an empty string. Fixing the parser (now on v4) recovered between seven and sixty-five anchored slides across all thirteen archived working-group reports.

Deterministic around the model

When you build with language models, there is a nagging temptation to make every step "agentic". I went the other way. Discovery, URL normalisation, hashing, revision checks, date parsing, evidence validation, deduplication and Markdown rendering are all plain deterministic code. The model only steps in where linguistic judgement is genuinely required: deciding whether a document is relevant, pulling out structured facts, translating, and explaining why a development matters institutionally.

Keeping the surrounding plumbing deterministic saves you from silly failures. An unchanged source page should not create a duplicate record or burn a second API call. If the FSA scraper breaks because a page layout changed, that adapter should fail loudly without taking JPX or Progmat down with it. A routine seminar notice with no digital-asset keywords can be filtered out by a simple title rule in milliseconds. Handing any of those jobs to an LLM only makes the system slower, pricier and harder to debug.

The same boundary applies to scheduling. The daily cron job can discover, fetch and extract up to fifty documents on its own, but it has no credentials to call a model, approve a draft or publish to the site. Background ingestion can run overnight; publishing still needs a person.

Evaluation changed the product

My first evaluation set had fourteen hand-picked cases: enough to verify that the code ran, and useless for claiming the system was any good. I replaced it with a frozen fifty-case benchmark drawn from real feeds: twenty clear inclusions, twenty clear exclusions and ten genuinely borderline documents.

The first full Gemini pass on that set was a reality check. Precision was 100 per cent, which felt great until I looked at the rest of the sheet: recall sat at 83.3 per cent, exact topic matching was a dismal 29.2 per cent, and one response blew past its token cap and failed schema validation altogether. Twenty-three failures in fifty runs.

Categorising those twenty-three misses turned out to be the most useful afternoon of the project, mostly because two of the biggest failure buckets were my own fault. My prompt told the model to reject commentary unless it announced a concrete regulatory change, whilst my product brief explicitly asked for Progmat’s legal, tax and market-structure analyses. I had also muddled the topic taxonomy, filing tokenised equities under general RWAs instead of tokenised securities. Once I resolved my own contradictions, tightened the materiality rules and raised the output token cap, recall climbed to 95.2 per cent and exact topic match to 90.5 per cent (with 100 per cent precision, event-status accuracy and schema validity), all for about seven cents of API spend ($0.0696).

I left the remaining misses in the benchmark. One is a genuine edge case over whether announcing a real-estate security token consortium counts as material before any implementation details exist; another is a title-only topic miss. Tweaking the prompt to memorise those two cases would have given me a clean 100 per cent and a less honest benchmark.

Shortly after, while preparing sources for the next stage, I caught a worse mistake in my own answer key. One of the ten borderline cases claimed that an FSA payments-policy review covered electronic payment instruments. When I went back to the Japanese attachment, it did no such thing; it was about fund-transfer tiering and collection agencies. Rather than quietly editing v1 to make history look neater, I froze it as an artefact and cut a corrected v2 (where the same prompt scored 95 per cent recall and 90 per cent topic match for $0.0722). If you are going to audit a model, your answer key needs a paper trail too.

A valid citation is not the same as a correct fact set

Passing the relevance filter and the citation validator was only half the battle. Early on, four production drafts cleared every automated check: every claim mapped to a real locator, every Japanese quote matched character for character, every date was anchored, and no unsupported flags fired. On paper, they were ready to publish.

When I graded those four drafts by hand against an exhaustive checklist of actors, instruments, dates and changes, the gap between recall and precision gave the game away. The model found 100 per cent of the required actors and instruments, but actor precision was only 52 per cent (and instrument precision 81 per cent). Every name it extracted really did appear in the Japanese PDF, which is why the citation checker was happy, but the model had scooped up background regulators, historical working-group members and foreign case studies alongside the actual participants. Four foreign products, including BlackRock’s BUIDL and Circle’s USDC, were listed as instruments of a Japanese working-group development when the deck only mentioned them as overseas examples. Meanwhile, a tokenised money-market fund structure that actually was cited in the text never made it into the structured summary.

Calling these "hallucinations" misses the point. Nothing was invented; the model just lost track of scope. A verbatim quote checker cannot save you when the quote is real but answers the wrong question.

Scaling that factuality test up to twenty frozen cases was genuinely humbling. Even with 100 per cent valid citations, recall on material changes dropped to 30 per cent, actors to 40.8 per cent and instruments to 33 per cent. All twenty drafts failed. That forced an architectural change: instead of letting a draft bundle claims together, each English claim now binds to a single Japanese passage, and a separate bilingual entailment pass checks whether that specific passage actually supports the claim’s scope and status before a draft ever reaches my queue. I kept the twenty rejected drafts on disk untouched so the test suite still runs against the actual failures.

The cost of rejected output still counts

Along the way, five draft calls failed validation before they could even be saved: one bundled multiple claims without a clean mapping, two mistook consortium member headcounts for financial amounts, and two normalised Japanese whitespace just enough to break exact string matching. Throwing those drafts away was the right call, but I noticed later that their API usage had vanished from the cost ledger.

If a rejected draft disappears from your logs, your cost-per-brief metric is a lie. I fixed the pipeline so that failed runs still record their prompt, model, target URL, validation error, token count, latency and provider cost, and I backfilled the five earlier failures as known calls with unrecorded usage rather than making up numbers.

At that checkpoint, the ledger showed twenty-four paid calls totalling $0.1541 in reported spend, plus eight calls without cost data (including the five backfilled failures). Fifteen cents is nothing, obviously, but if a pipeline only logs the runs that succeeded, the cost numbers are wrong.

What I would claim, and what I would not

I am happy to claim that the engineering holds up. Anyone can clone the repo, install from the lockfile, run the CLI and watch over two hundred offline tests pass. The scrapers find their sources, the raw Japanese files are preserved, a broken feed does not poison the rest of the run, and re-running the pipeline on unchanged pages is a no-op. Nothing reaches the public site without my explicit sign-off.

What I will not claim is that Radar can run unattended. The first live issue (three briefs covering the FSA’s warning to Izakaya Limited, MUFG’s tokenised investment-trust experiment, and the MUFG Canton JGB repo pilot) cleared bilingual entailment checks and my own line-by-line review against the Japanese PDFs. Even so, the broader twenty-case evaluation makes it obvious that dense regulatory documents still need a human editor who can read the source.

In regulation and institutional finance, getting a model to sound authoritative is easy; models do that by default. The hard work is building the checks around it so that when it overreaches, misreads scope or fails outright, you can see where it went wrong and stop it before anything goes out.

Epilogue: the first issue

By September 2026, the test suite had grown from 87 to 206 offline tests, adding a multi-model evaluation harness, automated recovery drills and a source-first editorial queue. The first three curated briefs and the exact Japanese passages sitting behind every English claim are live at Japan Regulatory Radar (opens in a new tab).