solvi.core.deciders.wire¶
What the scorer sees: items, passes, prompts, logits, the pointer's spans.
Part of solvi.core.deciders, which re-exports every name; import from there.
What the scorer sees: items, passes, prompts, logits, the pointer's spans and evidence. (Part of solvi.core.deciders, which re-exports every name.)
Item
dataclass
¶
Item(task: str, options: tuple, descriptions: tuple | None, text: str, multi: bool = False, kind: str = '', pointer: bool = False, unknown: bool = False, max_len: int = 0)
One question to score: the scorer returns one logit (or a row of logits, one column per mode) per option, or {"logits": ..., "act": logit} when it has an act head.
Pass
dataclass
¶
Several questions about one input, scored in one forward pass (checkpoints with multi-question support).
Logits ¶
Bases: ndarray
A question's logits [K] with an answer-primitives checkpoint's extra outputs: unknown (the "not stated" logit) and pointer
(decoded: {"null": p(null span), "spans": [(p, start, end, text)]}, most probable first) — and from a scorer that
can fail on one question (solvi.core.deciders.llm): escalate (why the output is not usable: the decision escalates with it),
transient (not cached: ask again next time) and info (recorded in the decision's extra).
prompt ¶
A question's segment: "[mode] task[opt] option ..." (an option with a description is "label: description").
pass_prompt ¶
The first segment of a pass: the questions' segments joined by a space.
decode_pointer ¶
The pointer's raw output → {"null", "spans"}: a span's score is start_i + end_j over the input's tokens i ≤ j <
i + max_span, the null span's start_m + end_m at the mode marker; p = softmax over the null span and every span
(exactly span_dist of the training code). A span's text is the input's characters from token i's
start to token j's end, without surrounding whitespace — so it is literally in the input. ptr: {"start": [T],
"end": [T], "offsets": [(char start, char end)] per token, "null": [start_m, end_m] (or their sum)}. temperature
(the checkpoint's temperature.span) divides every start / end score, the null span's too, before the softmax — as
the answer-primitives calibration fitted it.
pointer_evidence ¶
Evidence quotes from a decoded pointer: greedily up to max_spans non-overlapping spans with p ≥ threshold; none
when the null span is at least as probable as the best span (the answer-primitives contract's evidence).