Skip to content

Butler Law

Butler Law provides AI-powered legal Q&A grounded in Japanese tax law and labor law sources.

Coming Soon The full Butler Law user manual is in preparation. This page will expand to cover the chat interface, source citations, and admin features as they ship.

Operations (Studio Admin)

Law data operations — the law↔agent assignment matrix (Law Library), sync triggers/schedules for e-Gov laws and NTA Tax Answer, and agent management — live in Studio Admin (admin.saikoku-studio.com), not in the Butler Law customer app (#156). The Butler Law frontend is customer-facing only: chat and knowledge browsing.

How It Works (Today)

  • Butler Law indexes four source types into MongoDB:
    • Law articles (e-Gov, full statute text)
    • NTA Tax Answer (general-audience FAQ)
    • NTA basic circulars (基本通達 for corporate / income / consumption tax — the administrative interpretation layer, linked structurally to the articles they interpret; #158)
    • NTA Q&A case rulings (質疑応答事例 for income / withholding / corporate / consumption tax — official answers to practitioner-grade individual cases, with their 関係法令通達 linked to the statute and circular viewers; #159)
  • Queries are embedded with a multilingual MPNet model (paraphrase-multilingual-mpnet-base-v2) and matched via numpy cosine similarity
  • Circulars are retrieved two ways: by vector similarity, and by a structural join from the statute articles that matched the question — so "how is this actually treated in practice" answers carry the circular alongside the article
  • Direct references (No.5265, 法基通9-2-1) bypass similarity search
  • Revision tracking (#160): every statute's enforcement version is derived from the e-Gov revision id; answers state which version they are based on (「YYYY-MM-DD 施行版に基づく回答です」), the law viewer shows the enforcement date in its header, and revision changes detected by the daily sync are recorded as a feed (law_revisions) consumed by the Studio Admin revision watch (#161): watch rules map laws to platform masters, detected revisions become Yes/No proposal cards, and approving a tax-rate proposal archives the old rate, creates the new one and writes an audit log; when new proposals are created, all studio admins are notified by email (SendGrid) with a link to the proposal cards
  • The top-K passages are passed to Claude Sonnet as grounding context, labeled by source type (条文 / 通達 / タックスアンサー)
  • Answers cite their sources: clickable badges for laws and FAQ, and circular citations link to the NTA original

Chat Interface

Butler's answers stream in token-by-token (SSE) and render as markdown in a document-style layout — comparison tables, headings and lists are formatted, not shown as plain text. Quoted law articles appear as collapsible citation cards headed by the law name and article number, and each answer ends with clickable law/FAQ reference badges that open the corresponding source in the Knowledge Base.

Domains

Butler Law supports two domains gated by subscription:

DomainCoverage
tax_lawTax-related law (income tax, corporate tax, consumption tax)
labor_lawLabor-related law (working hours, paid leave, social insurance)

A user's accessible domains are determined by their subscription plan in Butler Platform. There are two ways to gain Butler Law access:

  • Standalone Butler Law contract (light / standard / pro / premium)
  • Butler Tax premium, which includes Butler Law as a bundled entitlement (plans.grants_entitlement — applied automatically on contract, including the manual dev-grant script)

Integration with Butler Tax

When a Butler Tax user asks a tax-law question in Butler Chat, the backend automatically calls Butler Law's /api/chat endpoint with domain="tax_law". The grounded answer flows back into the Butler Tax chat with citations attached.

The user does not need to switch apps for tax-law questions originating from accounting context.

Butler Series — Saikoku Studio