Skip to content

feat(e2): write resolved relative dates into claim text and label evidence times plainly - #399

Merged
fazpu merged 1 commit into
mainfrom
feat/absolute-dates-in-claim-text
Sep 12, 2026
Merged

fazpu merged 1 commit into
mainfrom
feat/absolute-dates-in-claim-text

Conversation

@fazpu

@fazpu fazpu commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Problem

A claim such as "Joanna printed it last Friday" is not standalone: a reader must find the source's own date and compute the day. Since #158 the extractor resolved the date only into the structured claim_valid_* fields while the claim text kept the relative wording, and the agent-facing labels (asserted_at, claim_valid_from) named mechanics rather than meaning. The LoCoMo conv-42 Gemma run answered that exact question with the message date (2022-01-23) instead of the resolved day (2022-01-21).

Scope

  • E2 prompt. A relative time expression is treated exactly like a pronoun. Whenever valid-time fields are emitted for it, the same value is written into claim_text in ISO form (on 2022-01-21, in 2022, since 2019, from … to …, an instant exactly as valid_from_iso), inside attributed speech too. Unresolved wording stays as spoken; no date is guessed, so a relative phrase left in claim text is itself the signal that resolution failed.
  • D32 gate. The ISO renderings of the claim's own parsed bounds, tied to the stored precision, are exempt from the numeric rule (_own_valid_time_strings). Every other numeric token still needs a source-union match; a day written against a year-precise bound, a differently spelled date, or a date with unknown precision is rejected as before. Temporal connectives since, until, between, during join the functional allowlist.
  • Plain labels everywhere an agent reads them. Consumption skill, EvidenceResult field descriptions (flow into openapi.json and the query-space manifest), and the LoCoMo answer prompt define asserted_at as when the source made this statement and claim_valid_from/claim_valid_until as when the claim says it happened or was true, with claim_valid_kind naming which and the rule that leftover relative phrases read against asserted_at. No schema field is renamed or added.
  • Versions. Extractor generation temporal-anchor-4. LoCoMo protocol bumps to v27 (pins the extractor, the new surface-manifest hash, and the new prompt); v26 stores must be re-ingested.
  • Probe. scripts/probe_temporal_extraction.py now also checks optional claim-text fragments and runs the real _grounded_claim gate on each live claim.

Decisions

Sources inspected

src/rememberstack/workers/e2.py (prompt, gate), decisions.md D32/D41, plan/designs/e2_e3_claims_relations_design.md, benchmarks/locomo/protocol.py, src/rememberstack/core/consumption_skill.py, src/rememberstack/model/envelope.py, the 2026-09-06 T.4 smoke, and the conv-42 rescore evidence on the bench host.

Validation

  • Live T.4 smoke against pinned openai/gpt-5.6-luna: 12/12 pass, $0.006, recorded in plan/implementation_evals/temporal_extraction_t4_smoke_20260911.{md,json}. The eight 2026-09-06 cases still pass; the four new cases show the model writing on 2022-01-21, on 2023-05-07, in 2022, listing them in added_context, and the real gate accepting them, while "in the last few weeks" stays as spoken with unknown precision.
  • New unit tests: gate exemption per precision, precision mismatch rejection, unknown-precision rejection, _own_valid_time_strings mapping, prompt wording, skill and answer-prompt legends.
  • make lint, pyright src/ benchmarks/ clean. pytest src/tests: 1788 passed, 774 skipped (no PostgreSQL locally), 1 failed: test_client_sdk.py::test_sdk_pushes_lineage_metadata_to_e0 fails identically on a clean main checkout (application/octet-stream vs text/markdown), unrelated to this change.
  • Query-space manifest regenerated; its hash and the LoCoMo fingerprint re-pinned.

Limitations / follow-up

  • conv-42 has not been re-ingested under v27 yet; that is the next benchmark step to confirm the date miss is gone end to end.
  • Quarter-precision text is written as its calendar span; a Q1 2023 spelling is not accepted by the gate.
  • CONSUMPTION_SKILL_VERSION stays at 3.0.0, matching how Rename assured context operations #390 handled skill text changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A6VXxMqYkJAR1oZ3GaUsi1

Contributor License Agreement

…dence times plainly

A relative time expression ("last Friday") is context a standalone claim
must not depend on, exactly like a pronoun. The #158 rule that claim text
keeps the relative wording while the computed date lives only in the
structured valid-time fields made every reader recombine claim text with
separately labelled timestamps; the LoCoMo conv-42 run answered "printed it
last Friday" with the message date instead of the resolved day.

- E2 prompt: whenever valid-time fields are emitted for a relative
  expression, the same value is written into claim_text in ISO form (on
  2022-01-21, in 2022, since 2019, from ... to ..., an instant exactly as
  valid_from_iso), inside attributed speech too; unresolved wording stays
  as spoken and no date is guessed.
- D32 gate: the ISO renderings of the claim's own parsed bounds, tied to the
  stored precision, are exempt from the numeric rule; every other numeric
  token still needs a source-union match. Temporal connectives since,
  until, between, during join the functional allowlist.
- Agent-facing labels: the consumption skill, the EvidenceResult field
  descriptions (OpenAPI and query-space manifest), and the LoCoMo answer
  prompt define asserted_at as "when the source made this statement" and
  claim_valid_from/until as "when the claim says it happened or was true",
  with claim_valid_kind naming which.
- Extractor generation temporal-anchor-4; LoCoMo protocol v27 pins it, the
  new manifest hash, and the new prompt.
- Probe script also checks claim text and runs the real grounding gate;
  12/12 live cases pass (plan/implementation_evals/..._20260911.md).
- decisions.md D41/D32 amendments, e2_e3 design, docs site pages.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6VXxMqYkJAR1oZ3GaUsi1
@fazpu
fazpu merged commit a394303 into main Sep 12, 2026
15 of 17 checks passed
@fazpu
fazpu deleted the feat/absolute-dates-in-claim-text branch September 12, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant