Build an OPC UA SCADA Anomaly Detector with Pydantic AI and Claude 4 Sonnet
Industrial control systems are evolving into software-defined architectures where continuous sensor telemetry must be analyzed in real time to prevent critical machinery failures. In this challenge, you will build an automated anomaly detection and root-cause analysis agent for OPC UA SCADA telemetry streams using Pydantic AI and Claude 4 Sonnet. Your system will validate incoming high-frequency time-series data (vibration, motor temperature, pressure, current draw), isolate anomalous operational patterns, and produce strongly typed diagnostic reports. By leveraging Pydantic AI's dependency injection and structured validation, you will construct a pipeline that guarantees valid schema outputs suitable for immediate ingestion by plant maintenance management systems.
What you are building
The core problem, expected build, and operating context for this challenge.
Build a type-safe telemetry anomaly detector and root-cause analysis agent using Pydantic AI and Claude 4 Sonnet.
How work is evaluated
Evaluates the agent's ability to ingest telemetry, detect motor anomalies, and output valid structured JSON root-cause diagnostics.
Challenge datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
schema_validation_test
Ensures output strictly adheres to the TelemetryDiagnostic Pydantic model.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
anomaly_detection_precision
Ensures anomalous readings are accurately flagged as anomalous.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
f1_score
F1 score for correctly identifying anomalous SCADA frames • target: 0.92 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Parse and process multi-channel OPC UA time-series telemetry data.
Implement structured output validation for industrial diagnostics using Pydantic AI.
Integrate Claude 4 Sonnet via Pydantic AI dependencies for context-aware root-cause analysis.
Generate automated work orders formatted for modern Computerized Maintenance Management Systems (CMMS).
Reference links and supporting material
Simulated OPC UA sensor readings for 3-phase industrial motors including vibration, surface temperature, line current, and operational speed baselines.
Challenge setup
Evaluates the agent's ability to ingest telemetry, detect motor anomalies, and output valid structured JSON root-cause diagnostics.
Challenge input
JSON containing sensor time-series data points
Pydantic AI
Provides type-safe structured output parsing and dynamic dependencies.
Claude 4 Sonnet
Offers strong reasoning over high-frequency industrial telemetry signals.
Evaluated output
Validated Pydantic AI JSON schema with severity, root_cause, and recommended_action
- Ensures output strictly adheres to the TelemetryDiagnostic Pydantic model.
- Ensures anomalous readings are accurately flagged as anomalous.
- F1 score for correctly identifying anomalous SCADA frames • target: 0.92 • range: 0-1
- Benchmark: Industrial AI Diagnostics Benchmark
- F1 Score target: 0.92
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.
View technical recipe
Configured tools
- Claude Code · Optional
- Claude Code · Optional
- Claude 4 Sonnet · Required
- Claude 4.1 Opus · Optional
Evaluation contract
- schema_validation_test · Weight 1
- anomaly_detection_precision · Weight 1
- f1_score · Weight 1
Metrics
- f1_score · Target 0.92
Benchmarks
- Industrial AI Diagnostics Benchmark
- general
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON containing sensor time-series data points
Output: Validated Pydantic AI JSON schema with severity, root_cause, and recommended_action
Execution harness: Python
Evaluation tools
- Pydantic AI · agent_framework
- Claude 4 Sonnet · llm
Recipe freeze marker
No recipe freeze time is recorded.