Industry/logic-codes
logic.codes: AI stops doing the arithmetic
AI only finds the calculator and pre-fills values; results come from versioned formulas and sourced official data
01
Problem
More and more people ask AI directly: how much mileage can I claim for this trip, what is my monthly loan payment, what does Etsy take from a $40 sale. The AI returns a confident number, but rates change, formulas are easy to misremember, and the answer rarely carries a source or a way to recompute it.
02
Generation only
The model answers with whatever rate it remembers: perhaps 72.5 cents for the whole year, or even 2025's 70 cents. When the date is missing it assumes a plausible one without saying so.
The formula is right, but the rate is hard-coded and silently goes stale; there is no visible source and no stated scope.
Illustrative · a summary of common practice, not a measured output
03
With structure
The AI does one job: understand the request, find the matching calculator and pre-fill values, which the user confirms before anything is computed. Calculations use tested, versioned formulas. Reference data such as rates is written as OCG facts, each with an official source and a validity window, and the fact in effect on the trip date is selected. A wrong record is never overwritten: it is marked retracted and a corrected record is added. When data is missing, only the known part is shown; nothing is estimated.
04
Result
Change the trip date and watch which rate is selected and which fact is used. The calculation runs in your browser with the same data as the live logic.codes calculator.
Working: 120 mi × 76¢ = $91.20| OCG facts for this purpose | ¢/mi | In effect | |
|---|---|---|---|
| Business | 58.5 | 2022-01-01 → 2022-07-01 | accepted |
| Business | 62.5 | 2022-07-01 → 2023-01-01 | accepted |
| Business | 65.5 | 2023-01-01 → 2024-01-01 | accepted |
| Business | 67 | 2024-01-01 → 2025-01-01 | accepted |
| Business | 70 | 2025-01-01 → 2026-01-01 | accepted |
| Business | 72.5 | 2026-01-01 → 2027-01-01 | retracted |
| Business | 72.5 | 2026-01-01 → 2026-07-01 | accepted |
| Business | 76 | 2026-07-01 → 2027-01-01 | used |
The 2026 record of 72.5 cents for the whole year was retracted and replaced by two dated records. The old record stays, so the change can be traced.
05
Evidence and next
Rate data is taken from the live logic.codes calculator (viewed 2026-11-02). logic.codes results are verified for structure, provenance and reproducibility; they are not tax or legal advice.