> ## Documentation Index
> Fetch the complete documentation index at: https://docs.woodwide.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Compound Insights

> Recipes for chaining Wood Wide AI tasks into clearer, multi-step analyses.

Compound insights combine two Wood Wide AI tasks so each step answers a different part of the question.

A single task can score rows, group rows, flag outliers, or summarize latent factors. A compound workflow uses the first result to choose the right subset or lens for the second task. That keeps the analysis focused: find the rows that matter, then explain them; find the groups, then inspect what is unusual inside them; predict an outcome, then segment or diagnose the records that deserve action.

## How to Read These Recipes

The recipes below use the same task names you see in the console:

| Recipe term | Wood Wide AI task |
| ----------- | ----------------- |
| `predict`   | Prediction        |
| `segment`   | Clustering        |
| `outliers`  | Anomaly Detection |
| `factors`   | Factor Analysis   |

The arrow shows the order. For example, `outliers -> factors` means: run anomaly detection first, filter to the unusual rows, then run factor analysis on that filtered dataset.

## Recipe Matrix

| Chain                 | Good recipe framing                                                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------ |
| `outliers -> factors` | Detect unusual records, then diagnose what common factors explain them.                                      |
| `outliers -> segment` | Detect unusual records, then cluster the anomalies into subtypes.                                            |
| `segment -> outliers` | Find natural groups, then identify atypical rows inside the largest or selected segment.                     |
| `segment -> factors`  | Find natural groups, then explain the underlying factors in a segment or across grouped behavior.            |
| `predict -> outliers` | Predict an outcome, then find unusual records among high-risk, predicted-positive, or confident predictions. |
| `predict -> segment`  | Predict an outcome, then segment the high-risk or high-opportunity rows.                                     |
| `predict -> factors`  | Predict an outcome, then diagnose latent factors among a predicted subset.                                   |

<Note>
  The strongest general-purpose starting point is `outliers -> factors`: first find records that do not behave like the baseline, then explain what those records have in common.
</Note>

## Recipe 1: Outliers, Then Factors

Use this when you want to turn an anomaly list into a root-cause hypothesis.

**Question it answers:** What common pattern explains the records that look unusual?

<Steps>
  <Step title="Cluster your dataset">
    Upload your dataset and run **Clustering**. Use the columns that describe behavior or structure, not the outcome you want to predict. Let the model find the natural groupings.
  </Step>

  <Step title="Run anomaly detection">
    Train an **Anomaly Detection** model on a baseline dataset, then run inference on the rows you want to inspect.
  </Step>

  <Step title="Export each cluster as a separate dataset">
    Tag each row with its cluster label, then split into separate files, one per cluster.
  </Step>

  <Step title="Train a prediction model per cluster">
    Upload each cluster file and train a **Prediction** model on each one, using the same target column across all of them.
  </Step>

  <Step title="Run inference within each segment">
    When new data arrives, assign it to a cluster first (using the clustering model), then run inference with the matching prediction model.
  </Step>

  <Step title="Filter to outliers">
    Keep rows with high anomaly scores or rows marked as anomalous. If the output is compact, use the anomalous row IDs to pull the matching records from your source data.
  </Step>

  <Step title="Run factor analysis on the outlier set">
    Upload the filtered rows and run **Factor Analysis**. The factors summarize the shared structure inside the unusual records.
  </Step>

  <Step title="Name the factor pattern">
    Look at the highest-loading columns for each factor and translate them into a business explanation.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Revenue anomaly diagnosis">
    Detect unusual account-months using ARR, expansion, contraction, churn, new bookings, and usage. Run factor analysis on the flagged months to see whether the anomaly is mostly contraction-heavy accounts, unusually low new bookings, or a churn spike in a specific motion.
  </Accordion>

  <Accordion title="Fraud investigation">
    Detect unusual transactions, then run factor analysis on the flagged set. A factor dominated by amount, transaction hour, merchant type, and geography can become a concrete fraud pattern to review.
  </Accordion>

  <Accordion title="Operations drift">
    Detect unusual fulfillment rows, then diagnose the flagged set with factors. The factor output can separate supplier delays from SKU-specific demand spikes or route-level logistics issues.
  </Accordion>
</AccordionGroup>

## Recipe 2: Outliers, Then Segment

Use this when a single anomaly bucket is too broad.

**Question it answers:** Are there different kinds of anomalies hiding inside the flagged set?

