Scale Intelligence■ Docs
Docs / Start here / The first preview, in seconds

The first preview, in seconds.

A preview runs a definition over the record before anything is spent. It runs the same predicate that the monitor will run, and it returns a count, the coverage and the population in seconds.

Figure 1Preview of a definitionspecified
DEFINITIONthe closed languagewhowhatwhenPREVIEWthe monitor's predicaterun once, in secondsRESULTevery numberwith its basiscountcoveragepopulationNEVER MEASUREDa population nobody readwhich differs from zeroThe preview runs over the record that the platform already holds, before anything is spent.flows forwardoutside, or not yet servedthe result
The preview runs the same predicate that the monitor will run, once, over the record that the platform already holds.Judge a definition by its preview before you arm it.

A strategist first asks whether a definition is any good, before asking who the leads are. The preview returns that answer in seconds. It runs over the record that the platform already holds, before you arm a monitor and before you spend anything.

Definition#

A definition is a predicate in the closed language of the platform. It states who (a population of companies or people), what (conditions on their facts and signals), and when (a window). You write a definition in the definitions studio or in the composer, or the agent writes it. The object is the same in all three places. A monitor runs a definition on every beat, and a preview runs it once.

Preview result#

part meaning
the count how many units of the population match today
the coverage how much of the population the record has read, by source and by channel, which shows whether a small count comes from few matches or from a thin record
the population the population that the preview ran over, with its size
the basis for every number, whether the platform observed it, a source stated it, a rule derived it, or the platform estimated it with an interval

The preview keeps never measured apart from empty. A population that nobody has read returns never measured, not zero. A good definition therefore does not look bad when the record is thin.

Preview call#

curl -X POST https://api.scaleintelligence.co/v1/ask/preview \
  -H "Scale-Key: $SCALE_KEY" -H "Scale-Scope: tenant/<id>/brand/<id>" \
  -H "content-type: application/json" \
  -d '{ "predicate": { "…": "the definition's tree" } }'
import { client } from "@scale/sdk";
const preview = await client.ask.preview({ predicate: tree });
// preview.body holds the count, the coverage and the population, each number with its basis.

The preview’s reference page shows the full shape of the input and of the result. The agent calls the same route when it proposes a definition, reads the yield, revises the definition and converges on it. The composer calls the same route too, so both use one implementation.

Claims#

claimstateroute or tool
The route /v1/ask/preview runs a definition over the record and returns the count, the coverage and the population.target/v1/ask/preview