Skip to main content
The Classify stage labels documents at query time. It supports two modes:
  • Built-in tasks (via task) — managed classifiers Mixpeek hosts for you. The first available task is nsfw, a content-safety classifier for text, image, and video. No plugin to build or deploy.
  • Custom classifiers (via feature_uri) — your own classifier model deployed as a custom extractor. The stage sends document text to your extractor’s inference endpoint and attaches predicted labels with confidence scores to each document.
Set exactly one of task or feature_uri.
Stage Category: APPLY (Enriches documents)Transformation: N documents → N documents (with classification results added). A built-in task can optionally drop documents (e.g. drop_if_unsafe), making it N → ≤N.

When to Use

When NOT to Use

Available Classification Tasks

Built-in tasks are managed classifiers Mixpeek hosts — set task and skip feature_uri entirely. This list grows over time as more built-in tasks ship. The mixpeek/content-classifier-v1 model is a CPU-only multimodal classifier: DistilBERT for text, ViT for images, and frame sampling for video — so the nsfw task runs without a GPU. By default it annotates each document with the outputs above; set drop_if_unsafe: true to filter unsafe documents out of the result set instead.
The same mixpeek/content-classifier-v1 model also powers a tenant-level upload gate: when nsfw_check_enabled is on for a shared-plane org, NSFW image, video, and text uploads are rejected at upload time. The Classify stage applies the same model at query time over search results. See Uploads.

Parameters

Plugin Contract

Your classifier plugin must accept {text: str} and return {labels: [{label: str, confidence: float}]}.
Set inference_type: "classify" in your plugin’s manifest to declare compatibility with the classify stage.

Configuration Examples

Built-in NSFW Task

The annotate example writes a result like {"nsfw_score": 0.03, "label": "safe", "is_nsfw": false} to output_field on every document. The filter example drops any document whose nsfw_score meets nsfw_threshold instead of annotating it.

Custom Classifier

Output

For a custom classifier, each document gets the predicted labels added at output_field:
For the built-in nsfw task, each document gets a safety result at output_field (unless drop_if_unsafe removed it):

Performance

Common Pipeline Patterns

Search + Classify + Filter by Label

  • Taxonomy Enrich - Predefined taxonomy classification (no custom model)
  • LLM Enrich - LLM-based enrichment and classification
  • Custom Extractors - Build and deploy custom inference models
  • Uploads - Tenant-level NSFW upload gate using the same mixpeek/content-classifier-v1 model