Skip to content

feat(extraction): preserve first-person negations in extraction prompt#3

Open
moralespanitz wants to merge 1 commit intomainfrom
experiment/preserve-negations-v2
Open

feat(extraction): preserve first-person negations in extraction prompt#3
moralespanitz wants to merge 1 commit intomainfrom
experiment/preserve-negations-v2

Conversation

@moralespanitz
Copy link
Copy Markdown

Summary

Adds a NEGATIVE STATEMENT PRESERVATION rule to the extraction prompt so first-person negations like "I have never used X" are stored as explicit negative facts instead of being normalized to positives or dropped silently.

Why

CR mini-slice (BEAM Sprint 2) showed extraction was silently dropping or inverting first-person negative assertions, which broke contradiction detection at the storage layer — AUDN had nothing to resolve because only the positive side ever reached the DB. n=6 baseline scored 0/6 on contradiction-resolution questions.

Validation

CR mini-slice run on commit 6b96a68 — see data/exp-cr-mini/ in atomicmemory-benchmarks:

  • Score: 0.333 (2/6 correct) — up from 0.000 baseline
  • Confirmed in stored memories: "User has never written any Flask routes…" and "User has never integrated Flask-Login…" now persist as negative facts
  • Remaining 4/6 misses are downstream issues (answer-LLM one-sidedness on retrieved facts, AUDN occasionally deleting negations) — addressed in follow-up branches

Test plan

  • CR mini-slice validates negations are stored (manual inspection of /v1/memories/list)
  • CR score improves from 0.000 → 0.333 on n=6 slice
  • npx tsc --noEmit passes
  • npm test passes (no behavioral changes to extraction call flow, only prompt text)
  • fallow --no-cache clean

BEAM CR diagnostic showed extraction was silently dropping user negative-tense
statements like 'I have never used Flask-Login'. Without these, contradiction
resolution is structurally unscoreable — only the positive side reaches storage.

Validated with retrieval inspector: target negative statement now extracted
verbatim and ranks #1 (sim=0.665) for the matching CR query.
@moralespanitz moralespanitz requested a review from ethanj as a code owner April 29, 2026 05:56
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