Skip to content

AI detect and suggest tags

Settings, outputs and examples for the AI detect and AI suggest tags steps.

Both steps can ask a decision model or a language model, chosen with Method; see Decision models and language models. Like the other AI steps, they need an AI connection, some Text, an Image, or both, and open the larger editor with Configure step. Model checks, Generation settings, Server limits and Errors work as they do for classify and extract.

AI detect

Answers a yes-or-no question about an image or text, such as Is this a receipt? or Does this screenshot show a password?, and continues on one of three exits: Yes, No or Unsure. Connect a step to each exit you need, as with a Condition. An exit with nothing connected ends that path.

Load content → AI detect (Is this a receipt?) ─Yes────→ Move to Receipts
                                              ├No─────→ (nothing)
                                              └Unsure─→ Add tags: needs-review
Connection
connection required
An AI connection. With Decision model, one that offers decision models.
Question
text required
A question the content can answer with yes or no, up to 500 characters.
Minimum confidence
number
From 0.5 to 1, 0.7 by default. An answer less certain than this takes Unsure.
Method
choice
Decision model (the default) asks for the probability that the answer is yes. Language model asks a chat model for yes, no or unsure with a confidence and a reason, and works with every connection, including Ollama.
Text
text
What the question is about, such as OCR text.
Image
content
An image the question is about. Needs a model that takes images.
Additional instructions
text
Under Advanced. Such as An order confirmation counts as a receipt.

How the exit is chosen:

  • Decision model: the model gives the probability of yes. The more likely answer wins, and its probability is the confidence: 0.92 is yes with confidence 0.92, and 0.1 is no with confidence 0.9. When the confidence is below Minimum confidence, the step takes Unsure; 0.6 takes Unsure with the default of 0.7.
  • Language model: the model may answer unsure itself when the content doesn't let it tell, and it's told not to guess. A yes or no whose stated confidence is below Minimum confidence also takes Unsure. A language model's confidence is its own estimate, not a measured probability.

The run's log says which answer was more likely when the step took Unsure.

Produces: answer (yes, no or unsure, matching the exit), confidence (from 0.5 to 1), probability (the probability of yes, from a decision model; empty for language models), reason (one sentence from a language model; empty for decision models) and ai.

{ "answer": "yes", "confidence": 0.92, "probability": 0.92, "reason": null }

In a test run that doesn't allow sending content to outside services, the step sends nothing and takes Unsure with placeholder outputs.

AI suggest tags

Picks fitting tags from your tags for an image or text, and can suggest new ones when none fit. It only suggests: add an Add tags step to tag the file.

Load content → AI suggest tags → Add tags (Tags: steps.suggest.tags, Tag names: steps.suggest.newTags)

In Add tags, bind Tags to the step's tags output and, to create suggested tags, Tag names to its newTags output. Choose the value with the binding button beside each setting.

Connection
connection required
An AI connection. With Decision model, one that offers decision models.
Method
choice
Language model (the default) picks from your tags in one request, and can suggest new ones. Decision model asks about each tag you choose and gives each a probability.
Choose from
tags
The tags the model may pick. Empty offers your 500 most used tags. A decision model needs tags chosen here, up to 50, and fails with settings_invalid without them.
Most tags
number
From 1 to 10, 5 by default.
When no tag fits
choice
Language models only. Leave the file untagged (the default): the step finds no tags and matched is false. Suggest new tags: the model proposes names in newTags, only when none of the offered tags fit.
Most new tags
number
From 1 to 3, 2 by default. Shown with Suggest new tags.
Minimum probability
number
Decision models only. Tags less likely than this, from 0 to 1, aren't chosen. 0.5 by default.
Text
text
What to tag, such as OCR text or the file's name.
Image
content
An image to tag. Needs a model that takes images.
Additional instructions
text
Under Advanced. Such as Prefer one specific tag over several broad ones.

The names of the tags offered are sent to the connection with the content.

With a language model, Tessra matches the names it answers to your tags, ignoring case and a leading #, and leaves out any name that isn't one of them; the run's log lists what it left out. Suggested names are cleaned the way Add tags cleans names: spaces collapsed, a leading # removed, and names over 50 characters or with commas dropped. A suggested name that matches an existing tag is used as that tag instead. When there are no tags to offer and the step doesn't suggest new ones, it finishes without asking the model.

Produces: tags (the chosen tags, most fitting first, for Add tags' Tags), tagNames (their names, for messages and templates), newTags (suggested names, for Add tags' Tag names), matched (whether any existing tag fit), probabilities (each offered tag's probability by name, from a decision model; empty for language models) and ai.

{ "tags": [{ "id": "01a2…" }], "tagNames": ["Receipts"], "newTags": [], "matched": true, "probabilities": null }

The step never creates tags itself, so a test run shows what would be added without changing your tag list.