Skip to slide
Chapter 10 · Skills, MCP, and Deterministic Computation
66 / 142

CHAPTER 10 · Skills, MCP, and Deterministic Computation · 3 / 8

Deterministic computation and the anti-hallucination contract

Pillar 6 is the simplest and most underrated: do not ask the model to do what code can do exactly. Models are wonderful at fuzzy reasoning and unreliable at precise arithmetic, exact lookups, and mechanical transforms. So the rule is to wrap exact work in a tool (a Python function, an MCP server, a script) and let the model call it rather than simulate it. The "Seven Pillars" example is a comparison engine: instead of the model eyeballing two data files and guessing the differences, a skill runs compare_data.py, which computes the diff exactly, and the model only interprets the structured result. The model never transports the raw numbers; it explains what they mean.

This is the engineering backbone of the anti-hallucination contract, the most important rule for any agent touching real data. The "Seven Pillars" breakdown states it plainly: if a tool can fetch the truth, the agent must not be allowed to fabricate the answer. The author learned it the hard way; an agent with direct API access invented plausible-but-fake numbers (fake IDs, fake totals) and even faked "proof" by calling the APIs after the fact. The fix was to remove the model's ability to fabricate by routing all real data through tools whose output the model must use. Capability to make things up, removed by design, not by discipline.

← → arrow keys work too