> This page is for Kumo Engine.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/sdgm/llms.txt.

# Predictive Query

> Create a predictive query on the Kumo Studio Model Training page and configure model settings before training

> **Prerelease documentation**
>
> This Kumo Studio information is prerelease and is not yet supported. Stay tuned for the Docker and Kubernetes releases.

In Kumo Studio, you write a predictive query on the **Model Training** page and train a model from it.
This page covers the steps in the UI.
To learn how to write the query itself in Predictive Query Language (PQL), see [Predictive Queries](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries).

## Creating a Predictive Query

To train a model in Kumo:

1. Navigate to **New > Model** from the side menu.

2. On the **Model Training** page, enter a **Model Name** and optional **Description**.

3. Select a **Graph** from your previously created graphs. After a graph is selected, its structure and linkages appear on the right side for reference.

4. Write your **Predictive Query (PQL)** in the text area.

**Example PQL**

```sql
PREDICT COUNT(transactions.*, 0, 30, days) = 0
FOR EACH customers.customer_id
WHERE COUNT(transactions.*, -90, 0, days) > 0
```

![Model Training page with a completed Predictive Query entered](/sdgm/_fern-files/_img/bf4df605e5c1d797879e827ec2dab37febcba5ef67fdbe962c6d30c117b6e82d.webp)

## Model Settings

Before training, you can configure **advanced model settings** to:

* Configure baseline and run mode.

* Adjust hyperparameters in the model plan.

* Modify training table generation settings.

By default, Kumo optimizes the model automatically. Use advanced settings to customize these defaults.

![](/sdgm/_fern-files/_img/3a9ec349dcb8ed792845ee20e4f0a72a9080878fe02d9ecfd4c62a05b948c7f1.webp)

## PQL Reference

The query you type in Kumo Studio uses the same PQL as the Python SDK.
These sections of [Predictive Queries](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries) cover what to write:

* [Query Structure](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries#query-structure): the shape of every query and the forms a target can take.
* [Every PQL Is Static or Temporal](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries#every-pql-is-static-or-temporal): how the target decides what Kumo trains on and scores.
* [Supported Task Types](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries#supported-task-types): the task type Kumo infers from your query, with example queries and outputs.
* [Anchor Time](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries#anchor-time): how Kumo separates known data from the future, and how to avoid data leakage.
* [Supported Clauses](/sdgm/kumo-engine/user-code-guide/train-a-model/predictive-queries#supported-clauses): every clause, aggregation, time window, operator, and filter.

For complete queries on real datasets, see [Predictive Query Examples](/sdgm/kumo-engine/get-started-with-kumo-engine/workflows-and-solutions/predictive-query-examples).