ocgOpen Cognitive Graph · CDC v2.1

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

LcD = calculation60 calculators · OCG knowledge packs

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.

A real exampleThe IRS standard mileage rate changed mid-2026: 72.5 cents a mile from January to June, 76 cents from July. The same 120 business miles is worth a different amount in March than in September.

02

Generation only

Asking an AI directly

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.

A typical online calculator

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.

cA request“120 business miles in March?”
rAI routing and pre-fillfinds the calculator, pre-fills, waits for confirmation
@Dformula + OCG factsversioned formula × the rate in effect on the trip date
C′result + provenancemethod, sources, limits, reproducible link
AI mayunderstand the request, choose a calculator, pre-fill values (user confirms)
AI may notdo the arithmetic, invent a rate, estimate missing data
Data ruleevery fact carries a source and validity window; wrong records are retracted, not overwritten

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.

rules.us.irs_mileage@1.1.0 · demo
Deductible amount$91.20
Rate applied76 ¢/miIn effect2026-07-01 → 2027-01-01
Working: 120 mi × 76¢ = $91.20
OCG facts for this purpose¢/miIn effect
Business58.52022-01-01 → 2022-07-01accepted
Business62.52022-07-01 → 2023-01-01accepted
Business65.52023-01-01 → 2024-01-01accepted
Business672024-01-01 → 2025-01-01accepted
Business702025-01-01 → 2026-01-01accepted
Business72.52026-01-01 → 2027-01-01retracted
Business72.52026-01-01 → 2026-07-01accepted
Business762026-07-01 → 2027-01-01used

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

Other cases

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.