A benchmarked comparison of three memory architectures for multi-agent LLM systems: raw history dump, vector-only RAG (TF-IDF), and a context graph using NetworkX. The core finding is that vector RAG fails on 'join queries' — questions requiring two separately-stated facts to be combined — scoring only 20% accuracy versus the context graph's 80%. The context graph also achieves 88.9% overall accuracy versus 61.1% for raw history and 50% for vector RAG, while using 18x fewer tokens per query than the raw dump. The post details two real bugs discovered during development (entity vocabulary mismatch and stale-fact retrieval), explains the deterministic benchmark methodology with zero LLM calls, and discusses production considerations including entity extraction costs, alias tables, and fact supersession handling.

19m read timeFrom towardsdatascience.com
Post cover image
Table of contents
TL;DRThe Problem That Made Me Build ThisWhat “Context Graph” Means HereWho This Is ForThe Three ArchitecturesBuilding a Benchmark That Doesn’t Secretly Favor the GraphArchitecture 1: Raw History DumpArchitecture 2: Vector-Only RAGArchitecture 3: The Context GraphWhat Actually Happened When I First Ran ItFinal Benchmark ResultsHow Token Cost Scales With Conversation LengthWhat I’d Flag Before Taking This to ProductionWhat the Numbers Actually SayReferencesDisclosure
614 Impressions