---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

What is Mixpeek?

[Back to Blog](/blog)

[](https://twitter.com/intent/tweet?text=Semantic%20Crons%3A%20Replace%20LLM%20Polling%20with%20Vector-Based%20Alerts&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fsemantic-crons-retriever-alerts)[](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fsemantic-crons-retriever-alerts&title=Semantic%20Crons%3A%20Replace%20LLM%20Polling%20with%20Vector-Based%20Alerts)[](https://www.reddit.com/submit?url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fsemantic-crons-retriever-alerts&title=Semantic%20Crons%3A%20Replace%20LLM%20Polling%20with%20Vector-Based%20Alerts)

This was originally in our newsletter.

Get Updates

Feb 12, 2026•6 min read

# Semantic Crons: Replace LLM Polling with Vector-Based Alerts

Instead of polling with an LLM on a cron schedule, Retriever Alerts evaluate semantic conditions at ingestion time. Vector math instead of inference calls. Event-driven instead of scheduled. Three API calls to set up.

![Semantic Crons: Replace LLM Polling with Vector-Based Alerts](https://blog.mixpeek.com/content/images/2026/02/ChatGPT-Image-Feb-12--2026--06_54_00-AM.png)

Infrastructure

TABLE OF CONTENTS

 Your browser does not support the video tag.

Harrison Chase [tweeted something](https://x.com/hwchase17/status/2021696693268345179?ref=blog.mixpeek.com) that caught our attention: **"semantic crons."** The idea is simple—instead of scheduling jobs on fixed intervals, you trigger them when some fuzzy, hard-to-quantify event happens in your data. Think _"when a video looks like a prior safety incident"_ or _"when a new product photo is suspiciously close to a competitor's."_

![](https://blog.mixpeek.com/content/images/2026/02/image-2.png)

The replies immediately called out the problem. One person asked Harrison directly: if you're hitting an LLM every heartbeat to check whether a natural-language condition is true, doesn't that get expensive fast? And yeah, it does. Running hundreds of LLM-powered checks on a cron schedule is a cost nightmare.

Turns out we already built this. We call them **Retriever Alerts**—and they sidestep the polling problem entirely. Instead of checking conditions on a timer, alerts evaluate at ingestion time. New data comes in, the system runs a [retriever](https://mixpeek.com/docs/retrieval/retrievers?ref=blog.mixpeek.com) (our word for a multi-stage search pipeline) against it, and if something matches, a [webhook](https://mixpeek.com/docs/operations/webhooks?ref=blog.mixpeek.com) fires. No cron. No idle LLM calls. You only pay for work that matters.

## How It Fits Together

If you've used Mixpeek before, alerts are just a thin layer connecting two things you already have: retrievers and webhooks. Here's the flow every time a new object gets ingested:

Object ingested into collection Feature extraction embeddings · faces · OCR · audio Taxonomy enrichment classification labels applied Cluster assignment Alert evaluation retriever runs vector search against new doc If results → webhook fires matches · scores · metadata → your endpoint

The ordering matters. Alerts run _last_, after taxonomy and cluster enrichment. That means your alert conditions can reference classification labels, cluster IDs, and any other enriched fields—not just raw embeddings. You can express something like _"alert me when a video is classified as `unsafe` AND it falls into the `anomaly` cluster"_ and it just works.

## Three API Calls to Set It Up

The whole thing is three steps. Let's walk through a real-time anomaly detection scenario: flagging newly uploaded videos that look like known safety incidents.

### 1\. Define the Semantic Condition (Retriever)

The retriever is where your "fuzzy condition" lives. It defines what to search for: which collection to compare against, what similarity threshold counts as a match, how many results to return. All the vector search logic is here.

```python
from mixpeek import Mixpeek

client = Mixpeek(api_key="YOUR_API_KEY")

retriever = client.retrievers.create(
    namespace="ns_production",
    name="safety-incident-matcher",
    stages=[
        {
            "type": "feature_search",
            "config": {
                "collection_ids": ["col_known_incidents"],
                "vector_index_name": "multimodal_extractor_v1_embedding",
                "query": "{{INPUT.query_embedding}}",
                "min_score": 0.85,
                "top_k": 5
            }
        },
        {
            "type": "attribute_filter",
            "config": {
                "filters": {
                    "and": [
                        {"field": "_internal.metadata.modality", "operator": "eq", "value": "video"}
                    ]
                }
            }
        }
    ]
)
```

That `min_score: 0.85` is doing the heavy lifting. It's the semantic threshold—the retriever only returns results when the similarity search finds something genuinely close to your known incidents. No LLM needed to decide whether something "looks dangerous."

### 2\. Create the Alert

The alert itself is just notification config. It points at a retriever and says "when this returns results, ping these endpoints." Clean separation—the alert has no idea what embeddings are or how similarity search works.

```python
alert = client.alerts.create(
    namespace="ns_production",
    name="Safety Incident Detector",
    description="Flags new videos that match known safety incidents",
    retriever_id=retriever.retriever_id,
    notification_config={
        "channels": [
            {
                "channel_type": "webhook",
                "config": {
                    "url": "https://hooks.yourcompany.com/safety-alerts",
                    "headers": {"X-Alert-Secret": "your-shared-secret"}
                }
            }
        ],
        "include_matches": True,
        "include_scores": True
    }
)
```

### 3\. Wire It to Your Collection

Last step: attach the alert to the collection where new content lands. The `input_mappings` tell the system which document field to feed into the retriever as the query embedding.

## Run this on your own content

Point Mixpeek at the storage you already have and search your video, images, audio, and documents the way this post describes. Build starts at $25/mo for up to 1M vectors.

[Search your own files](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=blog_onramp_mid&utm_campaign=mvs_onramp)[Talk to us](/demo)

```python
client.collections.update(
    collection_id="col_incoming_videos",
    namespace="ns_production",
    alert_applications=[
        {
            "alert_id": alert.alert_id,
            "execution_mode": "on_ingest",
            "input_mappings": [
                {
                    "input_key": "query_embedding",
                    "source": {
                        "source_type": "document_field",
                        "path": "multimodal_extractor_v1_embedding"
                    }
                }
            ],
            "execution_phase": "alert",
            "priority": 100
        }
    ]
)
```

That's it. From now on, every video that gets processed through this collection automatically runs through the safety similarity search. If there's a match, you get a webhook.

## What the Webhook Payload Looks Like

When a match fires, here's what hits your endpoint:

```json
{
    "alert_id": "alt_safety_001",
    "alert_name": "Safety Incident Detector",
    "collection_id": "col_incoming_videos",
    "namespace_id": "ns_production",
    "triggered_at": "2026-02-12T14:30:00Z",
    "source_documents": [
        {
            "document_id": "doc_new_upload_92f3",
            "asset_id": "asset_video_8271"
        }
    ],
    "match_count": 2,
    "matches": [
        {
            "document_id": "doc_known_incident_17",
            "score": 0.92,
            "metadata": {"incident_type": "forklift_collision", "severity": "high"}
        },
        {
            "document_id": "doc_known_incident_42",
            "score": 0.87,
            "metadata": {"incident_type": "ppe_violation", "severity": "medium"}
        }
    ],
    "retriever_id": "ret_safety_search"
}
```

You get the source document, every match with its similarity score, and whatever metadata was on the matched documents. Enough context to route, triage, or escalate without making another API call.

Here's a quick Flask handler that forwards alerts to Slack:

```python
from flask import Flask, request, jsonify
import requests as http

app = Flask(__name__)
SLACK_WEBHOOK = "https://hooks.slack.com/services/T00/B00/xxx"

@app.route("/safety-alerts", methods=["POST"])
def handle_alert():
    payload = request.json
    top = payload["matches"][0]

    http.post(SLACK_WEBHOOK, json={"text": (
        f":rotating_light: *{payload['alert_name']}*\n"
        f"Matched {payload['match_count']} known incident(s)\n"
        f"Closest: `{top['metadata']['incident_type']}` "
        f"(score: {top['score']:.2f})\n"
        f"Doc: `{payload['source_documents'][0]['document_id']}`"
    )})

    return jsonify({"status": "ok"}), 200
```

## Why This Works Better Than LLM Polling

Back to Harrison's thread. The core tension with semantic crons is cost: you want fuzzy, meaning-based triggers, but running an LLM against every condition on every tick is expensive and slow. Here's why the retriever alert approach avoids that:

**It's event-driven, not scheduled.** Alerts only fire when new data actually arrives. No ticking clock, no wasted compute during quiet periods. This is the same event driven architecture pattern that makes webhooks preferable to polling—applied to AI monitoring instead of CRUD notifications.

**The "fuzzy matching" is vector math.** A similarity search across an embedding index runs in single-digit milliseconds. Compare that to an LLM call that takes 1-3 seconds and costs real money per invocation. You get the semantic matching without the inference cost.

**Structured filters come free.** Because alerts run after taxonomy enrichment, you can combine vector similarity with hard attribute filters. "Similar to known incidents _and_ classified as high-severity" is two filter stages in a retriever—no LLM needed to interpret the condition.

**Conditions and notifications are decoupled.** Want to tighten the similarity threshold? Edit the retriever. Want to add a Slack channel? Edit the alert. They don't know about each other. This matters when you're managing dozens of alert conditions across different teams.

## Other Things You Can Do With This

### Content Moderation at Ingest

If you're running a platform with user-generated content, you probably have a corpus of previously removed posts. Attach an alert that runs a similarity search against that corpus every time a new upload is processed. Anything that's semantically close to removed content gets flagged for review before it goes live.

```python
alert = client.alerts.create(
    namespace="ns_ugc_platform",
    name="Content Policy Violation Detector",
    retriever_id="ret_removed_content_matcher",
    notification_config={
        "channels": [
            {"channel_type": "webhook", "config": {"url": "https://mod.internal/review-queue"}},
            {"channel_type": "slack", "channel_id": "sl_trust_safety"}
        ],
        "include_matches": True
    }
)
```

This works for video moderation, image moderation, or text—the retriever handles any modality that Mixpeek extracts embeddings for.

### Visual Competitive Intel

Index your competitor's product catalog into a collection. Then set up an alert on your own product ingestion pipeline. Every time your team uploads a new product image, the system automatically checks whether it's visually similar to anything in the competitor collection. Good for catching accidental design overlap or tracking how close your products are trending to theirs.

```python
alert = client.alerts.create(
    namespace="ns_catalog",
    name="Competitor Visual Similarity Alert",
    retriever_id="ret_competitor_image_match",
    notification_config={
        "channels": [{"channel_type": "webhook", "config": {"url": "https://hooks.yourco.com/product-intel"}}],
        "include_matches": True,
        "include_scores": True
    }
)
```

### Combining Vector Search with Taxonomy Labels

This is where it gets interesting. Since alerts run after enrichment, you can build retrievers that mix similarity search with classification outputs. For example, a content moderation retriever that only fires when the document is both visually similar to flagged content _and_ the taxonomy classified it as explicit:

```python
retriever = client.retrievers.create(
    namespace="ns_ugc_platform",
    name="explicit-content-similarity-check",
    stages=[
        {
            "type": "feature_search",
            "config": {
                "collection_ids": ["col_flagged_content"],
                "vector_index_name": "multimodal_extractor_v1_embedding",
                "query": "{{INPUT.query_embedding}}",
                "min_score": 0.80,
                "top_k": 3
            }
        },
        {
            "type": "attribute_filter",
            "config": {
                "filters": {
                    "and": [
                        {"field": "taxonomy_content_policy_label", "operator": "eq", "value": "explicit"}
                    ]
                }
            }
        }
    ]
)
```

Two signals, zero LLM calls at alert time. The taxonomy was already computed during enrichment, the vector search is just math.

## Checking What Fired

Every execution gets logged, whether or not it triggered. Useful for tuning thresholds or debugging why an alert didn't fire when you expected it to.

```python
executions = client.alerts.list_executions(
    alert_id="alt_safety_001",
    namespace="ns_production",
    limit=20
)

for ex in executions:
    print(f"{ex.executed_at} | triggered={ex.triggered} | matches={ex.match_count}")
```

```bash
# Same thing via cURL
curl -sS "https://api.mixpeek.com/v1/alerts/alt_safety_001/executions?limit=10" \
  -H "Authorization: Bearer $MP_API_KEY" \
  -H "X-Namespace: ns_production"
```

See the full [execution history API](https://mixpeek.com/docs/api-reference/alerts/list-alert-executions?ref=blog.mixpeek.com) for filtering and pagination options.

## Try It

The whole setup is three API calls:

1.  [Create a retriever](https://mixpeek.com/docs/api-reference/retrievers/create-retriever?ref=blog.mixpeek.com) with your semantic condition
2.  [Create an alert](https://mixpeek.com/docs/api-reference/alerts/create-alert?ref=blog.mixpeek.com) pointing at that retriever
3.  [Attach it to a collection](https://mixpeek.com/docs/api-reference/collections/update-collection?ref=blog.mixpeek.com) with input mappings

If you're already doing cron-based checks or scheduled LLM evaluations against your data, this replaces all of that with something cheaper and faster. And if you've been thinking about building semantic triggers but haven't started because the LLM cost math didn't work—now it does.

[Alerts API reference](https://mixpeek.com/docs/api-reference/alerts/create-alert?ref=blog.mixpeek.com) · [Webhooks guide](https://mixpeek.com/docs/operations/webhooks?ref=blog.mixpeek.com) · [Retrievers overview](https://mixpeek.com/docs/retrieval/retrievers?ref=blog.mixpeek.com)

[ES

Ethan Steininger

Former lead of MongoDB's Search Team, Ethan noticed the most common problem customers faced was building indexing and search infrastructure on their S3 buckets. Mixpeek was born.



](/blog/authors/ethan)

## Run this on your own content

Point Mixpeek at the storage you already have and search your video, images, audio, and documents the way this post describes. Build starts at $25/mo for up to 1M vectors.

[Search your own files](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=blog_onramp_end&utm_campaign=mvs_onramp)[Talk to us](/demo)

## Continue Learning

[

![How Mixpeek runs distributed multimodal ML on Ray: architecture, patterns, and production lessons](https://blog.mixpeek.com/content/images/2026/02/ray-blog-feature.png)

### How Mixpeek runs distributed multimodal ML on Ray: architecture, patterns, and production lessons

We run 20+ ML models in parallel across video, image, and document pipelines. Here's the Ray architecture behind it -- custom resource isolation, flexible actor pools, distributed Qdrant writes, and the lessons we learned the hard way.

Read More





](/blog/ray-distributed-ml-pipeline-architecture)[

![What is Agentic Retrieval? The Next Evolution of RAG](https://mixpeek.com/og-image.png)

### What is Agentic Retrieval? The Next Evolution of RAG

How agentic retrieval goes beyond traditional RAG by letting AI agents dynamically plan and execute multi-step search strategies with tool calling.

Read More





](/blog/what-is-agentic-retrieval)

### Author

ES

Ethan Steininger

![Mixpeek Icon](/brand/logo-dark-icon.webp)

#### Multimodal Search, On Demand

Index, retrieve, and reason over videos, images, audio, and docs, all from a single API.

[Start Building](/start)

### Share

[](https://twitter.com/intent/tweet?text=Semantic%20Crons%3A%20Replace%20LLM%20Polling%20with%20Vector-Based%20Alerts&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fsemantic-crons-retriever-alerts)[](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fsemantic-crons-retriever-alerts&title=Semantic%20Crons%3A%20Replace%20LLM%20Polling%20with%20Vector-Based%20Alerts)[](https://www.reddit.com/submit?url=https%3A%2F%2Fmixpeek.com%2Fblog%2Fsemantic-crons-retriever-alerts&title=Semantic%20Crons%3A%20Replace%20LLM%20Polling%20with%20Vector-Based%20Alerts)