<Steps>
  <Step title="Train an anomaly detection model">
    Upload your historical data and run **Anomaly Detection**. The model learns what normal looks like across your numeric columns.
  </Step>

  <Step title="Run anomaly detection">
    Use **Anomaly Detection** to score the dataset and identify unusual rows.
  </Step>

  <Step title="Run inference and export flagged records">
    Run inference on your current data. Export only the rows with high anomaly scores; these are your outliers.
  </Step>

  <Step title="Run factor analysis on the flagged set">
    Upload the flagged records and run **Factor Analysis**. This surfaces the underlying dimensions that the anomalies have in common.
  </Step>

  <Step title="Interpret the factors">
    The factors point to which combinations of columns are driving the unusual pattern. Use this to form a hypothesis about root cause.
  </Step>

  <Step title="Create an anomaly-only dataset">
    Filter to the anomalous rows or to the top-scoring rows above your review threshold.
  </Step>

  <Step title="Run clustering on the anomaly-only dataset">
    Run **Clustering** on the filtered dataset. Each cluster becomes a subtype of anomaly.
  </Step>

  <Step title="Prioritize the anomaly subtypes">
    Compare cluster size, severity, value at risk, and operational owner. Review the subtype that combines high frequency with high impact first.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Support escalation subtypes">
    Detect unusual support tickets by handle time, reopen count, customer tier, and sentiment. Cluster the outliers into subtypes such as billing escalations, product reliability incidents, and implementation blockers.
  </Accordion>

  <Accordion title="Claims review queues">
    Detect unusual insurance claims, then cluster the flagged claims. One cluster may represent high-dollar legitimate exceptions while another represents suspicious submission patterns.
  </Accordion>
</AccordionGroup>

## Recipe 3: Segment, Then Outliers

Use this when global outlier detection is too noisy because different groups behave differently.

**Question it answers:** Which rows are unusual within a specific segment, not just unusual overall?

<Steps>
  <Step title="Run clustering">
    Run **Clustering** on the full dataset to find natural groups.
  </Step>

  <Step title="Choose a segment">
    Select the largest segment, the highest-value segment, or a segment with a clear business owner.
  </Step>

  <Step title="Run anomaly detection inside that segment">
    Filter to the selected segment and run **Anomaly Detection** on those rows.
  </Step>

  <Step title="Review within-segment anomalies">
    Treat the flagged rows as exceptions relative to their peer group. This is often more actionable than comparing them to the entire dataset.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Enterprise account exceptions">
    Segment customers by contract size, usage depth, and tenure. Inside the enterprise segment, detect accounts whose usage collapse is unusual relative to other enterprise accounts.
  </Accordion>

  <Accordion title="Manufacturing line monitoring">
    Segment machines by operating condition, then detect outliers inside the high-load segment. A temperature value that is normal globally may be abnormal for machines with similar load and runtime.
  </Accordion>
</AccordionGroup>

## Recipe 4: Segment, Then Factors

Use this when you need to explain what separates a group or what drives behavior within one group.

**Question it answers:** What latent dimensions define this segment or explain differences across segments?

<Steps>
  <Step title="Run clustering">
    Run **Clustering** and review the generated cluster labels and descriptions.
  </Step>

  <Step title="Pick the comparison frame">
    Either run factors on one selected segment or run factors separately for each segment to compare them.
  </Step>

  <Step title="Run factor analysis">
    Use **Factor Analysis** on the selected segment data or on each segment export.
  </Step>

  <Step title="Turn factors into segment language">
    Use high-loading columns to describe the underlying behavior: engagement intensity, price sensitivity, operational friction, account maturity, or another domain-specific concept.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Customer segment explanation">
    Cluster customers by usage, spend, tenure, and support history. Run factor analysis on a high-churn segment to identify whether the shared structure is low adoption, poor support experience, price pressure, or late-stage inactivity.
  </Accordion>

  <Accordion title="Portfolio behavior">
    Cluster loans by borrower profile, then run factor analysis within each cluster. The factor comparison can show whether one group is driven by utilization, another by payment timing, and another by loan structure.
  </Accordion>
</AccordionGroup>

## Recipe 5: Predict, Then Outliers

Use this when the predicted-positive or high-risk set contains records that do not fit the usual pattern.

**Question it answers:** Which high-risk or high-opportunity predictions are unusual enough to deserve manual review?

