Overview
Bundle sampling, steering, constraints, and verification into a reusable configuration.policy.run()
Runs generation with a policy configuration applied.
string
required
The input prompt.
dict
Inline policy configuration. Specify any combination of sampling, steering, constraints, and verification settings.
string
ID of a previously saved policy. Mutually exclusive with
policy.integer
default:"128"
Maximum tokens to generate.
boolean
default:"false"
If true, includes step-by-step trace data in the response.
output, accepted (bool), score, latency_ms, tokens, and optionally trace.
Save & Reuse
Compare & Evaluate
Test multiple policies against the same prompt to find the best configuration:Policy Structure
A policy bundles five configuration sections:Verifiers
Verifiers validate generated output and optionally repair failures by retrying. Enable them by name in theverifiers.enabled list: