Skip to content

Help Keyword Dedup and Declutter

github-actions[bot] edited this page Aug 18, 2026 · 4 revisions

Help: Keyword Deduplication and De-Clutter

LrGeniusAI offers two complementary keyword management features to keep your Lightroom catalog clean:

  • Deduplicate Keyword Synonyms — an interactive workflow to find and merge near-duplicate or synonym keywords that already exist in your catalog.
  • Auto De-Clutter during Indexing — an automatic step inside Analyze & Index Photos that reuses existing catalog keywords instead of creating duplicates of them.

Deduplicate Keyword Synonyms

What it does

Scans your existing Lightroom keywords using AI semantic similarity to find groups of keywords that mean the same thing (e.g. Car / Automobile / Vehicle). For each group it picks one canonical name and lets you merge the others into it.

This is a catalog-modifying operation. Back up your catalog before running it.

How to run it

Library -> Plug-in Extras -> Deduplicate Keyword Synonyms...

The workflow has five steps:

Step 1 — Configuration

  • AI Model — choose which LLM validates the similarity clusters. Options: ChatGPT, Gemini, Ollama, LM Studio, and the built-in local engines (llamacpp, mlx — see Local AI Models). If no key/server/local model is configured, the task falls back to CLIP-only (no LLM validation).
  • Matching Strictness — slider from 0.70 to 0.98.
    • Lower values (0.70) produce more suggestions and may include false positives.
    • Higher values (0.98) are conservative; fewer but more certain matches.
    • Default: 0.85. Your last-used value is remembered.
  • Backup confirmation — you must tick the checkbox confirming you have a backup before you can continue.

Step 2 — Select keyword branches

A list of all top-level keywords in your catalog is shown with checkboxes. Select the branches you want to scan.

Only leaf keywords (keywords with no children) are considered for deduplication. Category keywords with sub-keywords are never touched.

Step 3 — AI clustering (background)

For each selected branch the plugin:

  1. Generates CLIP/SigLIP semantic embeddings for all leaf keyword names.
  2. Builds a similarity matrix and groups keywords using complete-linkage clustering: a keyword joins a cluster only if it is above the threshold with every existing member. This prevents false chains where A≈B and B≈C but A is unrelated to C.
  3. Optionally submits candidate clusters to the selected LLM for refinement. The LLM is instructed to:
    • Keep only true synonyms (e.g. Car / Automobile).
    • Split groups that contain related-but-distinct concepts (e.g. Cat vs Kitten).
    • Put the clearest, most common name first — this becomes the canonical name.

If the LLM call fails, the CLIP-only clusters are used as a fallback.

Step 4 — Preview and approve

A list of all proposed merge pairs is shown:

"Automobile"  →  "Car"
"Vehicle"     →  "Car"
"Pic"         →  "Photo"

Deselect any pair you want to keep separate. When satisfied, click Merge.

There is also a Sync backend checkbox (recommended on). When checked, the backend's stored metadata is updated so that semantic search and future AI operations reflect the merged keywords.

Step 5 — Execution

For each approved pair:

  1. All photos tagged with the duplicate keyword are re-tagged with the canonical keyword.
  2. The duplicate keyword tag is removed from those photos.
  3. The now-empty duplicate keyword remains in the catalog keyword list with 0 photos. To purge it, use Lightroom's built-in Metadata → Purge Unused Keywords.

A summary is shown at the end: how many keywords were merged, how many pairs were skipped, and how many backend records were updated.


Auto De-Clutter during Indexing

What it does

Enable Keyword aliases ("Reduce catalog clutter by reusing existing keywords") in the Analyze & Index dialog. The AI then returns, for each keyword, a short list of same-language aliases — words that mean exactly the same thing. Before a keyword is written to Lightroom, it is looked up against your existing keywords by its own name and by each of those aliases. On a hit, the existing keyword is reused instead of a new one being created.

This means: if your catalog already has Car and the AI generates Automobile (with Car among its aliases), the photo receives Car, not a second keyword entry.

Matching is exact (case-insensitive) on names and aliases — there is no similarity threshold and no embedding step, so it adds no latency to indexing.

When it runs

Automatically, as part of the Apply Metadata phase inside Analyze & Index Photos — no separate action needed. It only runs when new keywords are being written and the option is enabled.

How the winning keyword is chosen

Existing catalog keywords always win over newly generated ones, and an existing keyword name always wins over a synonym claim:

  1. The candidate name, then each of its aliases, is matched against existing keyword names.
  2. Only if all of those miss are the same terms matched against existing keyword synonyms.
  3. Otherwise the keyword is created.

A synonym listed by two different keywords is ambiguous and never matches — the keyword is created instead of guessing. Keywords resolved earlier in the same run join the index, so later photos in the run dedupe against them too.

Interaction with Bilingual Keywords

De-clutter decides which keyword lands on the photo; bilingual keywords make sure no term becomes unfindable. Everything that names the same concept is merged into the winning keyword's Lightroom synonym field:

  • the translations, and their aliases, when Bilingual Keywords is on
  • the generated name itself whenever de-clutter routed it to a differently-named keyword — Automobile resolving to Car writes Automobile as a synonym of Car

So a de-cluttered catalog stays searchable under every generated variant, and those synonyms feed step 2 above on later runs.

Same-language aliases are deliberately not written to the synonym field. LLMs distinguish true synonyms from hypernyms and merely co-occurring concepts unreliably, and a polluted synonym field would degrade both this feature and the interactive deduplication task. Aliases exist only to drive matching during the run.

What the validation dialog shows

The keyword validation dialog lists the generated keywords, which you can edit before confirming. De-clutter is applied afterwards, when the keywords are written to Lightroom, so the dialog does not preview the merges. To see and approve merges explicitly, use Deduplicate Keyword Synonyms above.


Tips

  • Run Deduplicate Keyword Synonyms after a large initial indexing run. A freshly indexed catalog often has synonym sprawl that is easiest to clean up in one batch before you build more keyword structure on top of it.
  • Use a higher strictness (0.90+) with LLM validation for precise taxonomies (wildlife, botany, places). Use lower strictness (0.75–0.85) with CLIP-only if you want a fast first pass and are happy to review more suggestions manually.
  • Auto de-clutter matches exact names and aliases only — no similarity threshold, so it adds no latency to indexing but also won't catch variants the AI didn't list as aliases. Run the interactive Deduplicate task afterwards to catch those semantically.
  • Back up your catalog before running the interactive deduplication. The merge step modifies keyword assignments across potentially thousands of photos and cannot be undone automatically.
  • After a merge run, use Metadata → Purge Unused Keywords in Lightroom to remove the now-empty duplicate entries from the keyword list.

Preferences persisted across runs

Preference Description
Matching Strictness Last-used slider value (0.70–0.98).
AI Model Last-selected LLM provider and model.

Clone this wiki locally