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

# Optimizations dataset

> LayersQL Optimizations dataset reference for counting the search changes applied to your store, including redirects, intent modifiers, ranking rules, and learned relevance thresholds.

* **Label:** Optimizations
* **Description:** Actions, made by your team or by the Layers learning system, that change how search behaves.
* **Default group key:** `action_type`

Use the optimizations dataset to see how much tuning your search has received and who did it. Each row is one optimization: a semantic redirect, an intent modifier, a ranking rule, or a relevance threshold that Layers learned for a group of related queries. You can split the count between changes your team made and changes Layers applied on its own.

The **Searches Optimized** card on the default dashboard is built on this dataset.

<Note>
  Layers rebuilds this dataset once a day from the optimizations that currently exist in your store. Keep the following in mind when you read the numbers:

  * Each optimization counts once, on the date it was created. A learned relevance threshold counts on the date Layers last updated it.
  * When you delete an optimization, it drops out of every time range at the next daily refresh, including past periods.
  * Editing an optimization does not create a new row or move it to a new date.
  * Changes you make today appear after the next refresh.
</Note>

## Metrics

* **optimizations (events)**
  * Total optimization actions applied.
  * Example: COUNT\_DISTINCT(optimizations)
* **autonomous\_optimizations (events)**
  * Optimizations the Layers learning system created with no person in the loop. See `is_autonomous` for what counts as autonomous.
  * Example: COUNT\_DISTINCT(autonomous\_optimizations)

## Dimensions

* **action\_type:** The kind of optimization. One of:
  * `redirect` — A [semantic redirect](/platform/semantic-redirects) that sends matching queries to a page instead of a result list.
  * `modifier` — An [intent modifier](/engine/user-intent-processing#intent-modifiers) that promotes or demotes products when a query signals a preference, such as a color or material.
  * `ranking_rule` — A [ranking rule](/platform/ranking-relevancy#ranking-rules) that promotes, demotes, pins, filters, or sorts products for matching queries.
  * `learned_floor` — A minimum relevance score that Layers learned for a group of related queries. Products that score below it are left out of results for those queries.
* **is\_autonomous:** `true` when the Layers learning system created the optimization, `false` when a person did. Layers marks these as autonomous:

  * Redirects that Layers found by crawling your store's pages.
  * Intent modifiers that Layers mined from shopper behavior or recovered from earlier learned data.
  * Visual ranking rules.
  * Every learned relevance threshold.

  Redirects you add by hand or accept from a suggestion, intent modifiers you create, and manual ranking rules count as `false`.

This dataset does not carry shopper or session context. The [personalization dimensions](/platform/layersql/datasets#personalization-dimensions-all-datasets), geography, marketing, and `custom.*` dimensions that other datasets share do not apply here.

## Examples

Total optimizations compared to the previous period (last 30 days)

```sql theme={null}
FROM optimizations
SHOW optimizations
SINCE -30d
COMPARE TO previous_period
```

Optimizations by type (last 90 days)

```sql theme={null}
FROM optimizations
SHOW COUNT_DISTINCT(optimizations)
GROUP BY action_type
SINCE -90d
```

Autonomous versus manual optimizations by type (last 90 days)

```sql theme={null}
FROM optimizations
SHOW COUNT_DISTINCT(optimizations)
GROUP BY action_type
SEGMENT BY is_autonomous
SINCE -90d
```

Weekly trend of autonomous optimizations (this quarter)

```sql theme={null}
FROM optimizations
SHOW autonomous_optimizations
SINCE this_quarter
TIMESERIES week
```

## Next steps

* [LayersQL syntax](/platform/layersql/syntax)
* [LayersQL functions](/platform/layersql/functions)
* [Datasets overview](/platform/layersql/datasets)
* [Semantic redirects](/platform/semantic-redirects)
* [Intent modifiers](/engine/user-intent-processing#intent-modifiers)
* [Ranking rules](/platform/ranking-relevancy#ranking-rules)
