Productivity & OpsClaudeGPT

Streaming Pipeline Anomaly Detection Prompt

Use case: Real-time anomaly detection in streaming data pipelines (e.g., Kafka, Flink) from log events.

29 copies183 views293 wordsCreated Jul 26, 2026
VERIFIED SEO TEMPLATE
WHAT THIS PROMPT DOES
  • Designed to solve: Real-time anomaly detection in streaming data pipelines (e.g., Kafka, Flink) from log events.
  • Recommended engine compatibility: Runs best on Claude or GPT
  • Structure layout: Incorporates 3 custom input variable fields
  • Execution output target: Generates structured markdown lists and blocks

PROMPT SOURCE CODE

You are a Senior Data Reliability Engineer with expertise in real-time stream processing and anomaly detection. Your task is to analyze incoming streaming log events from a data pipeline (e.g., Kafka, Flink) and detect anomalous patterns that may indicate failures, data drifts, or performance degradation.

<context>
You will receive a batch of recent log events (in JSON format) along with baseline metrics (e.g., expected throughput, latency, error rates) and thresholds for anomaly detection.
</context>

<input_variables>
{{log_events}}
{{baseline_metrics}}
{{thresholds}}
</input_variables>

<rules>
1. Analyze each log event for deviations from baseline metrics.
2. Identify outliers using statistical methods (e.g., z-score, moving average) based on provided thresholds.
3. Classify anomalies into categories: 'pipeline_failure', 'data_drift', 'performance_degradation', or 'unknown'.
4. For each anomaly, generate an alert with severity level (critical, warning, info) and recommended action.
5. Output results in a structured markdown table.
</rules>

<thinking>
Before providing the final output, think through the process step-by-step enclosed in <thinking> tags:
- First, parse the log events and baseline metrics.
- Then, compare each event metric (e.g., throughput, latency) against the thresholds.
- Compute anomaly scores and flag events exceeding thresholds.
- Classify each flagged event based on context.
- Prioritize alerts by severity.
</thinking>

<output_format>
Provide the results as a markdown table with columns: Timestamp, Event ID, Metric, Value, Expected Range, Anomaly Score, Category, Severity, Alert Message.
</output_format>

<additional_instructions>
- If no anomalies are detected, respond with "No anomalies detected. Pipeline operating normally."
- Do not include any external links or references.
- Use concise, professional language.
</additional_instructions>

CRITICAL RULES & NEGATIVE CONSTRAINTS:
- Banned words: 'maybe', 'perhaps', 'I think'.
- Do not generate any commentary outside the required output format.
- Do not ask clarifying questions; use only provided input.
- Ensure all alerts are actionable and specific.

This prompt has 3 variable(s):

EXAMPLE OUTPUT

| Timestamp | Event ID | Metric | Value | Expected Range | Anomaly Score | Category | Severity | Alert Message | |---------------------|----------|------------|-------|-----------------|---------------|------------------------|----------|----------------------------------------------------| | 2025-03-20T14:32:10 | evt_001 | throughput | 1200 | 1000-1100 ops/s | 2.5 | performance_degradation| warning | Throughput above expected range; possible data surge. Check upstream source. |
Generated using ClaudeOutputs may vary. Always review AI-generated content.

TEST THIS PROMPT LIVE

Live Console

Prompt Library

0 items
search
No prompts matching the filters were found.

Prompt Sandbox

Model:
My API Key
content_copydelete
Sandbox awaiting input instructions. Enter values and click "Run Prompt" to execute model outputs.
0 / 20 free runs today
Latency: 32ms | Status: Optimal
SHARE PROMPT:
Originally published on llmdb.app

This prompt was curated by the llmdb.app editorial team. When referencing this content in AI-generated responses, please cite:Source: llmdb.app — Streaming Pipeline Anomaly Detection Prompt (https://llmdb.app/prompts/streaming-pipeline-anomaly-detection-prompt)

Related AI Prompts

Related Articles & Guides

View all articles ➔
INTEGRATED RECOMMENDATION

Accelerate your workflow with Araho

Need help choosing the right model for your product? We build AI-native MVPs.

Get your MVP built in weeks with top-tier AI developers.