Skip to content

fix(curation): add exact entity resolution for memory edits - #3481

Open
Sanderhoff-alt wants to merge 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/issue-3479
Open

fix(curation): add exact entity resolution for memory edits#3481
Sanderhoff-alt wants to merge 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:fix/issue-3479

Conversation

@Sanderhoff-alt

@Sanderhoff-alt Sanderhoff-alt commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Problem

update_memory uses fuzzy entity matching by default. During a manual or bulk correction, the entity name supplied by the caller can be matched to a different existing entity with a similar name. The request still succeeds, but the corrected memory is attached to the wrong entity. This is the behavior reported in #3479.

Change

Add an optional entity_resolution_mode parameter to update_memory. When the parameter is omitted or set to fuzzy, the existing fuzzy matching behavior is preserved. When it is set to exact, the resolver reuses an existing entity only when its name matches case-insensitively. A name with no exact match creates a new entity. Exact mode also disables fuzzy deduplication between entity names in the same request.

Exact mode is intended for user-authored corrections and other operations where the caller already knows which entity name should be updated. Keeping fuzzy mode as the default preserves compatibility for existing callers.

Scope

The parameter is supported by the HTTP API and MCP tool and is passed through the memory engine and entity resolver. The OpenAPI specification, generated Python, Go, and TypeScript client models, and current and 0.9 documentation have been updated. Regression tests cover similar existing entities and the curation API.

Verification

The resolver and curation tests pass (43 tests), as do the HTTP curation tests (4 tests), Python Ruff check and format check, Python ty check, OpenAPI compatibility validation, TypeScript client build, generated Python model validation, and git diff --check.

Full linting could not run because the Control Plane environment is missing @eslint/js. The documentation build could not run because its environment is missing ajv. Go client root integration tests require an API server on localhost:8888; package compilation and generated tests pass without that server. An unrelated existing client coverage check still reports the missing reflect.apply_all_directives wrapper field in Python and TypeScript.

Fixes #3479.

@Sanderhoff-alt
Sanderhoff-alt force-pushed the fix/issue-3479 branch 3 times, most recently from 93b4682 to 25c4153 Compare August 14, 2026 09:44
Issue vectorize-io#3479 exposed that update_memory can map submitted entity names to the
wrong existing entity through fuzzy scoring. This is especially risky for
bulk corrections because the call succeeds while text remains correct.

Add entity_resolution_mode to update_memory and its HTTP/MCP clients. The
default fuzzy mode preserves existing behavior. The exact mode reuses only
case-insensitive exact names and creates unmatched names without fuzzy
candidate scoring or same-batch fuzzy deduplication.

Thread the mode through the engine and resolver, cover PostgreSQL and Oracle
lookup syntax, and document exact mode for user-authored corrections.
Regenerate OpenAPI, the documentation skill, and Python, Go, and TypeScript
client artifacts.

Add resolver and curation regression tests for similar existing entities.
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.

[BUG] update_memory silently mis-resolves the entities field on ~5% of edits (text field unaffected) — no error, deterministic, not fixed by retry

1 participant