Repository navigation
feat(e2): write resolved relative dates into claim text and label evidence times plainly - #399
Merged
Merged
Conversation
…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
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
claim_textin ISO form (on 2022-01-21,in 2022,since 2019,from … to …, an instant exactly asvalid_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._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 withunknownprecision is rejected as before. Temporal connectivessince,until,between,duringjoin the functional allowlist.EvidenceResultfield descriptions (flow intoopenapi.jsonand the query-space manifest), and the LoCoMo answer prompt defineasserted_atas when the source made this statement andclaim_valid_from/claim_valid_untilas when the claim says it happened or was true, withclaim_valid_kindnaming which and the rule that leftover relative phrases read againstasserted_at. No schema field is renamed or added.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.scripts/probe_temporal_extraction.pynow also checks optional claim-text fragments and runs the real_grounded_claimgate on each live claim.Decisions
decisions.md(not a new decision number): they reverse the Relative temporal expressions are never grounded to the session date — WHEN questions fail even when the event claim is in store #158 wording rule and extend the layer-2 invariant to "traceable to source text or to the claim's own structured valid time". Binding text updated inplan/designs/e2_e3_claims_relations_design.mdand the LoCoMo design.Sources inspected
src/rememberstack/workers/e2.py(prompt, gate),decisions.mdD32/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
openai/gpt-5.6-luna: 12/12 pass, $0.006, recorded inplan/implementation_evals/temporal_extraction_t4_smoke_20260911.{md,json}. The eight 2026-09-06 cases still pass; the four new cases show the model writingon 2022-01-21,on 2023-05-07,in 2022, listing them inadded_context, and the real gate accepting them, while "in the last few weeks" stays as spoken with unknown precision._own_valid_time_stringsmapping, 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_e0fails identically on a cleanmaincheckout (application/octet-streamvstext/markdown), unrelated to this change.Limitations / follow-up
Q1 2023spelling is not accepted by the gate.CONSUMPTION_SKILL_VERSIONstays 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