AxOptimizedProgramImpl Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxOptimizedProgramImpl.md class AxOptimizedProgramImpl

AxOptimizedProgramImpl

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizer.ts#L859

Type Parameters

Type ParameterDefault type
OUTany

Implements

Constructors

Constructor

TypeScript
new AxOptimizedProgramImpl<OUT>(config: object): AxOptimizedProgramImpl<OUT>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizer.ts#L887

Parameters

ParameterType
config{ artifactFormatVersion?: number; bestScore: number; componentMap?: Record<string, string>; configurationHistory?: Record<string, unknown>[]; converged: boolean; demos?: AxProgramDemos<any, OUT>[]; examples?: AxExample[]; instructionSchema?: string; modelConfig?: { [key: string]: unknown; frequencyPenalty?: number; maxTokens?: number; presencePenalty?: number; stop?: string | string[]; temperature?: number; topK?: number; topP?: number; }; optimizationTime: number; optimizerType: string; scoreHistory?: number[]; selectorState?: Record<string, AxGEPAComponentBanditState>; stats: AxOptimizationStats; totalRounds: number; }
config.artifactFormatVersion?number
config.bestScorenumber
config.componentMap?Record<string, string>
config.configurationHistory?Record<string, unknown>[]
config.convergedboolean
config.demos?AxProgramDemos<any, OUT>[]
config.examples?AxExample[]
config.instructionSchema?string
config.modelConfig?{ [key: string]: unknown; frequencyPenalty?: number; maxTokens?: number; presencePenalty?: number; stop?: string | string[]; temperature?: number; topK?: number; topP?: number; }
config.modelConfig.frequencyPenalty?number
config.modelConfig.maxTokens?number
config.modelConfig.presencePenalty?number
config.modelConfig.stop?string | string[]
config.modelConfig.temperature?number
config.modelConfig.topK?number
config.modelConfig.topP?number
config.optimizationTimenumber
config.optimizerTypestring
config.scoreHistory?number[]
config.selectorState?Record<string, AxGEPAComponentBanditState>
config.statsAxOptimizationStats
config.totalRoundsnumber

Returns

AxOptimizedProgramImpl<OUT>

Properties

PropertyModifierTypeDescription
artifactFormatVersion?readonlynumber-
bestScorereadonlynumber-
componentMap?readonlyRecord<string, string>Generic component map produced by reflective optimizers (e.g. GEPA). Keys follow the ${programId}::${kind}[:${subKey}] grammar from AxOptimizableComponent. Applied via program.applyOptimizedComponents.
configurationHistory?readonlyRecord<string, unknown>[]-
convergedreadonlyboolean-
demos?readonlyAxProgramDemos<any, OUT>[]-
examples?readonlyAxExample[]-
instructionSchema?readonlystring-
modelConfig?readonlyobject-
modelConfig.frequencyPenalty?publicnumber-
modelConfig.maxTokens?publicnumber-
modelConfig.presencePenalty?publicnumber-
modelConfig.stop?publicstring | string[]-
modelConfig.temperature?publicnumber-
modelConfig.topK?publicnumber-
modelConfig.topP?publicnumber-
optimizationTimereadonlynumber-
optimizerTypereadonlystring-
scoreHistory?readonlynumber[]-
selectorState?readonlyRecord<string, AxGEPAComponentBanditState>-
statsreadonlyAxOptimizationStats-
totalRoundsreadonlynumber-

Methods

applyTo()

TypeScript
applyTo<IN, T>(program: AxGen<IN, T>): void;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/optimizer.ts#L921

Type Parameters

Type Parameter
IN
T extends AxGenOut

Parameters

ParameterType
programAxGen<IN, T>

Returns

void

Implementation of

AxOptimizedProgram.applyTo

Docs