Skip to main content

Structured Data

NodeSet is a specialized prompt for rendering structured lists — scoring rubrics, evaluation criteria, taxonomies, classification labels. Instead of hardcoding numbered lists in strings, you define the data and let NodeSet handle formatting.

Inline Data

The simplest approach is inline items:
Output:

YAML Data Files

For larger datasets, load from a YAML file:
The file data/criteria.yml:
Items are sorted by priority and children render as indented sub-items:
Note: YAML data files require symfony/yaml. Install it with composer require symfony/yaml.

Custom Formatting

Override renderNode() to change how each item appears:
Output:

Dynamic Data

Override nodes() to generate items at runtime:

Using in Composition

NodeSet is a regular Prompt, so it composes naturally:

Next Steps