Graph revision#130
Open
wangyu-ustc wants to merge 7 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.