> 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.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/sdgm/_mcp/server.

# Understanding Predictive Query

## What is a Predictive Query?

A **Predictive Query** is a **declarative syntax** that defines a predictive modeling task in Kumo.
It specifies the target variable to predict and the data context for training.

Kumo uses **Predictive Query Language (PQL)**, a SQL-like syntax, to automate the ML pipeline, including feature engineering, training table generation, and model training.

## 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](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/nvidia-sdgm.docs.buildwithfern.com/352c2ccab259e4ffee103a9e85cf4aa3dda726b77c30ec3aa211cee36e3a0905/img/pq-entered.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260915%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260915T064150Z&X-Amz-Expires=604800&X-Amz-Signature=65c1161029f4af32fd802a3392e6393adf1171d48b608550ad027d8caab6de58&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## 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.

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/nvidia-sdgm.docs.buildwithfern.com/5a0e26aed5ab8015f3962879e433fc08d56fe650b0476d8338345e18c1393bca/img/model-settings.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260915%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260915T064150Z&X-Amz-Expires=604800&X-Amz-Signature=1c7243e05f05ed808e0dc2659e9e17d49dfc775b89b802c50e5c67ef4e46f9cd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)