Speranda/Lightroom AI Bridge/Docs

Knowledge base

A capable AI with no memory rediscovers your taste from scratch every session, and gets it slightly wrong every time. The knowledge base fixes that: it is where Lightroom AI Bridge keeps what it learns about how you edit and what you keep.

What the knowledge base is

A folder of short Markdown files, called cards, inside your lightroom-ai-bridge folder under kb. Cards hold photographic judgment:

  • a culling rubric (how photos earn their stars),
  • genre knowledge (portrait, landscape, street, travel, wildlife, and so on),
  • editing recipes (color grading, skin tones, crop and straighten),
  • named looks, and
  • your taste profile, the card that overrides all the others.

They are plain text. You can open, read and edit every one of them.

Why it starts empty

Taste is personal. A knowledge base full of someone else's preferences would argue with you on every photo. So Lightroom AI Bridge ships with the structure, the rules and the tools, and no cards at all. Your knowledge base starts with your first correction.

An empty knowledge base is a normal state, not an error: the agent works from general craft until it has learned something about you.

How a correction becomes knowledge

Every session runs the same loop:

  1. Recall. Before touching a photo, the agent identifies the genre and the light, and reads the cards that match.
  2. Apply. It edits or culls with those cards as its starting point, and the render has the final word.
  3. Learn. Before finishing, it writes a short lesson when something worth keeping happened: you corrected it, a starting point turned out wrong, a new recipe worked, or it noticed the same preference across several photos.

Lessons pile up. When enough have gathered, ask the agent to consolidate, and it rewrites the cards they belong to, so each card reads as if it had been written with that knowledge from the start. Cards that keep proving right are promoted from seed, to tested, to proven. Cards that turn out wrong get fixed or deleted.

Three ways to fill it

They combine well.

  1. Just work. Edit, cull, and say plainly when the agent gets it wrong. After a handful of sessions, say "consolidate the knowledge base" and your first real cards appear, written from your own history.
  2. Ask for a research seeding pass. One request is enough: "Seed my photography knowledge base. Research culling, composition, color and tone, the standard edit order, and the genres I shoot, then write the cards." These cards start as hypotheses, and practice promotes or removes them.
  3. Feed it your references. See the next section.

Whichever route you take, the taste profile can only be written by watching you work. Do not copy someone else's.

Your own references: the knowledge inbox

The knowledge folder inside lightroom-ai-bridge is an inbox. Drop in anything that carries judgment worth keeping: articles, newsletters, award-winner collections, before and after pairs, PDFs, and above all your own exported Lightroom presets, which are your taste written in numbers. Then ask the agent to ingest them.

It reads each file, works what it learned into the cards, and moves the file into knowledge/processed. Files are archived there, never deleted, so the top of the inbox always shows only what is still waiting.

Keep your knowledge base private

Your cards describe how you work, and they stay on your Mac. If you ever publish your own copy of the project, for example as a public fork on GitHub, keep your kb folder out of it: the project's .gitignore file includes three commented-out lines that do exactly that.

When you update Lightroom AI Bridge, your kb folder is kept. It is the one part of the project that cannot be downloaded again, so include it in your backups.

Useful commands

Run these from the lightroom-ai-bridge folder:

python3 bridge/kb.py stats      # card count, and whether consolidation is due
python3 bridge/kb.py index      # rebuild the one-line-per-card index
python3 bridge/kb.py validate   # check every card's format

The full rules, including the card format, are in the project's knowledge base contract.

Get help