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

# Create & train a model

> How to train a model on your data to answer a fundraising question

Once your data is connected and mapped, you can train a model. A model learns from your **history** — past offers and responses — to predict what will happen next. You configure it once; you can then retrain it whenever your data refreshes.

<Note>
  Not sure which model to build? See [What Allyy can predict](/models/what-allyy-can-predict) for the catalogue and how to choose.
</Note>

## Before you start

<Steps>
  <Step title="Connected, mapped data">
    The model trains on mapped data inside a dataset. In particular, **gift amounts**, **timestamps** and **response types** must be mapped correctly — they define what "success" means. See [Data mapping](/processes/data_mapping).
  </Step>

  <Step title="Enough history">
    Models learn patterns from the past, so they need a reasonable history of offers and responses. The more representative the history, the better the model.
  </Step>
</Steps>

## Training a model

<Steps>
  <Step title="Create a model in your dataset">
    Open the dataset and create a new model.

    <Note icon="camera">**Screenshot to add** — the model creation screen (creating a new model inside a dataset).</Note>
  </Step>

  <Step title="Choose the question (model type)">
    Pick what the model should predict — for example **DM propensity** (who will respond to a mailing) or **expected amount** (how much they'll give). This choice sets how Allyy defines the target and which signals it builds.
  </Step>

  <Step title="Define the scope">
    Tell Allyy which records the model should learn from and predict on — for example a particular campaign type, channel, or supporter segment.
  </Step>

  <Step title="Let Allyy build the features">
    Allyy assembles the model's inputs from your data using built-in **feature recipes** — recency and frequency of giving, gift-size trends, channel history, engagement, and more. You don't compute these by hand.
  </Step>

  <Step title="Train">
    Start training. Allyy fits the model on your history, tunes it, and validates it on held-out data so the reported performance reflects unseen supporters.

    <Note icon="camera">**Screenshot to add** — training in progress and a completed training run.</Note>
  </Step>

  <Step title="Review performance">
    When training finishes, review the model's quality before using it (see below).
  </Step>
</Steps>

## Is the model any good?

After training, Allyy reports how well the model separates likely responders from unlikely ones, and how its predictions break down. The clearest read is on the **model dashboards**, which compare the model's scores against what actually happened in past campaigns.

→ See [Model evaluation dashboards](/dashboards-evaluation/index) for how to read model performance, score groups, and the profit curve.

<Tip>
  A model doesn't have to be perfect to be useful — it has to be **better than your current selection**. The dashboards show exactly how much cost you can save (or income you can gain) versus contacting everyone.
</Tip>

## Retraining

As new data arrives, retrain the model so it stays current. You can do this manually, or schedule it with a [workflow](/automation/workflows) so it always trains on fresh data before each campaign.

## Next

<CardGroup cols={2}>
  <Card title="Generate predictions" icon="wand-magic-sparkles" href="/predictions/generating-predictions">
    Apply your trained model to a population to produce scores.
  </Card>

  <Card title="Model evaluation" icon="chart-line" href="/dashboards-evaluation/index">
    Evaluate the model and see the impact of optimising your selection.
  </Card>
</CardGroup>
