Skip to content
NeuralRepo
Get Support

Duplicate Detection

When you save a new idea, NeuralRepo checks your existing ideas for potential duplicates using vector similarity. This keeps your repository clean without requiring you to remember every idea you have ever captured.

Duplicate detection runs automatically as part of the idea creation pipeline:

  1. A new idea is created and queued for processing.
  2. The queue worker generates an embedding using the @cf/baai/bge-m3 model.
  3. The embedding is compared against your five nearest ideas in Cloudflare Vectorize. Shelved ideas are excluded from the comparison.
  4. Any neighbour scoring above the dedup threshold (default 0.75) gets a duplicate_detections record with status pending.
  5. Any neighbour scoring above the related threshold (default 0.5) gets an automatic related relation.
yesyesIdea saved(any capture channel)Queued for processingEmbed title + body@cf/baai/bge-m3Query Vectorize:5 nearest, shelved excludedscore > 0.75?score > 0.50?Pending duplicate detectionAuto 'related' relationMerge or dismiss

Both thresholds are evaluated independently, so a pair above 0.75 clears 0.50 too: a detected duplicate is also linked with a related relation. No duplicate relation is ever created for you — that type is reserved for links you make yourself.

Detections are computed for every account. The Pro plan is what displays them: on the free plan the duplicates list returns empty, and the Duplicates view is replaced by an upgrade panel. Nothing is lost in the meantime — the backlog is recorded and appears in full the moment you upgrade.

Duplicates in the sidebar carries an amber count when pending detections exist. It opens a list of pairs with their similarity score, each offering Merge or Not a duplicate. The same pairs appear at the top of the Review queue.

Every pending detection must be resolved with one of two actions: dismiss or merge.

If the detection is a false positive — the ideas are similar but distinct — dismiss it. The detection is marked as dismissed and will not appear again.

Terminal window
POST /api/v1/ideas/duplicates/1/dismiss

If the ideas are truly duplicates, merge them. Merging folds one idea into the other and archives the loser.

Both merge paths share the same core:

  1. Bodies are concatenated — the absorbed body is appended to the kept one, separated by a --- rule.
  2. Tags are unioned — every tag from both ideas ends up on the kept idea. (The 20-tag cap is applied when you submit tags, not on merge, so a merge can leave an idea holding more than 20.)
  3. The kept idea keeps the earlier created_at of the two, so it sorts where the original did.
  4. The absorbed idea is archived — out of every list, search, and relation query, but retained in the database.

Where the two paths differ:

Resolving a detection (web, nrepo duplicate merge, API)Merging two ideas directly (nrepo merge, API)
Which idea survivesThe newer one — the idea that triggered the detectionThe one you name first (keep-id)
Which is archivedThe older existing idea it matchedThe one you name second (absorb-id)
Relations on the absorbed ideaLeft behind with the archived ideaTransferred to the kept idea
Status of the absorbed ideaArchived, status unchangedArchived and moved to shelved
Terminal window
# Resolve detection #1 from the pending list
nrepo duplicate merge 1
# Or merge two ideas directly: keep 42, absorb 58
nrepo merge 42 58

The dedup threshold controls how similar two ideas must be to trigger a duplicate detection. Adjust it in your user settings.

SettingRangeDefaultEffect
dedup_threshold0.1 - 0.90.75Higher = fewer detections, only near-exact matches
related_threshold0.1 - 0.90.50Neighbours above this get an automatic related relation

Both comparisons are strictly greater-than, and both apply only to the five nearest neighbours — raising related_threshold above dedup_threshold stops the automatic relations without stopping detection.

Terminal window
curl -X PATCH https://neuralrepo.com/api/v1/user/me \
-H "X-API-Key: nrp_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"settings_json": "{\"dedup_threshold\": 0.80}"}'