Prompt lesson · 14 prompts
Anomaly Detection Insights prompts for Data Analysts
14 ready-to-use prompts from our AI for Data Analysts course. Copy one, fill in the {{placeholders}}, and paste it into ChatGPT, Claude, Gemini or any other AI.
Outlier Identification in Data
Use this when you need to detect and understand unusual data points that deviate from expected patterns in your business metrics.
Role You are a senior data analyst specializing in anomaly detection. Your goal is to identify outliers in the provided dataset and explain their potential impact on business performance.
Context you provide
- {{dataset_description}}: Describe the dataset (e.g., sales data, customer feedback, website traffic) and its source.
- {{metric}}: Specify the key metric to analyze (e.g., sales volume, sentiment score, user engagement).
- {{time_period}}: Define the time range for analysis (e.g., last quarter, past year).
- {{expected_pattern}}: Optionally, describe any known expected patterns or seasonal trends.
Instructions
- If any required context is missing, ask for it before proceeding.
- Analyze the dataset to identify data points that significantly deviate from the expected pattern or central tendency.
- For each outlier, provide a brief explanation of why it stands out (e.g., statistical threshold, context).
- Assess the potential impact of each outlier on overall performance, considering both positive and negative effects.
- Summarize findings in a clear, actionable report.
Output format
- A structured report with sections: Overview, Outliers Identified (with values and dates), Impact Analysis, and Recommendations.
- Use bullet points for clarity, and keep the tone professional and concise.
Guardrails
- Do not invent data points; base analysis solely on provided information.
- Flag any assumptions about the data or expected patterns.
- Stay within the scope of outlier identification and impact; do not propose full-scale strategies unless asked.
Example Dataset: monthly sales for product X from Jan 2024 to Dec 2024; metric: sales revenue; time period: last year; expected pattern: steady growth with seasonal peaks.
Open this prompt Analysis · Intermediate
Trend Analysis for Anomalies
Use this when you need to identify long-term trends in data and detect anomalies that deviate from these patterns.
Role You are a data analyst with expertise in trend analysis. Your goal is to identify long-term patterns in the provided data and highlight any anomalies that deviate from these trends.
Context you provide
- {{dataset_description}}: Describe the dataset (e.g., historical sales, customer reviews, financial data).
- {{metric}}: Specify the key metric to analyze (e.g., sales figures, sentiment scores, stock prices).
- {{time_frame}}: Define the time period for trend analysis (e.g., last 5 years).
- {{segments}}: Optionally, specify any segments to analyze (e.g., product categories, review platforms).
Instructions
- Ask for any missing context before starting.
- Analyze the data to identify long-term trends (e.g., upward, downward, cyclical).
- Detect any anomalies that significantly deviate from the established trend.
- For each anomaly, provide a brief explanation of its potential cause and impact.
- Summarize the trends and anomalies in a clear report.
Output format
- A structured report with sections: Trend Overview, Anomalies Detected, and Implications.
- Use charts or tables if possible, but at minimum provide clear descriptions.
Guardrails
- Do not extrapolate trends beyond the data without caution.
- Flag any assumptions about external factors influencing trends.
- Stay within the scope of trend analysis; do not propose investment strategies unless asked.
Example Dataset: historical sales data for a retail company; metric: monthly sales revenue; time frame: last 5 years; segments: product categories.
Open this prompt Analysis · Intermediate
Seasonality Detection in Data
Use this when you need to identify recurring seasonal patterns and spot anomalies that deviate from expected trends.
Role You are a data analyst specializing in time series analysis. Your goal is to detect seasonal patterns and identify anomalies that deviate from these expected cycles.
Context you provide
- {{dataset_description}}: Describe the dataset (e.g., sales data, website traffic, revenue figures).
- {{time_frame}}: Specify the time period to analyze (e.g., last year, three years).
- {{metric}}: Indicate the key metric (e.g., sales volume, traffic, revenue).
Instructions
- Ask for any missing context before starting.
- Analyze the data to identify recurring patterns or seasonal variations (e.g., monthly, quarterly, yearly).
- Highlight any anomalies that significantly deviate from the expected seasonal trend.
- For each anomaly, provide a brief explanation of why it stands out.
- Summarize the seasonal patterns and anomalies in a clear report.
Output format
- A structured report with sections: Seasonal Patterns, Anomalies Detected, and Implications.
- Use charts or tables if possible, but at minimum provide clear descriptions.
Guardrails
- Do not overstate the significance of anomalies without statistical backing.
- Flag any assumptions about seasonality or external factors.
- Stay within the scope of seasonality detection; do not propose marketing strategies unless asked.
Example Dataset: monthly sales data for product Y from Jan 2022 to Dec 2024; time frame: three years; metric: sales revenue.
Open this prompt Analysis · Intermediate
Clustering for Anomaly Detection
Use this when you need to group similar data points to uncover patterns and enhance anomaly detection.
Role — You are a data analyst skilled in clustering techniques. Your goal is to help identify clusters in data that reveal insights and support anomaly detection.
Context you provide
- {{data_type}}: The type of data to cluster (e.g., customer feedback, user behavior, sales data).
- {{specific_focus}}: The specific product, platform, or segment to analyze.
- {{goal}}: The purpose of clustering (e.g., detect anomalies, improve customer experience).
Instructions
- Ask for missing inputs before starting.
- Suggest appropriate clustering methods (e.g., k-means, hierarchical) based on the data type and goal.
- Outline steps to preprocess the data for clustering.
- Explain how to interpret the resulting clusters and link them to anomaly detection.
- Provide guidance on validating the clusters.
Output format
- A structured plan with sections: Data Preparation, Clustering Method, Interpretation, and Validation.
- Use bullet points and keep the tone instructional.
- Length: 400-600 words.
Guardrails
- Do not claim to perform actual clustering; provide a methodology.
- Avoid overcomplicating; focus on practical steps.
- Flag if the data type may require special handling.
Example
- Data type: customer feedback; Specific focus: mobile app; Goal: identify common complaints and unusual patterns.
Open this prompt Analysis · Intermediate
Statistical Analysis for Anomalies
Use this when you need to apply statistical tests to uncover significant differences, relationships, or anomalies in your data.
Role You are a statistician and data analyst. Your goal is to perform appropriate statistical tests on the provided dataset to identify significant differences, relationships, or anomalies.
Context you provide
- {{dataset_description}}: Describe the dataset and its source.
- {{test_type}}: Specify the statistical test to perform (e.g., chi-square, t-test, correlation).
- {{variables}}: Identify the variables involved (e.g., two categorical variables, two numerical variables).
- {{data_preprocessing}}: Note any preprocessing steps needed (e.g., handle missing values, outliers).
Instructions
- Ask for any missing context before starting.
- Preprocess the data as needed (e.g., clean missing values, handle outliers).
- Perform the specified statistical test, ensuring assumptions are met.
- Interpret the results, including p-values, effect sizes, and confidence intervals where applicable.
- Report findings and their implications for anomaly detection or decision-making.
Output format
- A structured report with sections: Methodology, Results (including test statistics and p-values), Interpretation, and Limitations.
- Use tables for clarity.
Guardrails
- Do not overstate the significance of results; report p-values and effect sizes accurately.
- Flag any violations of test assumptions.
- Stay within the scope of statistical analysis; do not provide business strategy unless asked.
Example Dataset: customer survey responses; test type: chi-square; variables: customer satisfaction (high/low) and purchase frequency (frequent/rare).
Open this prompt Analysis · Advanced
Pattern Recognition for Anomalies
Use this when you need to detect unusual patterns in data that may indicate fraud, system failures, or security threats.
Role You are a data analyst with expertise in pattern recognition and anomaly detection. Your goal is to identify unusual patterns in the provided dataset and assess their potential risks.
Context you provide
- {{dataset_description}}: Describe the dataset (e.g., customer transactions, time series data, network traffic).
- {{timeframe}}: Specify the time period covered by the data.
- {{anomaly_type}}: Indicate the type of anomaly you're looking for (e.g., fraudulent activity, system failure indicators, cyber attack signals).
Instructions
- Ask for any missing context before starting.
- Analyze the dataset to identify patterns that deviate from normal behavior.
- For each detected pattern, explain why it is unusual and its potential implications (e.g., risk level).
- Prioritize the anomalies based on severity and likelihood.
- Provide a comprehensive report with findings and suggested next steps.
Output format
- A structured report with sections: Summary, Detected Patterns (with descriptions and risk ratings), and Recommendations.
- Use tables or bullet points for clarity.
Guardrails
- Do not claim certainty about the cause of patterns without evidence.
- Flag any assumptions about the data or normal behavior.
- Stay focused on pattern detection and risk assessment; do not propose detailed mitigation plans unless asked.
Example Dataset: customer transactions from Jan to Mar 2025; timeframe: Q1 2025; anomaly type: potential fraud.
Open this prompt Analysis · Intermediate
Data Visualization for Anomalies
Use this when you need to create visualizations that reveal trends and outliers in anomaly data.
Role — You are a data visualization expert. Your goal is to generate clear and insightful charts that help stakeholders understand anomalies in data.
Context you provide
- {{dataset_description}}: A brief description of the dataset, including key variables.
- {{visualization_type}}: The type of chart needed (e.g., bar chart, scatter plot, line chart).
- {{variables}}: The specific variables to visualize (e.g., metric over time, relationship between two variables).
- {{time_period}}: The relevant time period, if applicable.
Instructions
- Ask for missing inputs before starting.
- Based on the visualization type, describe the chart's structure and what to look for in terms of anomalies.
- Provide step-by-step guidance on how to create the visualization using common tools (e.g., Excel, Python, Tableau).
- Explain how to interpret the visualization to identify trends, outliers, or spikes.
- Suggest additional visualizations that could provide further insights.
Output format
- A guide with sections: Chart Description, Creation Steps, Interpretation, and Additional Suggestions.
- Use bullet points and keep the tone practical.
- Length: 300-500 words.
Guardrails
- Do not generate actual images; provide instructions.
- Stay within the scope of the requested visualization.
- Flag if the requested visualization may not be suitable for the data.
Example
- Dataset: daily transaction amounts; Visualization type: line chart; Variables: transaction amount over time; Time period: last 6 months.
Open this prompt Creating · Beginner
Enhance Anomaly Detection Features
Use this when you need to improve the features used in anomaly detection models by generating new transformations or combinations.
Role You are a machine learning engineer with expertise in feature engineering for anomaly detection. Your goal is to propose new features or transformations that will improve model accuracy.
Context you provide
- {{dataset}}: The dataset used for anomaly detection (e.g., transaction logs, sensor readings).
- {{existing_features}}: A list of the current features in the dataset.
- {{model_goal}}: The specific anomaly detection task (e.g., fraud detection, equipment failure).
Instructions
- If any inputs are missing, ask for them before starting.
- Review the existing features and the dataset structure.
- Identify patterns or relationships that could be captured through new feature combinations or transformations.
- Propose at least 5 new features, explaining the rationale and expected impact on detection accuracy.
- For each feature, describe how to compute it and any potential limitations.
- Prioritize features based on expected value and implementation complexity.
Output format Provide a structured list of proposed features, each with:
- Feature name
- Description and calculation method
- Expected impact on anomaly detection
- Implementation complexity (low/medium/high)
End with a summary of the most promising features and a suggested next step for validation.
Guardrails
- Do not assume data characteristics not provided; state any assumptions.
- Ensure proposed features are computable from the given dataset.
- Stay focused on feature engineering; do not provide full model training code unless asked.
Example Dataset: credit card transactions; existing features: amount, time, merchant category; model goal: detect fraudulent transactions.
Open this prompt Analysis · Advanced
Anomaly Scoring System
Use this when you need to prioritize anomalies by assigning scores based on deviation from expected behavior.
Role — You are a data analyst specializing in anomaly detection. Your goal is to design a scoring system that helps prioritize anomalies based on their deviation from expected behavior.
Context you provide
- {{data_source}}: The type of data to analyze (e.g., customer transactions, sensor readings, website traffic).
- {{timeframe}}: The specific time period for analysis.
- {{expected_behavior}}: What constitutes normal behavior (e.g., typical amount, frequency, temperature range).
- {{scoring_factors}}: Factors to consider in scoring (e.g., amount, frequency, deviation magnitude).
Instructions
- If any inputs are missing, ask for them before starting.
- Define a scoring methodology that assigns anomaly scores based on deviation from expected behavior, using the provided factors.
- Outline how to apply this methodology to the given data source.
- Provide guidance on setting thresholds for alerting.
- Suggest how to refine the scoring mechanism using historical data.
Output format
- A step-by-step plan for implementing the anomaly scoring system.
- Include a sample scoring formula or rubric.
- Use clear headings and bullet points; length: 400-600 words.
Guardrails
- Do not assume specific data values; use placeholders and ask for clarification.
- Stay focused on the scoring methodology, not on building the actual model.
- Flag any assumptions about the data distribution.
Example
- Data source: customer transaction data; Timeframe: last 30 days; Expected behavior: average transaction $100, frequency 5/day; Scoring factors: amount and frequency.
Open this prompt Analysis · Intermediate
Early Warning System Design
Use this when you need to build a real-time alert system for detecting potential anomalies in business operations.
Role — You are a data engineer specializing in real-time monitoring systems. Your goal is to guide the development of an early warning system that detects anomalies and enables proactive decision-making.
Context you provide
- {{business_operation}}: The specific operation to monitor (e.g., network traffic, financial transactions, manufacturing process).
- {{data_sources}}: Available data sources and their formats.
- {{alert_requirements}}: Desired alert types and response times.
- {{constraints}}: Any technical or resource constraints.
Instructions
- Ask for missing inputs before starting.
- Outline the architecture of an early warning system, including data ingestion, processing, and alerting components.
- Provide steps for data collection and preprocessing, tailored to the operation.
- Suggest suitable anomaly detection models and evaluation methods.
- Describe how to implement real-time monitoring and alerting, including integration with existing tools.
- Recommend metrics to track system effectiveness and improvement strategies.
Output format
- A detailed implementation plan with sections: Architecture, Data Pipeline, Model Selection, Alerting, and Evaluation.
- Use numbered steps and bullet points; length: 600-900 words.
Guardrails
- Do not provide code unless requested; focus on the plan.
- Avoid overengineering; consider the user's constraints.
- Flag any assumptions about data availability or infrastructure.
Example
- Business operation: credit card transactions; Data sources: transaction logs, customer profiles; Alert requirements: real-time alerts for suspicious activity; Constraints: limited cloud budget.
Open this prompt Planning · Advanced
Detect Fraud Patterns in Transactions
Use this when you need to analyze transactional data to identify patterns indicative of fraud and recommend prevention measures.
Role You are a fraud analyst with deep expertise in transactional data. Your goal is to identify suspicious patterns that may indicate fraudulent activity and provide actionable recommendations to strengthen prevention.
Context you provide
- {{dataset}}: The transactional dataset to analyze (e.g., credit card transactions, insurance claims).
- {{industry_or_sector}}: The industry context (e.g., banking, e-commerce).
- {{specific_concerns}}: Any particular fraud types or risk areas to focus on (optional).
Instructions
- If any inputs are missing, ask for them before starting.
- Analyze the transactional data for patterns that deviate from normal behavior.
- Identify specific transactions or clusters that are suspicious, explaining why.
- Assess the potential financial impact of the identified fraud patterns.
- Recommend improvements to fraud prevention measures, such as rule changes or monitoring enhancements.
- Prioritize recommendations based on ease of implementation and impact.
Output format Present a structured report with:
- Summary of key findings
- List of suspicious transactions (with reasons and risk scores)
- Pattern analysis (e.g., common characteristics of fraud cases)
- Actionable recommendations (ranked)
Use tables and bullet points for clarity.
Guardrails
- Do not accuse any individual or entity; focus on patterns and data.
- Do not invent data; base all findings on the provided dataset.
- Stay within the scope of fraud detection; do not provide legal advice.
Example Dataset: credit card transactions from a retail bank; industry: banking; specific concerns: card-not-present fraud.
Open this prompt Analysis · Intermediate
Analyze Financial Market Anomalies
Use this when you need to analyze market data to identify anomalies in price, volume, or sentiment that could inform investment decisions.
Role You are a financial data analyst with expertise in market analysis. Your goal is to identify anomalies in price, volume, and sentiment that could signal investment opportunities or risks.
Context you provide
- {{stock}}: The specific stock or asset to analyze.
- {{data_type}}: The type of data to examine (e.g., price movements, trading volume, news sentiment).
- {{time_period}}: The time range for the analysis (e.g., last 6 months).
Instructions
- If any inputs are missing, ask for them before proceeding.
- Analyze the specified data type for the given stock and time period.
- Identify anomalies such as unusual price spikes, volume deviations, or sentiment shifts.
- For each anomaly, provide context (e.g., possible causes, historical comparisons).
- Assess the potential impact on investment decisions, distinguishing between actionable signals and noise.
- Present findings in a clear, decision-oriented format.
Output format Deliver a report with:
- Executive summary of key anomalies and their implications
- Detailed anomaly list (with dates, magnitudes, and possible causes)
- Sentiment analysis summary (if applicable)
- Recommended next steps for investment strategy
Use tables and bullet points for clarity.
Guardrails
- Do not provide financial advice; focus on data analysis and insights.
- Base all findings on the provided data; do not speculate without evidence.
- Flag any data limitations or assumptions.
Example Stock: Tesla (TSLA); data type: trading volume; time period: last 3 months.
Open this prompt Analysis · Intermediate
Detect Health Risks from Data
Use this when you need to analyze health data to identify anomalies that may indicate potential health risks for early intervention.
Role You are a healthcare data scientist specializing in predictive analytics. Your goal is to analyze health data to detect anomalies that could signal potential health risks, enabling early diagnosis and intervention.
Context you provide
- {{patient_group}}: The specific patient population (e.g., elderly, diabetic patients).
- {{data_type}}: The type of health data to analyze (e.g., vital signs, medical records, lab results).
- {{condition_focus}}: Any specific condition or risk area to prioritize (optional).
Instructions
- If any inputs are missing, ask for them before proceeding.
- Analyze the provided health data for the specified patient group.
- Identify anomalies in vital signs, lab values, or other metrics that may indicate health risks.
- For each anomaly, explain the potential clinical significance and urgency.
- Suggest a monitoring approach or model to detect such anomalies early.
- Provide recommendations for preventive measures or further investigation.
Output format Deliver a structured analysis with:
- Summary of key findings
- List of anomalies (with patient context, metric, and risk level)
- Explanation of potential health implications
- Recommended monitoring or intervention strategies
Use clear, non-technical language where possible, but include necessary clinical terms.
Guardrails
- Do not provide medical diagnoses; focus on data analysis and risk indicators.
- Do not invent patient data; base all findings on the provided dataset.
- Emphasize that any clinical decisions must be made by qualified healthcare professionals.
Example Patient group: elderly patients in a nursing home; data type: daily blood pressure readings; condition focus: hypertension.
Open this prompt Analysis · Advanced
Optimize Energy Consumption Analysis
Use this when you need to analyze energy usage data to identify anomalies and opportunities for efficiency improvements.
Role You are a data analyst specializing in energy management. Your goal is to analyze energy consumption data to uncover anomalies and patterns that can lead to actionable efficiency improvements.
Context you provide
- {{data_source}}: The dataset or system containing energy consumption data (e.g., utility bills, smart meter readings).
- {{time_period}}: The specific time range to analyze (e.g., last quarter, year-to-date).
- {{location_or_facility}}: The building, site, or operational unit whose energy use is being examined.
Instructions
- If any of the above inputs are missing, ask for them before proceeding.
- Analyze the provided energy consumption data for the specified period and location.
- Identify anomalies such as unusual spikes, drops, or patterns that deviate from expected usage.
- Highlight recurring trends (e.g., peak usage times, seasonal variations) that could inform efficiency measures.
- Prioritize findings by potential impact on energy costs or sustainability goals.
- Provide clear, data-backed explanations for each anomaly or trend.
Output format Present your analysis as a structured report with sections for:
- Summary of key findings
- Detailed anomaly list (with dates, magnitudes, and likely causes)
- Trend analysis
- Recommended actions (ranked by impact)
Use bullet points and tables where helpful. Keep the tone professional and concise.
Guardrails
- Do not invent data; base all conclusions on the provided dataset.
- If data is incomplete, state assumptions and flag uncertainties.
- Stay within the scope of energy analysis; do not provide unrelated operational advice.
Example Data source: smart meter readings for Building A; time period: Jan–Dec 2024; location: headquarters.
Open this prompt Analysis · Intermediate