TehRiehlDeal 4939122cf2 Stop the advisor from inventing bogus savings equations
The model was producing lines like "you've saved $755.21 ($18,952.39 -
$83,276.19)" — pulling net worth and total debt from the snapshot and
subtracting them as if that yielded monthly savings. The figures had no
relationship to each other, and the parenthetical math didn't even
equate to the dollar number it cited.

Two fixes in the system prompt:
- Pre-compute "Saved this month" = income - expense (and the same for
  last month) so the model never has to derive it.
- Section the numbers into "Standing balance (point-in-time)" and "This
  month (flow)" with an explicit rule that standing-balance figures are
  not flow and must not be subtracted from each other.
- Add a guardrail forbidding invented equations and parenthetical
  arithmetic in the narrative.

Also formats every dollar figure with thousands separators so the model
sees and echoes "$15,000.00" instead of "$15000".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 14:34:13 -07:00
2026-04-12 17:13:33 -07:00
S
Description
No description provided
MIT 1.9 MiB
Languages
TypeScript 97.4%
CSS 1.1%
Dockerfile 0.7%
JavaScript 0.6%
HTML 0.1%