solvi.audit¶
The audit of a response (res.audit()): for each answer what it rests on — given inputs, computed facts, quotes,
model decisions, learned parts, checks, constraints — and which safeguards fired. to_dict() is JSON-ready data.
Audit of a response: for each answer, what it rests on — given inputs, computed facts, quotes (with offsets and the quoted text), model decisions (model id, probabilities), learned parts, checks and constraints — and which safeguards fired (grounding rejections, typed facts that failed their type, answers outside the options, low-confidence abstentions, hard checks, constraint repairs, fallbacks). Also a summary: how much of the answer's support is deterministic and how much comes from models.
AnswerAudit
dataclass
¶
AnswerAudit(question: str, answer: object, status: str, confidence: float, provenance: str | None, source: str | None, why: str, given: list = list(), computed: list = list(), quoted: list = list(), decided: list = list(), learned: list = list(), checks: list = list(), rule: dict | None = None, constraints: list = list(), safeguards: list = list(), not_run: list = list(), guarantee: str | None = None, counts: dict = dict(), kind: str | None = None, evidence: list = list(), extra: dict | None = None)
memory
property
¶
The memories of corrections consulted for this answer (solvi.memory): [{"name", the recorded extra["memory"]: "proposal", "action", "neighbours" — the corrected cases it rested on — "fp", ...}].
render ¶
The audit of this answer as text, in a language (solvi.i18n; default: the one it was built with, "en").
to_dict ¶
The audit of this answer as JSON-ready data (dates as ISO text, sets as sorted lists, as every to_dict()).
Audit
dataclass
¶
collect ¶
The safeguards that fired in a response → ([event], number of model outputs). An event is a dict {"kind", "fact", "detail", "questions"}.