Skip to content

Resolving relative dates against valid_at #364

Description

@antejavor

Part of #344

Question

#361 made Date a value type: an extracted span-scoped node, related into by a temporal relation such as happened_on. But what lands in it is mostly not a date. What turns Date:'last Thursday' into something a "how many days between X and Y" question can compute on?

Measured for #361:

  • 10 of the 100 committed goldens (11% of answerable) are "how many days passed between X and Y". They need the date of the discussed event. valid_at, which The starter relation vocabulary #347 stamps from the session, is when the conversation happened, so it doesn't serve them. (The 8 "how long ago…" questions are served by valid_at alone.)
  • In Wire a constrained ontology and read the edges #350's 10 evidence sessions, date mentions are 17 relative to 6 absolute: last summer ×4, today ×4, last Thursday ×2, a few weeks ×2, recently ×2, this year. All 6 absolute mentions are May 6.
  • The value-type run in Values, not links: do entity attributes belong in the model #361 extracted 76 Date mentions, mostly weekday names (sunday ×14 from one shift table), years from an art-history digression (1927, 1940), and junk (Date:'18'). It extracted no date for either MoMA visit.

The anchor exists: the writer already knows each session's date, because that's what it stamps as valid_at.

Open:

  1. Who resolves, and when. Should the writer resolve a relative expression against valid_at at write time (deterministic, same place valid_at is stamped), or should the reader or retrieval agent do the arithmetic at query time? eval: the judge scores identical answers differently, which is what makes the passing set unstable #324 measured that the retrieval agent is non-deterministic even at temperature=0, which argues against leaving date arithmetic to it.
  2. What is resolvable. last Thursday and today resolve deterministically. last summer resolves to an interval. a few weeks and recently don't resolve at all. What does the node carry for each: a resolved date, an interval, or raw text only, and how does a reader tell them apart?
  3. Relative to which turn. A session can span hours, and a multi-session question's two dates live in two sessions with two different valid_ats. Is session granularity enough, or does resolution need the turn's own timestamp?
  4. Does a resolved date change identity? Values, not links: do entity attributes belong in the model #361 made value types span-scoped. Two spans resolving to the same calendar day stay two nodes. Is that right for Date specifically, where the resolved value is comparable across sessions?
  5. Extraction recall comes first. No date was extracted for either MoMA visit, so resolution has nothing to work on until recall improves. How much of this is really The derivation contract for LlmRecommendationStrategy #353's job (the derived vocabulary's Date description and temporal relations) rather than this ticket's?

Interacts with #347 (valid_at is the anchor), #361 (Date as a span-scoped value type), #353 (derivation emits the temporal relations), and #324 (why not to leave the arithmetic to the retrieval agent).

Activity

  1. antejavor commented on Sep 28, 2026

    @antejavor
    ContributorAuthor

    Resolution

    No relative-date resolver in v1: the event's date is its edge's valid_at, made computable. The ticket's premise, inherited from #361, didn't survive measurement.

    Facts (the 18 date questions in the committed 100 goldens, against longmemeval-s session dates)

    questions served by valid_at alone?
    8 "between X and Y" across two sessions 8/8: gold answer = difference of the two evidence sessions' dates, to the day
    2 "months since…" 2/2 at month granularity
    8 "how long ago…" 7/8 exactly (question_date − session date)
    #82, baking class ✗: the event is "yesterday" in its session (2022/03/21 → 03/20; cake 04/10): gold 21, valid_at gives 20

    Why: LongMemEval phrases every evidence event as "today"/"just" in its session (checked in each evidence turn: "I just harvested my first batch … today", "I just received my new tennis racket today"). The event date is the session date by construction. That is a benchmark artifact: nobody has measured how often a coding session says "yesterday I deployed…". What is measured is that resolution buys 1 question at ±1 day, and only if a Date node were extracted and linked to the event, which #361 got for neither MoMA visit.

    Also found:

    Decisions

    1. No resolver in v1. Date keeps raw text and stays span-scoped (Values, not links: do entity attributes belong in the model #361), so question 4 is moot. An event's date is its edge's valid_at. Date recall no longer blocks these questions (question 5), and Date stays in the fixed core for stated dates. Revisit when the coding corpus shows how often events aren't same-day.
    2. valid_at is a Memgraph temporal value, normalized by the writer rather than copied from the corpus string, so date arithmetic is a deterministic duration.between in Cypher and not LLM arithmetic (question 1's eval: the judge scores identical answers differently, which is what makes the passing set unstable #324 concern, answered by making the query computable, not by resolving at write time).
    3. valid_at is the source turn's Action.timestamp, not the session's started_at (question 3). After Chunking and the durability of constraints #352 every edge comes from exactly one turn's window, so this is free, and it is right for a resumed session days after it started. Requires inject.py to stamp each turn with the fixture's session date, or every eval valid_at is the run date. Revises The starter relation vocabulary #347's "valid_at from the session".
    4. Correction: Values, not links: do entity attributes belong in the model #361's "10 are between X and Y and need the discussed event's date, which valid_at is not — the largest unserved bucket (11%)" is wrong. valid_at serves 8 of those 10 exactly, and 2 were month-granularity. Values, not links: do entity attributes belong in the model #361 and its map line are amended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions