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

# Human Review

> Pause the run for selective field confirmation or correction, then continue with the reviewed data.

`control.human_review`: Pause the run for selective field confirmation or correction, then continue with the reviewed data.

Use this step after extraction or transformation when a human must confirm or
correct specific fields before the run continues. Place it as a **top-level
sequential step** only — nested placement inside other control containers is
rejected at publish time.

```yaml theme={null}
- name: review-invoice
  type: control.human_review
  with:
    data: '{{ steps.extract.output }}'
    metadataFrom: ai.extract
    instructions: Confirm vendor and total before posting.
    selection:
      mode: confidence
      threshold: medium
      missingConfidence: review
      fields:
        /vendor:
          review: always
        /total:
          threshold: high
    files:
      includeRunInputs: true
```

When `metadataFrom: ai.extract` is set and `data` references the whole extract
output, the step strips the reserved `_grounding` key, derives categorical
confidence (`low`, `medium`, `high`) per field from nested dotted-path
grounding, and reuses the extract schema when `schema` is omitted.

When `data` is exactly `{{ steps.<extract-step>.output }}`, Eigenpal also
snapshots any lineage and ParsedDocument sidecars the extract step produced.
Studio loads them for the review workspace: source PDFs/images beside the
structured output, spatial citation highlights on supported fields, and bbox
overlays when a canonical ParsedDocument is available. Missing or unreadable
sidecars are skipped — review still works from `_grounding` alone. Review
decisions are not yet written back into lineage.

When a `transform.script` sits between the extract and the review (`ai.extract`
then `transform.script` then `control.human_review`), the review still shows
field boxes if the script keeps the extract's field paths: `data` is
`{{ steps.<script-step>.output }}`, the script receives the whole
`{{ steps.<extract-step>.output }}` as one of its `inputs`, and every reviewed
field path also exists in that extract output. Correcting values is fine;
renaming or moving fields is not. When the script reshapes the data, name the
extract step explicitly with `lineageFrom`. Boxes then appear on the reviewed
fields whose paths still match the extract output.

```yaml theme={null}
- name: normalize
  type: transform.script
  with:
    inputs:
      extracted: '{{ steps.extract.output }}'
    function: |
      function script(extracted: { vendor: string; total: number }): { supplier: { name: string }; total: number } {
        return { supplier: { name: extracted.vendor.trim() }, total: extracted.total };
      }

- name: review-invoice
  type: control.human_review
  with:
    data: '{{ steps.normalize.output }}'
    lineageFrom: extract
    selection:
      mode: all
```

The human review API includes optional `lineage` and `parsedDocument` on task
detail when sidecars resolve; they are API-only context, not workflow output.

**Selection modes:** `confidence` reviews fields below a threshold;
`explicit` reviews paths matched by include/exclude; `all` reviews every scalar
leaf. Thresholds accept numeric `0`–`1` or categorical `low|medium|high`.
Per-path overrides live under `selection.fields` with `review:
always|never|skip` and optional per-field `threshold`.

**Selectors:** pointers address scalar leaves, not containers. For an array of
strings named `reasons`, use `/reasons/*` (all items) or `/reasons/0` (one item),
not `/reasons`. For nested objects, select a leaf such as `/client/name`.
`include`, `exclude` and `selection.fields` follow the same rule. Validation
rejects selectors that a known review schema proves cannot reach a scalar,
including schemas inferred through `metadataFrom: ai.extract`. Dynamic or
unresolved schemas are checked at runtime; even a valid array selector can
match no fields when that array is empty.

**Evaluations:** evaluation runs always simulate review and never pause. Assert
routing and simulated edits with `review` fixtures in dataset `meta.json` — see
[Build a dataset](https://docs.eigenpal.com/guides/build-a-dataset.md).

## Configuration

Configuration goes inside the step's `with:` block.

**data** `string | record\<string, unknown\> | array\<unknown\>` *required*

Structured data or a template expression resolving to an object or array

**schema** `record\<string, unknown\>`

Optional JSON Schema for validating edits and exposing downstream autocomplete. When omitted with metadataFrom: ai.extract and a direct whole-output data expression, the extract step schema is reused.

**metadataFrom** `"ai.extract"`

Producer adapter. `ai.extract` derives categorical field confidence from `_grounding`, copies valid numeric grounding scores into fieldMetadata.display.score, and strips that reserved key from review data. Grounding is not stripped unless this is set.

**lineageFrom** `string`

Name of the ai.extract step whose source lineage draws field boxes in the review. Needed only when data passes through a step that changes field paths. Without it, boxes come from the step in a direct `&#123;&#123; steps.&lt;name>.output }}` data reference, or, when that step is a transform.script, from the one whole step output it received whose field paths it kept.

**fieldMetadata** `record\<string, object\>` (default: \{})

RFC 6901 pointer map of producer facts (labels, confidence, display). Selection policy belongs under selection.fields; fieldMetadata.review is a legacy alias.

**selection** `object` *required*

Field selection policy resolved once when the task is created

**files** `object` (default: \{"includeRunInputs":true,"attachments":\[]})

Run input files and optional current-run attachments for reviewers

**files properties**

**includeRunInputs** `boolean` (default: true)

Attach every authorized run input file to the review task

**attachments** `array\<string\>` (default: \[])

Additional current-run file or artifact template expressions

**instructions** `string`

Free-form guidance shown above the review workspace

## Output

Returns `unknown`. The complete reviewed data in the same object or array shape as the input.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.