# Train and Generate

**Model Training:**

1. By default the model will sample "10000" rows of the real data to train the configured model. Increasing this number can improve quality of results but may also increase training time.
2. Select a root table for projects with multiple tables.  This should be your most central fact table in your model.
3. After clicking "Train Model" please allow some time for the model to be generated. Depending on the amount of data being used to train the model this can run for a few minutes to a couple of hours.
4. You may leave this page while the model trains (and even start or edit another model!).  All training and generation tasks run in the background.
5. The Status should automatically update once the model has been trained.

   <figure><img src="/files/Tcoi7gWQCPaLpkUonRL6" alt=""><figcaption></figcaption></figure>

**Data Generation:**

1. After training, the last step is to generate data. Enter the number of rows to be generated, and whether or not to overwrite any existing data in the new synthetic data table.  For projects with multiple tables, you must select the number of rows to generate for each.
2. Click "Generate Data" to generate your synthetic data and move onto the next page to view the results after a few moments! The speed of this step is also dependent on data size and model complexity.

   <figure><img src="/files/6bHlaBPRp4UDRq0wUo9b" alt=""><figcaption></figcaption></figure>
3. Once complete, you will get a notification showing the location that the new data was stored.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datamynd.ai/application-workflow/train-and-generate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
