HeadlinesBriefing favicon HeadlinesBriefing.com

Context Graph Beats Vector RAG for Multi‑Agent Memory

Towards Data Science •
×

A three‑agent pipeline built for Emi Tech Logic kept forgetting cross‑agent decisions, exposing a structural blind spot in existing memory approaches. The author benchmarked raw chat transcripts, a vector‑only Retrieval‑Augmented Generation (RAG) store, and a newly‑crafted context graph layer. All tests ran deterministically on Python 3.12, CPU‑only, with zero LLM calls. The failure surfaced when Agent_Reviewer asked about storage after twenty idle exchanges.

Results revealed a stark hierarchy: the context graph answered 88.9 % of 18 graded queries using just 26.9 tokens per question, while raw history achieved 61.1 % at 490.9 tokens and vector‑only RAG lagged at 50 % with 75.9 tokens. Two bugs appeared: stale‑fact retrieval and an entity‑matching gap. The gap stems from flat stores’ inability to join two separate facts, a failure that vector similarity cannot fix.

The author warns that the graph layer adds an extraction step—rule‑based here but LLM‑driven in production—and therefore suits systems where agents must recall decisions many turns later. Single‑turn or single‑agent tasks can stay with simple transcript passing or vector RAG. In the benchmark, the graph proved the only architecture that consistently preserved cross‑agent memory. The benchmark and code are on GitHub, letting others verify findings.