Skip to content

Graph revision#130

Open
wangyu-ustc wants to merge 7 commits into
mainfrom
graph_revision
Open

Graph revision#130
wangyu-ustc wants to merge 7 commits into
mainfrom
graph_revision

Conversation

@wangyu-ustc

Copy link
Copy Markdown
Collaborator

No description provided.

Jasonya and others added 4 commits June 19, 2026 02:29
v8 builds and reads identically to v7 but prunes degree-1 "singleton"
anchors after ingestion — anchors linking only one memory create no
cross-memory retrieval path (the value a graph adds over flat PG). A
deterministic A/B (temp=0) on LongMemEval-S showed pruning 3,579/5,387
anchors (-66%; node chars 1.17M -> 576K) left accuracy unchanged
(36/60 == 36/60), and search_memory fallbacks did not increase.

v8 wiring:
- route v7/v8 through the same V7GraphManager + V7Retriever
- V7GraphManager.prune_singletons() finalize pass (no-op unless v8)
- POST /memory/graph/compact + MirixClient.compact_graph()
- eval calls compact() after ingest (standalone sync httpx so it does
  not reuse the async client's event-loop-bound pool)

v7 graph slimming (also benefits v8):
- drop write-only title/source_meta_json from V7MemoryRef (-12% chars)
- anchor_canonical_key(): merge plural/case/punct anchor variants,
  numbers preserved (10 Gallons != 20 Gallons), no verb stemming

Fixes surfaced by the LongMemEval-S run:
- topic extraction crashed on multimodal list content (str + dict),
  silently emptying v7 graph retrieval (key_words='')
- LightRAG extraction timeout 60s -> 180s (large 4096-token chunks)
- eval answerer: temperature=0 + seed=42 for reproducibility
- eval check_raw_item: graceful no-op (MirixClient lacks the method)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- v7.1: rerank anchor-collected candidates by query full-text cosine (SH-Doc +4)
- v7.2: per-anchor coverage round-robin retrieval (multi-hop coverage)
- gated experiments (off by default): graph-routed search (MIRIX_GRAPH_ROUTED_SEARCH),
  hybrid wrap graph-union-flat (MIRIX_GRAPH_HYBRID_WRAP)
- evals: token-chunk raw-string (RULER/EventQA) contexts in parse_sessions
- register v7.1/v7.2 in graph_version checks (build identical to v7)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- proposition_extractor: single-call atomic-proposition extraction, replacing
  LightRAG multi-round gleaning. Captures cold peripheral facts (populations,
  roles, dates) that gleaning drops — the second-hop bridge facts multi-hop QA
  needs. ~3-8x faster (1 call vs N rounds), validated on MH-Doc extraction-loss cases.
- proposition_ingest: each proposition -> fine-grained semantic_memory + indexed
  by the existing anchor->DESCRIBED_BY->ConceptRef graph (no new node type).
- register v7.3 in graph_version checks (retrieval reads the graph like v7;
  pair with v7.1/v7.2 retrieval orthogonally).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Controlled 10-session-chunk v7 ingest (mirix_lm10). Documents:
- size scaling vs the full 114-chunk build (116 mem / 524 anchors,
  proportional; anchors-per-memory ~4.5 invariant)
- a broken-ingest pitfall: add_chunk is fully synchronous, so a run that
  finishes suspiciously fast never extracted (corrects an earlier
  "async queue didn't drain" hypothesis)
- the real graph shape: edge/degree distribution (64% singletons),
  hubs, and thematic clustering, with a rendered sub-graph figure
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