Skip to main content

Executable Validation

Delegate Math to Executable Code

Math needs exact execution, not plausible continuation. Because LLMs generate probable next tokens rather than verified results, they can produce arithmetic-shaped answers that look coherent but are wrong. Ask them to write executable code for arithmetic, measurement, parsing, and validation.

Don't rely on LLMs for math
Estimate whether usage-based pricing will increase revenue without upsetting enterprise customers.
Instead, have the model write code
Write a script that models the impact of usage-based pricing across customer cohorts.

Inputs:
- current MRR by account
- monthly event volume by account
- proposed unit price, included volume, caps, and discounts
- account segment and contract tier

Return cohort revenue deltas, accounts with >20% increase, and a sensitivity table.

Include tests for pricing formulas, caps, discounts, and missing data handling.

The model may generate plausible-sounding business impact because probability can imitate correctness without guaranteeing it. It is far better at writing code that computes the result, tests the formulas, and exposes the assumptions behind the estimate.

From Prompt Controls to Workflow

These controls make one prompt reviewable: target artifact, separated inputs, constraints, examples, evidence, positive instructions, and executable validation. They are the smallest unit of agent operation.

For production work, the next problem is orchestration. A large change is not one perfect prompt; it is a sequence of prompts that research the system, produce a plan, execute within constraints, and validate the result.


Next: Four-Phase Workflow