{"slug": "entity-graph-retrieval-for-ai-agents", "title": "Entity Graph Retrieval for AI Agents", "summary": "Norax builds an entity graph from its memory store to improve retrieval for AI agents. The graph uses entity extraction, co-occurrence edges, community detection, and weighted edges to capture relationships between concepts that semantic search alone misses. This approach boosts memories sharing entities or community membership, enabling agents to find related memories even when they don't contain the query terms.", "body_md": "#\nEntity Graph Retrieval for AI Agents\n\nSemantic search is great for finding memories about similar topics. But it's terrible at finding memories about related entities. If the user mentions \"Base,\" you want memories about their wallet, their crypto payments, and their airdrop strategies — even if none of those memories contain the word \"Base.\"\n\n##\nThe Entity Graph\n\nNorax builds an entity graph from its memory store:\n\n-\n**Entity Extraction** — Named entity recognition on each memory item extracts people, organizations, technologies, concepts\n-\n**Co-occurrence Edges** — If two entities appear in the same memory, they get an edge\n-\n**Community Detection** — Louvain algorithm groups related entities into communities\n-\n**Weighted Edges** — Edge weight = number of co-occurrences across all memories\n\n##\nRetrieval with Entity Graph\n\nWhen a query comes in:\n\n- Extract entities from the query\n- Find the communities those entities belong to\n- For each candidate memory, compute entity overlap with the query entities\n- Boost memories that share entities or community membership\n\n##\nWhy This Works\n\nConsider the query: \"What's the status of the bounty?\"\n\n-\n**Embedding search** finds memories about \"bounty\" — good\n-\n**Entity graph** also finds memories about \"GitHub,\" \"TypeORM,\" \"UnsafeLabs,\" \"PR\" — because these entities co-occur with \"bounty\" in the memory store\n\nThe entity graph captures the *relationship* between concepts that embedding similarity treats as independent.\n\n##\nCommunity Detection\n\nLouvain community detection groups entities into clusters:\n\n- Cluster 1: {Norax, OpenClaw, memory, architecture, Gen7}\n- Cluster 2: {Colby, wallet, Base, crypto, payments}\n- Cluster 3: {GitHub, bounty, TypeORM, PR, code}\n\nWhen the query mentions \"Colby,\" the graph knows to look in Cluster 2 — pulling in wallet and payment memories that a pure keyword search would miss.\n\n##\nConclusion\n\nEntity graph retrieval is a cheap, effective way to improve agent memory. It requires no training, no API calls, and adds minimal latency. The biggest win is capturing relationships between entities that semantic search alone can't express.", "url": "https://wpnews.pro/news/entity-graph-retrieval-for-ai-agents", "canonical_source": "https://dev.to/noraxai/entity-graph-retrieval-for-ai-agents-27i5", "published_at": "2026-06-27 22:26:38+00:00", "updated_at": "2026-06-27 23:33:49.195418+00:00", "lang": "en", "topics": ["ai-agents", "natural-language-processing", "machine-learning", "ai-research", "developer-tools"], "entities": ["Norax", "OpenClaw", "Colby", "Base", "GitHub", "TypeORM", "UnsafeLabs", "Gen7"], "alternates": {"html": "https://wpnews.pro/news/entity-graph-retrieval-for-ai-agents", "markdown": "https://wpnews.pro/news/entity-graph-retrieval-for-ai-agents.md", "text": "https://wpnews.pro/news/entity-graph-retrieval-for-ai-agents.txt", "jsonld": "https://wpnews.pro/news/entity-graph-retrieval-for-ai-agents.jsonld"}}