Skip to content

Wire temporal-retrieval-filter into live retriever / re-ranker #21

Description

@mdheller

Follow-up runtime work for the temporal fact-supersession contract landed in #20 (schema + reference filter + teeth). The contract and reference temporal_retrieve filter exist; this issue is the runtime wiring into the live retrieval path, which is out of scope for the contract PR.

Context

  • Contract: schemas/search/temporal-fact.schema.json
  • Reference filter: tools/validate_temporal_supersession.py :: temporal_retrieve(facts, entity, relation)
  • Behavior: high-recall candidate pass → suppress facts marked superseded (superseded_by/superseded_at) → most-recent (max valid_from) surviving fact per (entity, relation) is authoritative.
  • Cross-ref: prophet-workspace#76

Runtime work

  1. Project graph edges / epistemic-edge records into temporal-fact records at index time (map valid_time.from/to / temporalScope.validFrom/validTovalid_from/valid_to; carry superseded_by/superseded_at from ACR decision-ledger / epistemic-edge promotionState: superseded).
  2. Apply the supersession suppression in the retriever's high-recall pass (exclude, or hard-downrank, facts marked superseded).
  3. Apply max-valid_from-wins tie-break per (entity, relation) in the re-ranker.
  4. Keep claims_canonical_truth = false end to end; canonical authority stays with ACR / epistemic-edge.

Acceptance criteria

  • For the John-Smith→Jenna-Brown fixture running against the live retriever, the query "Who is the CEO of ABC?" returns Jenna Brown, and the superseded John-Smith fact is excluded (or ranked below all surviving facts).
  • A (entity, relation) with no supersession returns its single fact unchanged.
  • Both facts are present in the high-recall candidate set before suppression (suppression is genuine, not an indexing gap).
  • Malformed temporal records (missing valid_from, superseded_at < valid_from, valid_to < valid_from) are rejected at index time — the live path reuses/mirrors validate_temporal_supersession.py.
  • An offline eval shows temporal-answer accuracy improves vs. the semantic-only baseline on a supersession test set (report granular before/after).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions