hired.candidate.ingest#
Turn extracted atomic-fact records into persisted, provenance-bearing facts.
The intelligence of extraction (reading a CV/bio/publication and proposing
atomic claims) is supplied externally — by the hired-profile-ingest subagent
in interactive use, or an injected LLM in autonomous use. This module is the
deterministic glue: it validates those proposals into Fact objects,
enforces the provenance-quote invariant, and persists them.
A record is a lightweight dict:
{"statement": "...", "category": "skill", "tags": ["python"],
"confidence": "high", "quote": "...", "locator": "experience[1]",
"is_negation": false}
Functions
|
Build a (not-yet-persisted) |
|
Validate, quote-check, and persist fact records; return persisted ids. |
|
True if |
- hired.candidate.ingest.fact_from_record(record, *, source_kind, source_id='', subject='me')[source]#
Build a (not-yet-persisted)
Factfrom a record dict.- Return type:
- hired.candidate.ingest.ingest_facts(kb, records, *, source_kind, source_id='', source_text=None, drop_unverified_quotes=True)[source]#
Validate, quote-check, and persist fact records; return persisted ids.
When
source_textis given, each record’squoteis checked to be a verbatim substring. Unverified quotes are dropped (the fact is still kept, but without the spurious quote) unlessdrop_unverified_quotesis False, in which case aValueErroris raised — useful for strict pipelines.
- hired.candidate.ingest.verify_quote(quote, source_text)[source]#
True if
quoteis a verbatim substring ofsource_text.A
Nonequote (no quote claimed) always verifies. When no source text is available to check against, we cannot disprove it, so it verifies too — the invariant only bites when we can check.- Return type: