Answer a choice question over many labels (coarse-to-fine)
decide_shortlistPick one from many labels without degrading the prompt budget by shortlisting top k options before deciding.
Instructions
Pick one of many labels without degrading the prompt budget.
Laya scores every option inside a fixed token budget, so a 200-label
choice loses resolution. This embeds the state and each label, keeps the
top k, then runs the normal decision pass on those. Use it above ~40
labels, or whenever labels are long. k above the label count is a no-op
and reports shortlisted: false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Labels kept from the shortlist stage | |
| state | Yes | Context used both to shortlist and to decide | |
| choices | Yes | Choice labels as {label: when-to-pick}; may be hundreds of labels | |
| threshold | No | As in `decide` | |
| use_cache | No | Reuse an identical answer | |
| instructions | Yes | What the choice means |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grade | Yes | Overall grade; act autonomously only when this is auto_execute | |
| usage | No | ||
| cached | No | True when served from the in-process cache | |
| answers | Yes | ||
| routing | Yes | ||
| summary | Yes | ||
| contract | Yes | Directive: overall grade, per-question grades, and the reasons for them | |
| autonomous | Yes | True when every answer cleared the auto-execute bar | |
| latency_ms | Yes | Server-side inference time | |
| requires_human | Yes |