Blog: Entity resolution in agent memory#2424
Draft
benfrank241 wants to merge 2 commits into
Draft
Conversation
Technical deep-dive on entity resolution in agent memory, grounded in Hindsight's implementation: name similarity + a co-occurrence graph + temporal recency (no embeddings/LLM for resolution), the 0.6 merge threshold, and the conservative-merge design. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…y count Reviewed entity_resolver.py + schema migrations and confirmed the weights (0.5/0.3/0.2), 0.6 threshold, SequenceMatcher, 7-day window, pg_trgm 0.15, label exact-match (GH-1558), Turkish-I unicode handling, and the three tables. Corrected 'four parallel retrieval strategies' to match the code, which describes entity-link expansion as the entity arm of hybrid retrieval. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
A technical deep-dive on entity resolution in agent memory, grounded in Hindsight's actual implementation.
Angle
Counterintuitive for 2026: Hindsight does not use embeddings or an LLM to decide whether two mentions are the same entity. It scores three cheap, debuggable signals — name similarity (0.5), co-occurrence-graph overlap (0.3), and temporal recency (0.2) — merging only above a
0.6threshold, and is deliberately conservative (prefers a duplicate over a bad merge). The co-occurrence graph is the differentiator: it disambiguates two people with the same name by who they appear next to.Grounded in
hindsight-api-slim/.../entity_resolver.pyand the schema: the weights/threshold,pg_trgmcandidate lookup, theentities/unit_entities/entity_cooccurrencestables, entity-link-expansion retrieval, and real edge cases (label exact-match, Turkish-İ Unicode lowercasing,ON CONFLICTraces). Includes an honest "What It Doesn't Do" section.Details
hindsight-docs/blog/2026-06-26-entity-resolution-agent-memory.md/what-is-agent-memory,/articles/best-ai-agent-memory-systems, and three sibling deep-dives (hybrid search, spreading activation, memory conflicts, entity labels). External: Pythondifflib, PostgreSQLpg_trgm.Before merge
hindsight-docs/static/img/blog/entity-resolution-agent-memory.png(placeholder for now).2026-06-26).Draft until the cover image lands.
🤖 Generated with Claude Code