v7.8.0
styxx 7.8.0 — styxx.honest: the unifying, tier-adaptive honesty runtime
pip install -U styxxThe 7.7.x arc shipped the pieces of an honesty layer as separate primitives. honest is the unifying layer — one call that takes a candidate answer plus whatever signal you have, picks the strongest available, and decides answer vs. abstain vs. refute, returning a HonestyVerdict you can log as an attestation.
from styxx import honest, calibrate_single_pass, retrieval_check
# open / weak model — gate on the calibrated logit signal (one forward pass)
honest(answer, span_logits=token_logits, calibration=cal).action # "answered" | "abstained"
# frontier model — calibrated stated confidence, escalate confident claims to retrieval
v = honest(answer, confidence=0.9, verify=lambda claim: retrieval_check(claim))
v.answer # the answer, or "I'm not sure." if abstained / refuted
v.action # "answered" | "abstained" | "refuted"
v.detail # a loggable, compliance-grade attestation lineTier-adaptive — the research arc established the best honesty signal depends on the model tier:
- open / weak models expose token logprobs → the cheap logit gate (
span_logits>logits). - frontier models don't, but their stated confidence is calibrated (self-audit: Brier ~0.10, wrong only when uncertain) →
confidencewith a floor. - confident fabrication — the wall both the logit gate and resampling miss — is caught by the retrieval backstop → pass
verify.
It flags / abstains — it never fabricates a correction (a closed negative in the research arc). The detector stays load-bearing: an uncalibrated logit signal stays advisory rather than guessing. Pure Python, no new deps, 17 new tests.
Full Changelog: v7.7.16...v7.8.0