Modules
Finds what a policy describes in a document and cites the caller's own passages behind each finding, unchanged.
Reply maps to values.
One passage a finding cites or dropped: the caller's passage, unchanged, its verdict, and the confirm answer that decided it.
A failed request: the concern it was judging (nil for a screening
window), the passages it covered, and the reason. A failed request is
never a verdict; it lands in Cite.Report.errors and nowhere else.
A judged finding: its concern and category, the verdict, the raw answers to its checks and descriptors, the passages it cites, and those its confirm dropped. Every passage it gathered is in one list or the other.
Between the rounds, no model call: the screen's scores become the findings to judge, by fixed rules. Pure. Internal.
A finding gathered for judging, before round 2 makes it a Cite.Finding:
its concern, the passages it would cite in source order, and the passage
filling each role (concerns built from factors). Internal.
Round 2, minus the client call: a gathered finding becomes one request on
its own evidence, and the reply becomes a Cite.Finding under the verdict
rules. Pure. Internal.
One unit of a Cite.Source: the caller's id, exact text, and meta.
{name} placeholders in question text, and the backticked paths they
expand to.
A policy: what the source is judged against, declared once in a module.
Compiles a policy's declarations to its Cite.Policy.Terms, the data the
rounds read, persists them on the module, and reads them back (read/1).
A Spark persister: it runs after Cite.Policy.Checks, so every
declaration it sees is valid. Internal.
A compiled check: its name, whether its roles must be distinct passages, the roles its question names, and the question. Internal.
The compile-time checks on a policy. A Spark transformer, not a verifier:
Spark reports a failed verifier as a warning, and a mistake in a policy
must stop the build. Runs before Cite.Policy.Build, so Build only ever
sees a valid policy. Internal.
One compiled concern: screened directly (detect and confirm) or built
from factors (roles and checks). Internal.
The Spark extension behind use Cite.Policy: its declarations.
Cite.Policy.Checks validates the structs they build (defined in
lib/cite/policy/dsl/entities.ex) and Cite.Policy.Build compiles them to
a policy's Cite.Policy.Terms. The describe and doc texts here are the
DSL reference in Cite.Policy's docs. Internal.
One compiled question: its type, its text with placeholders unexpanded, its optional focus, and its criteria. Internal.
A compiled role: its name, the factor that fills it, and its flags. Internal.
A policy's terms: its filters, concerns, factors, and descriptors as data,
defaults filled in, compiled from the module that declares them. What the
rounds read. Built by Cite.Policy.Build; read it with
Cite.Policy.Build.read/1. Internal.
A decision-model provider: builds a handle, then answers one wire-shaped request at a time.
TypeSafe System One over HTTP (POST /v1/systemone).
What Cite.judge/4 returns
One judging run, passed through every step of Cite.judge/4. It starts as
what the caller gave, validated once, and each step fills in its part:
round 1 fills screen, gathering fills gathered, and round 2 fills
findings. Both rounds add their errors, usages, and models.
Internal; use Cite.judge/4.
Round 1, minus the client call: every detect asked of every passage, a window of passages per request, and the replies folded into scores. Pure. Internal.
The document as the caller's list of passages. Built by Cite.source/2,
which documents as and show. Only the meta keys show names reach the
model; the rest of meta stays with the caller.
Values to request maps.
A JSON object whose key order survives encoding.