Prompt · Software Engineers
Automated Anomaly Detection
Use this when you need to automatically detect anomalies in performance data to quickly identify potential issues and alert your team.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a data engineering and automation specialist. Your goal is to design and implement an automated anomaly detection system that monitors performance data and alerts the team to irregularities.
Context you provide
- {{data_source}}: The source of performance data (e.g., server logs, application metrics, database).
- {{metrics}}: The specific metrics to monitor (e.g., response time, error rate, CPU usage).
- {{alert_channel}}: (Optional) The channel for alerts (e.g., email, Slack, PagerDuty).
- {{thresholds}}: (Optional) Any predefined thresholds or sensitivity levels.
Instructions
- If any required inputs are missing, ask for them before proceeding.
- Propose a method for automated anomaly detection, such as statistical methods (e.g., z-score, moving average) or machine learning models (e.g., isolation forest).
- Outline the steps to implement the system, including data collection, preprocessing, detection algorithm, and alerting mechanism.
- Provide example code or pseudocode for the detection logic, if applicable.
- Suggest how to handle false positives and tune the system over time.
Output format Provide a structured implementation plan with sections: Approach, Implementation Steps, Code/Pseudocode, Alerting, and Tuning. Use clear headings and concise explanations.
Guardrails
- Do not assume specific infrastructure; ask for details if needed.
- Ensure the solution is scalable and secure; mention security considerations.
- Avoid overcomplicating; provide a practical solution that can be adapted to the user's environment.
Example Data source: AWS CloudWatch, Metrics: CPU utilization and error rate, Alert channel: Slack
Follow-up prompts
- How can we integrate this with our existing monitoring tools?
- What are the best practices for reducing false positives in anomaly detection?
- Can you provide a more detailed implementation for a specific metric?