Skip to content

feat(memory): conflict-aware structured facts with multilingual-safe retrieval #39

Description

@luke-n-alpha

Goal

Make contradiction and supersession handling a first-class, evidence-preserving memory capability: retain original memories, derive optional structured fact candidates, connect conflicts/supersessions, and use those signals only to rerank returned memories.

Why now

The current Korean retrieval contract exposes a real failure mode: a generic RRF correction improved relevance but also increased forbidden/contradictory results (baseline: hit@1 6.3%, hit@5 56.3%, MRR .226; forbidden@1 25.0%, forbidden@5 43.8%). The candidate was reverted. This issue addresses the root cause rather than tuning another rank weight.

Constraints

  • Preserve raw source memories and their IDs; never overwrite/delete a prior memory merely because a later fact conflicts.
  • No natural-language response policy, abstention policy, or language-specific ranking constants.
  • Korean is the first validation language, but data model and retrieval policy must remain language-neutral with explicit extraction uncertainty/fallback.
  • Keep LocalAdapter behavior compatible unless an explicitly versioned metadata field or API extension is required.
  • CPU benchmark evidence only; GPU1 belongs to a different session.

Acceptance criteria

  • Write a decision/design record with alternatives, multilingual boundary, data flow, and measurable retrieval contract.
  • Add an append-only structured-fact representation that links to source memories and records extraction confidence/status.
  • Detect compatible subject/property conflicts or supersession without deleting source memories.
  • Retrieval can prefer a current compatible fact while still exposing the historical source chain.
  • Add Korean contradiction/supersession tests plus a held-out evaluation split; report both relevance and forbidden-result rates.
  • Run adversarial review and record outcome before release/push.

Initial status

Investigation and plan are in progress. Each phase will be posted as an issue comment with evidence and blockers.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions