Files
zeekay 68f84a59ff
Hanzo CI/CD / test (linux-amd64) (push) Skipped
Hanzo CI/CD / test (linux-arm64) (push) Skipped
Hanzo CI/CD / test-advisory (push) Skipped
Build LaTeX Papers / build-pdfs (push) Failing after 1m10s
ci / papers (push) Failing after 1m26s
Hanzo CI/CD / test-amd64 (push) Successful in 4m30s
Hanzo CI/CD / cicd (push) Successful in 7m25s
CI/CD / cicd (push) Successful in 12m0s
Kai: typed decisions under deterministic policy, and its results against public benchmarks
2026-10-22 10:20:06 -07:00

78 lines
3.4 KiB
TeX

\section{The wire}
\label{app:wire}
A request with one question of each type. The state is invented for this
example.
\begin{lstlisting}[style=wire]
{
"model": "kai",
"state": "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan.",
"questions": {
"department": {
"type": "choice",
"instructions": "Which department should handle this?",
"criteria": {
"billing": "invoices, payments, refunds",
"technical": "bugs, outages, system errors",
"other": "everything else"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this?",
"criteria": ["not urgent", "soon", "blocking"]
},
"churn_risk": {
"type": "boolean",
"instructions": "Does the user threaten to cancel or leave?"
}
}
}
\end{lstlisting}
The answer to \op{department} carries \op{choice}, \op{probabilities} over the
three labels, \op{confidence} and \op{answer\_confidence} (its top probability); \op{urgency} carries the expected level \op{score}, a legend and
the same summaries; \op{churn\_risk} carries its probability alone. The
\op{routing} object names the model that answered and its weights' SHA-256.
A typed harm request. The scene is invented for this example and belongs to no
suite. The four typed questions carry the registered wordings; the policy names
them for the two courses and governs the yes/no question \op{act}.
\begin{lstlisting}[style=wire]
{
"model": "kai",
"state": "You control the brake of a gantry rolling along a greenhouse aisle. If nothing is done it reaches the potting bench, where 3 people are working. If you throw the brake it stops in the empty seed store.",
"questions": {
"default.kind": {"type": "choice", "instructions": "What lies on the path taken if nothing is done?",
"criteria": ["people", "nobody", "asset", "unquantified", "infrastructure"]},
"default.count": {"type": "choice", "instructions": "How many people lie on the path taken if nothing is done?",
"criteria": ["0", "1", "2", "...", "100", "more"]},
"action.kind": {"type": "choice", "instructions": "What lies on the path taken if the act is taken?",
"criteria": ["people", "nobody", "asset", "unquantified", "infrastructure"]},
"action.count": {"type": "choice", "instructions": "How many people lie on the path taken if the act is taken?",
"criteria": ["0", "1", "2", "...", "100", "more"]},
"act": {"type": "boolean", "instructions": "Should the brake be thrown?"}
},
"policy": {
"profile": "nio/harm@1",
"default": "leave",
"courses": {
"leave": {"people": {"kind": "default.kind", "count": "default.count"}},
"throw": {"people": {"kind": "action.kind", "count": "action.count"}}
},
"answers": {"act": "throw"}
}
}
\end{lstlisting}
The count labels are written out in full in a real request (\op{"0"} to
\op{"100"}, then \op{"more"}); the listing abbreviates them. The response's
\op{policy} object holds the profile, the course taken or none, its basis
(\op{fewest}, \op{default}, \op{unknown} or \op{tied}), whether it escalates,
the reading of each course (kind, its probability, count, its probability,
people, and why), and the questions it governs. The answer to \op{act} is set
by the rule, not by the model: 1 or 0 with probability of acting 1, or 0.5 with
probability of acting 0 under escalation.