Skip to content

feat: entity linking, scene nodes, dual-trigger retrieval, and test consolidation#7

Merged
XuPeng-SH merged 4 commits intomatrixorigin:mainfrom
XuPeng-SH:dev
Mar 12, 2026
Merged

feat: entity linking, scene nodes, dual-trigger retrieval, and test consolidation#7
XuPeng-SH merged 4 commits intomatrixorigin:mainfrom
XuPeng-SH:dev

Conversation

@XuPeng-SH
Copy link
Collaborator

What type of PR is this?

  • feat (new feature)
  • fix (bug fix)
  • docs (documentation)
  • style (formatting, no code change)
  • refactor (code change that neither fixes a bug nor adds a feature)
  • perf (performance improvement)
  • test (adding or updating tests)
  • chore (maintenance, tooling)
  • build / ci (build or CI changes)

Which issue(s) this PR fixes

Fixes #

What this PR does / why we need it

Entity Linking

  • New mem_entities and mem_memory_entity_links tables for efficient entity reverse lookup
  • Entity extraction with Chinese city normalization
  • Dual-write: entity tables + graph nodes/edges atomically
  • Entity-anchored retrieval with configurable boost (default ×1.8)
  • Backfill script for migrating existing entity graph data

Scene Nodes & Opinion Evolution

  • Trust tier promotion: T4→T3→T2 with confidence thresholds
  • Opinion deltas: supporting +0.05, contradicting -0.12, quarantine 0.18
  • Three-stage reflection engine with subgraph context + opinion checking
  • Scene node consolidation edges linking to source memories
  • T2→T3 demotion logic when confidence drops

Dual Trigger Retrieval

  • BM25 fulltext search integration alongside vector search
  • Dual-trigger retriever uses both anchors for better recall
  • Integration tests for entity linking, dual trigger, and reflection

Graph Improvements

  • Enhanced entity extractor with Unicode normalization
  • Improved graph consolidation logic
  • Retry logic for pending graph sync operations

@XuPeng-SH XuPeng-SH enabled auto-merge (squash) March 12, 2026 13:11
@XuPeng-SH XuPeng-SH changed the title chore: consolidate test commands and update package name to mo-memoria feat: entity linking, scene nodes, dual-trigger retrieval, and test consolidation Mar 12, 2026
@XuPeng-SH XuPeng-SH merged commit 7d94c6c into matrixorigin:main Mar 12, 2026
6 of 7 checks passed
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.

2 participants