Skip to Content
DetectorsCustom DetectorsCustom Detectors

Custom Detectors

Custom Detectors

Custom detectors let you extend Classifyre with signals that are specific to your team, domain, or compliance requirements. You define what to detect — a business policy, a content category, an image label — and pick the method that fits the job.

Each custom detector runs one of seven detection engines, or your own Python as a code detector — plus Tag, which runs nothing at all and instead records a fact a Custom connector already knows. This page describes each and links to its configuration reference.

Detection methods

HuggingFace Transformers
Code
Manual

Quick comparison

MethodModalityML requiredBest for
GLiNER2 ExtractionTextSmall model on your CPU (zero-shot)Exact facts with their position, plus categories, without labelled data
RegexTextNoCodes, IDs, structured patterns
AI DetectorTextLLM (via provider)Nuanced classification, structured extraction
Decision DetectorTextDecision model (via provider)Yes/no, pick-one and scale questions, answered with a probability
Text ClassificationTextFine-tuned HF modelSpam, toxicity, sentiment, topic labels
Image ClassificationImageFine-tuned HF modelNSFW, content moderation, custom image categories
Object DetectionImageObject-detection HF modelBounding-box localisation, label-based severity
Code detectorAnyNo (bring your own)Checks and rules: totals, lists, co-occurrence
Tag—NoRecording a fact the source system already holds

When to use which method

Start with Regex if you have deterministic patterns — order numbers, internal codes, IBANs. No model, no latency, and the results are exact.

Use GLiNER2 Extraction when the answer is written in the text and you want the exact words back: parties, dates, amounts, product names, any concept you describe. It sorts text into categories in the same pass, runs on the scan’s own CPU, and needs no labelled data and no API key.

Use AI Detector for nuanced classification that would be hard to capture with a ruleset — risk signals, renewal intent, escalation tone, or any case where the context matters as much as the words.

Use a Decision Detector when you already know the possible answers and want a probability for each: is this a complaint, which team owns it, how urgent is it. A decision model returns numbers rather than text, so there is nothing to parse.

Use Text or Image Classification when you have a specific HuggingFace model already suited to your task. You get full control over the model checkpoint, device, and confidence threshold.

Use Object Detection when you need to locate objects in images with bounding boxes and map specific labels to severity levels.

Use a code detector when the rule is a check no pattern or model expresses: a total that must equal the sum of its parts, a name on a sanctions list, an IBAN next to a diagnosis, a metadata value past a threshold, a checksummed national ID, or scores from a model you trained yourself. You write detect(asset, ctx) in Python; it reads rows, text, bytes and metadata, and every finding carries a location and a stable identity.

Use a Tag when there is nothing to detect — the source system already knows the answer, and a classifier could only re-derive it less reliably. A Tag detector is applied from a Custom connector notebook by its key, and does not appear in a source’s detector list.

Classifyre creates semantic embeddings automatically during ingestion; they are infrastructure rather than detector findings.

Where a detector runs: scope

A custom detector is attached to a source, so by default it runs on everything the source produces. Every detector type except Tag takes a scope in its pipeline schema that narrows that. The fields are optional and combine with AND:

FieldRuns only onExample
asset_kindsassets of these kinds (record, document, page, file, table)["record"]: the derived summaries, not the documents they came from
content_typespayloads of these MIME types or prefixes["application/pdf"]
metadataassets whose metadata has these values (compared as text){"record_type": "company_profile"}
content_patternthe pages whose text matches this regular expression (case-insensitive)"free cash flow|freier cashflow"

content_pattern is checked page by page. On a 500-page annual report a language model asked about free cash flow then reads the dozen pages that use the term, not the whole report: the cost of an expensive detector follows the pages that can answer it. A payload without text (a picture, raw bytes) never matches; an invalid pattern is logged and ignored rather than switching the detector off.

{
  "type": "LLM",
  "system_prompt": "Extract the free cash flow figure the company states for its own year …",
  "scope": {
    "asset_kinds": ["document"],
    "content_pattern": "free cash flow|flux de trésorerie disponible|freier cashflow"
  }
}
Last updated on