Optimization Artifact
The serializable output of an optimization run, holding optimized instructions and demonstrations.
Produced by optimizers, consumed by optimizable subgraphs at runtime, and persisted to the filesystem between training and inference.
Immutability simplifies parallel evaluation: each optimization trial can safely hold its own artifact instance without synchronization.
Subgraph entries use the subgraph name as key. The strategy-level instruction and demonstrations are stored separately from subgraph entries.
Constructors
Types
Properties
Demonstrations for the strategy level.
Optimized instruction for the strategy's system prompt, or null to keep the original.
Map from subgraph name to demonstration list.
Map from subgraph name to optimized instruction text.
Functions
Returns the demonstrations for the given subgraph, or an empty list if not present.
Returns the optimized instruction for the given subgraph, or null if not present.
Merges this artifact with another, with the other artifact's entries taking precedence.
Creates a new artifact with updated strategy-level demonstrations.
Creates a new artifact with an updated strategy-level instruction.
Creates a new artifact with additional or updated subgraph demonstrations.
Creates a new artifact with an additional or updated subgraph instruction.