<Steps>
  <Step title="Train a prediction model on your full dataset">
    Upload your labeled data and train a **Prediction** model. This gives you a model that scores any new record.
  </Step>

  <Step title="Train and run prediction">
    Train a **Prediction** model on your labeled target, then run inference on the current rows.
  </Step>

  <Step title="Cluster your inference data">
    Upload your current (unlabeled) data and run **Clustering** to assign each record to a segment.
  </Step>

  <Step title="Run inference with the prediction model">
    Run your prediction model on the same dataset. Each record now has both a cluster label and a predicted outcome score.
  </Step>

  <Step title="Compare predicted outcomes across clusters">
    Group by cluster and look at the distribution of predicted scores. Which segments have the highest predicted churn? The highest predicted revenue? The most at-risk accounts?
  </Step>

  <Step title="Filter to a predicted subset">
    Keep high-risk rows, predicted-positive rows, high-opportunity rows, or predictions above a confidence threshold.
  </Step>

  <Step title="Run anomaly detection on that subset">
    Use **Anomaly Detection** to find unusual records inside the predicted subset.
  </Step>

  <Step title="Review exceptions before action">
    Send typical high-scoring rows into the standard workflow and route unusual high-scoring rows to investigation.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Churn saves with exceptions">
    Predict churn, filter to high-risk accounts, then detect outliers inside that group. A high-risk account with unusually high usage or recent expansion may need a different retention motion.
  </Accordion>

  <Accordion title="Credit review">
    Predict default risk, filter to likely defaults, then detect outliers. Unusual high-risk borrowers can be routed to manual underwriting instead of automated decline.
  </Accordion>
</AccordionGroup>

## Recipe 6: Predict, Then Segment

Use this when you know who to act on but need different playbooks for different groups.

**Question it answers:** What subgroups exist inside the high-risk or high-opportunity population?

<Steps>
  <Step title="Run prediction">
    Train and run a **Prediction** model for the target you care about.
  </Step>

  <Step title="Create an action subset">
    Filter to rows above a score threshold or to rows with the desired predicted class.
  </Step>

  <Step title="Cluster the action subset">
    Run **Clustering** on the filtered rows to find natural groups inside the population you plan to act on.
  </Step>

  <Step title="Assign an action per segment">
    Compare each segment's size, expected value, and defining traits. Use those differences to choose a treatment, owner, or priority.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Expansion campaigns">
    Predict expansion likelihood, filter to high-opportunity accounts, then cluster them. One segment may need a product-adoption campaign while another is ready for enterprise sales outreach.
  </Accordion>

  <Accordion title="Lead routing">
    Predict conversion, filter to high-probability leads, then segment them by firmographics and behavior. Use the segments to route leads to different sales motions.
  </Accordion>
</AccordionGroup>

## Recipe 7: Predict, Then Factors

Use this when you need to explain the structure behind a predicted subset.

**Question it answers:** What latent factors characterize the rows the model predicts as important?

<Steps>
  <Step title="Run prediction">
    Train and run a **Prediction** model on your target column.
  </Step>

  <Step title="Filter to the subset worth explaining">
    Keep predicted-positive rows, high-risk rows, high-opportunity rows, confident predictions, or surprising prediction errors if labels are available.
  </Step>

  <Step title="Run factor analysis">
    Run **Factor Analysis** on the filtered subset.
  </Step>

  <Step title="Translate factors into drivers">
    Treat the factors as a summary of what the predicted subset has in common. Use them to write a hypothesis, not as proof of causality.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="Churn driver diagnosis">
    Predict churn, filter to high-risk customers, then run factor analysis. The resulting factors can separate product inactivity, support friction, contract maturity, and price sensitivity.
  </Accordion>

  <Accordion title="Conversion opportunity diagnosis">
    Predict conversion, filter to high-probability leads, then run factor analysis. Factors may reveal whether the strongest leads share company size, engagement depth, industry, or buying-stage behavior.
  </Accordion>
</AccordionGroup>

## Choosing a Recipe

| Start with | Choose this when                                                                      | Good second step                                                                         |
| ---------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `outliers` | You do not know what is wrong yet, but you can define normal behavior.                | Use `factors` to diagnose common causes or `segment` to split anomalies into subtypes.   |
| `segment`  | Your dataset contains different populations that should not all be compared together. | Use `outliers` to find exceptions inside a group or `factors` to explain group behavior. |
| `predict`  | You have a target column and want to act on scored rows.                              | Use `outliers`, `segment`, or `factors` on the predicted subset to decide how to act.    |

## Interpretation Prompt

Use this prompt after you run any recipe:

```text theme={null}
I ran a compound Wood Wide AI workflow:

Step 1: [FIRST TASK: predict / segment / outliers]
Step 2: [SECOND TASK: segment / outliers / factors]

The business goal is:
[DESCRIBE THE DECISION YOU NEED TO MAKE]

Here is the filtered subset or grouped summary from step 1:
[PASTE SCORES, CLUSTERS, OUTLIER IDS, OR FILTER CRITERIA]

Here is the output from step 2:
[PASTE FACTORS, CLUSTER DESCRIPTIONS, OR ANOMALY RESULTS]

Please help me:
1. Explain what the two-step result means in plain business language
2. Identify the most actionable subset, segment, factor, or outlier pattern
3. Suggest 2-3 hypotheses that could explain the result
4. Recommend what I should verify before making an operational decision
```
