Determinism Over Guessing
"Validate output against a strict graph, not another LLM."
The Problem
Your agent returns structured data. A bank downstream needs it to be true, not plausible.
LLM-as-a-judge asks another probabilistic model whether the answer is correct. That doubles the bias and the bill.
The deterministic is back — because it's the only way to guarantee an SLA.
The Buzzword Replacement Table
Every probabilistic pattern maps 1:1 onto a deterministic primitive:
LLM-as-a-judge costs GPU tokens.
Ontology validation costs fractions of a cent of CPU/memory.
Show, Don't Tell
Confine inference to a rigid contract — tokenops_ontology.yaml:
version: "1.0"
domain: "customer_operations"
ontology:
entities:
- name: "Client"
properties:
id: "UUID"
status: "STRING"
- name: "Invoice"
properties:
id: "UUID"
amount: "FLOAT"
currency: "STRING"
allowed_relations:
- origin: "Client"
relation: "HAS_BILLING_DISPUTE"
target: "Invoice"
harness_constraints:
enforce_json_schema: true
fail_on_unknown_relation: true # KILL SWITCH on hallucinationValidation is pure math — no tokens spent:
import { validateResponse } from '@carloscortezcloud/tinkuy-agent/ontology';
const result = validateResponse(llmOutput, schema);
if (!result.valid) {
throw new OntologyViolationException(result.violations); // → ASL Catch
}Try It: Valid vs Hallucination
Same validator, two outcomes. Same cost: $0.00.
The Kill Switch
Determinism only matters if you enforce it. Pair ontology validation with a financial circuit breaker that Step Functions matches by exception name:
{
"StartAt": "EvaluateFinancialGuardrail",
"States": {
"EvaluateFinancialGuardrail": {
"Type": "Task",
"Resource": "arn:aws:lambda:...:sayay-guard-interceptor",
"Catch": [ {
"ErrorEquals": ["TokenBudgetExceededException"],
"Next": "FinancialKillSwitchTriggered"
} ]
},
"ValidateOntologyWithTinkuy": {
"Type": "Task",
"Resource": "arn:aws:lambda:...:tinkuy-neptune-validator",
"Catch": [ {
"ErrorEquals": ["OntologyViolationException"],
"Next": "HandleHallucinationError"
} ]
}
}
}Key Insight
"fail_on_unknown_relation: true" is the difference between a doc and a kill switch.
Reject corrupt data before it touches your database — and before the token bill records it.