# generation

## dataset

Create a new dataset based on an expression. If no flags are provided, the CLI will interactively walk you through them

```
tkio generation dataset
```

<table><thead><tr><th width="154">Flags</th><th>Description</th></tr></thead><tbody><tr><td>--name</td><td>Name of dataset</td></tr><tr><td>--product</td><td>Name of product</td></tr><tr><td>--location</td><td>Google Cloud Storage URI to store data</td></tr><tr><td>--aoi</td><td>Local geojson file that determines the area to include in the dataset</td></tr><tr><td>--expression</td><td>Expression used to create each tile of the dataset</td></tr><tr><td>--date</td><td>Date of dataset (YYYY-MM-DD)</td></tr><tr><td>--tile-size</td><td>Pixel width and height of each tile</td></tr><tr><td>--crs</td><td>CRS code to use</td></tr><tr><td>--res</td><td>Resolution used to compute tiles</td></tr><tr><td>--no-data</td><td>Value to replace NaN values</td></tr><tr><td>--dtype</td><td>Data type of dataset</td></tr><tr><td>--create-doc</td><td>Create dataset config  (true/false)</td></tr><tr><td>--skip-test</td><td>Skip testing the expression (true/false)</td></tr><tr><td>--server</td><td>Server to compute dataset on (eu/au/us)</td></tr></tbody></table>

## ai-dataset

Create a randomly sampled ai dataset for use in training machine learning models. Provides matching input (x) and output (y) samples.

```
tkio generation ai-dataset
```

<table><thead><tr><th width="156">Flags</th><th>Description</th></tr></thead><tbody><tr><td>--location</td><td>Google Cloud Storage URI to store data</td></tr><tr><td>--aoi</td><td>Local geojson file that determines the area to randomly sample from</td></tr><tr><td>--expression-x</td><td>Expression used for input samples</td></tr><tr><td>--filter-x</td><td>Expression used to filter random sample (should return a bool value)</td></tr><tr><td>--filter-x-rate</td><td>Fraction of samples that the filter is applied to (0-1)</td></tr><tr><td>--expression-y</td><td>Expression used for output samples</td></tr><tr><td>--filter-y</td><td>Expression used to filter random sample (should return a bool value)</td></tr><tr><td>--filter-y-rate</td><td>Fraction of samples that the filter is applied to (0-1)</td></tr><tr><td>--samples</td><td>Number of samples to compute</td></tr><tr><td>--tile-size</td><td>Pixel height and width of each sample</td></tr><tr><td>--crs</td><td>Crs of each sample</td></tr><tr><td>--res</td><td>Resolution  used to compute each sample</td></tr><tr><td>--server</td><td>Server location (au/eu/us)</td></tr><tr><td>--start-year</td><td>Starting year of years to randomly sample from</td></tr><tr><td>--end-year</td><td>Ending year of years to randomly sample from</td></tr></tbody></table>


---

# 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://test-341.gitbook.io/terrakio/terrak.io/cli/generation.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.
