Skip to content

Blog: Entity resolution in agent memory#2424

Draft
benfrank241 wants to merge 2 commits into
mainfrom
blog/entity-resolution-agent-memory
Draft

Blog: Entity resolution in agent memory#2424
benfrank241 wants to merge 2 commits into
mainfrom
blog/entity-resolution-agent-memory

Conversation

@benfrank241

Copy link
Copy Markdown
Member

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.6 threshold, 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.py and the schema: the weights/threshold, pg_trgm candidate lookup, the entities / unit_entities / entity_cooccurrences tables, entity-link-expansion retrieval, and real edge cases (label exact-match, Turkish-İ Unicode lowercasing, ON CONFLICT races). Includes an honest "What It Doesn't Do" section.

Details

  • File: hindsight-docs/blog/2026-06-26-entity-resolution-agent-memory.md
  • ~2,060 words; two mini-stories (Sarah/Sarah Chen/"she"; two Alexes); FAQ; Further reading.
  • Internal links to /what-is-agent-memory, /articles/best-ai-agent-memory-systems, and three sibling deep-dives (hybrid search, spreading activation, memory conflicts, entity labels). External: Python difflib, PostgreSQL pg_trgm.
  • Em-dash-free prose; SEO score 93/100 (local report).

Before merge

  • Cover image: add hindsight-docs/static/img/blog/entity-resolution-agent-memory.png (placeholder for now).
  • Confirm publish date (2026-06-26).

Draft until the cover image lands.

🤖 Generated with Claude Code

Ben and others added 2 commits June 26, 2026 11:10
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant