Repository navigation
feat(evaluation): measure scoped recall lineage occupancy - #2125
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
hidb4ai
left a comment
There was a problem hiding this comment.
One evidence-accounting issue remains in the fixture evaluation.
| base_evidence = {source.identity for entry in base_delivered for source in entry.sources} | ||
| delivered_evidence = {source.identity for entry in delivered for source in entry.sources} |
There was a problem hiding this comment.
[P2] Include Artifact references in evidence coverage and loss
These sets only collect direct Source identities, ignoring entry.artifacts; measure_pool() has the same omission in unique_evidence_count. I reproduced this with a native SQLite replay on the pinned #2004 Runtime: two byte-identical entries have no direct Sources and cite different retained Artifact revisions. The baseline delivers both entries and the equality arm delivers one, but both report unique_evidence_count = 0 and the alternative reports lost_baseline_evidence = 0. This incorrectly reports no evidence loss when the delivered context loses an independent exact Artifact citation, undermining the coverage comparison required by #1977. Include exact scoped Artifact references, preserving family and revision, in coverage/loss accounting or report Source and Artifact metrics separately, and cover this Artifact-only case.
There was a problem hiding this comment.
Rechecked the current PR head, 25c8facd2f9525846abc581ad74ed9be87502c3f, which is unchanged from the reviewed commit. A fresh-database SQLite replay against the PR's pinned #2004 Runtime snapshot (25d9e7a7) still reproduces this: the baseline delivers 2 entries and the equality arm delivers 1, while both report unique_evidence_count = 0 and the alternative reports lost_baseline_evidence = 0, despite dropping one distinct exact Artifact citation. The P2 remains reproducible. Please account for exact scoped Artifact references in coverage and loss, or expose separate Source/Artifact metrics, with an Artifact-only regression case.
Include scoped Artifact family and revision in evidence coverage and loss. Add Artifact-only native regression fixtures and version the evidence accounting contract. Refs oceanbase#1977.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Which issue or RFC does this PR close?
Refs #1977.
Depends on #2004 for the versioned Source evidence declarations and exact historical evidence-read API required by #1975.
Rationale for this change
Atomic Memory candidate pools can be dominated by repeated representations or shared lineage. Before proposing retrieval or lifecycle changes, we need reproducible measurements that distinguish duplication from legitimate facts sharing the same evidence.
This adds a bounded evaluation that measures candidate-pool concentration and final PreparedContext fact coverage without changing production behavior.
What changes are included in this PR?
lineage-fixtureandlineage-comparecommands to the existing LongMemEval-V2 evaluation package.Are there any user-facing changes?
Two evaluation CLI commands are added.
Production ranking, Memory writes, lifecycle state, citations, public HTTP/MCP schemas, Runtime events, and PreparedContext delivery behavior are unchanged.
The current recommendation is no product change. Equality projection improved the concentration fixture, while lexical annotations produced 26 false-relation pairs across query samples. These bounded synthetic results do not justify production deduplication or reranking.
How was this change tested?
Validation used the exact evidence-capable Runtime snapshot from #2004:
25d9e7a7d3514a7110761c472f0efb947b2e5826git diff --checkpassed.Test commands:
python -m pytest -c evaluation/pyproject.toml evaluation/memory/longmemeval_v2/tests -qruff check evaluation/memory/longmemeval_v2/src evaluation/memory/longmemeval_v2/testsruff format --check evaluation/memory/longmemeval_v2/src evaluation/memory/longmemeval_v2/testsLimitations:
not_run.AI usage statement
OpenAI Codex assisted with implementation, fixture design, regression tests, documentation, and validation.