redis / redis/agent-memory-server

docs: deduplicate=True merges distinct-but-similar records — ids are upsert keys, not merge guards

Open Beginner friendly
#309 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
316
Forks
63
Avg merge
14d 23h
Merged PRs (30d)
1

Description

Summary

create_long_term_memory(..., deduplicate=True) (the default) performs semantic deduplication that can MERGE distinct-but-similar records — and supplying distinct ids does not prevent the merge. The id acts as an upsert key (identical re-write → same id → no duplicate), not a merge guard; the merge decision is content-driven.

How it bit us

An accumulate-style store (session findings, several per day, often similar phrasing) lost records to merges despite unique ids. The only reliable guard was deduplicate=False + caller-supplied stable ids (Smart-AI-Memory/attune-ai#666).

A diagnosis caveat worth passing on: eventual indexing + the relevance cutoff in semantic search make this easy to misread in probes — counting via empty-text search until the count stabilizes was the only reliable verification method we found.

Ask

Document the dedup semantics explicitly: (a) semantic, content-driven; (b) ids don't opt a record out; (c) accumulate-style consumers should pass deduplicate=False. A per-record opt-out (or id-respecting mode) would be a nice enhancement but the doc note alone prevents the data-loss surprise.

Server + client 0.14.0, redis-stack, Ollama embeddings. Happy to PR the docs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the documentation and examples for create_long_term_memory(..., deduplicate=True), then read the surrounding guidance on ids and semantic search. Document that deduplication is content-driven, ids do not prevent merging, and accumulate-style consumers should use deduplicate=False; done means these semantics and the recommendation are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
ollama, python, redis
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.