hired.candidate.base#
Open-world, provenance-first schemas for accumulated candidate knowledge.
The governing principle (see misc/docs/DESIGN.md §5): the absence of a
fact is never a negative claim. Only an explicit fact whose match_state is
CONTRADICTED asserts that the candidate lacks something. Silence is
UNKNOWN — a prompt to ask, not a gap.
Every Fact carries Provenance. When a provenance quote is
drawn from a text source it MUST be a verbatim substring of that source — an
anti-hallucination invariant enforced at extraction time.
Functions
|
A filesystem-safe, extension-less key from an arbitrary label. |
Classes
|
Calibrated confidence in a claim (qualitative, not a raw probability). |
|
One atomic claim about a candidate. |
|
Coarse category for retrieval and synopsis grouping. |
|
Whether a fact is current or has been superseded by a newer one. |
|
Three-valued epistemic state — the core of the honesty contract. |
|
Where a fact came from, with an optional verbatim supporting quote. |
|
One clarifying question asked of the candidate and their answer. |
|
Where a piece of provenance came from. |
- class hired.candidate.base.ConfidenceLevel(*values)[source]#
-
Calibrated confidence in a claim (qualitative, not a raw probability).
- class hired.candidate.base.Fact(**data)[source]#
Bases:
BaseModelOne atomic claim about a candidate.
Atomicity matters: a fact states a single thing so it can be confirmed, superseded, or cited independently.
- class hired.candidate.base.FactCategory(*values)[source]#
-
Coarse category for retrieval and synopsis grouping.
- class hired.candidate.base.FactStatus(*values)[source]#
-
Whether a fact is current or has been superseded by a newer one.
- class hired.candidate.base.MatchState(*values)[source]#
-
Three-valued epistemic state — the core of the honesty contract.
UNKNOWNis distinct fromCONTRADICTED: we have not yet looked, so we must ask rather than assume absence.
- class hired.candidate.base.Provenance(**data)[source]#
Bases:
BaseModelWhere a fact came from, with an optional verbatim supporting quote.
- class hired.candidate.base.QAEntry(**data)[source]#
Bases:
BaseModelOne clarifying question asked of the candidate and their answer.
Q&A is append-only history; the distilled, updatable projection lives in
Factrecords (linked viaderived_fact_ids).
- hired.candidate.base.slug(text)[source]#
A filesystem-safe, extension-less key from an arbitrary label.
Used to derive stable store keys from human labels (company names, subjects, briefing titles) so callers pass natural text and the store stays tidy.
- Return type:
>>> slug('Socure, Inc.') 'socure-inc' >>> slug('KYC / AML primer') 'kyc-aml-primer'