optimize() API
GEPA, Pareto, artifact, and optimizer APIs.
Most Used
axllm.Optimize
Convenience optimizer helper that composes AxBootstrapFewShot before AxGEPA and returns an artifact without applying final component changes.
| Field | Value |
|---|---|
| Kind | function |
| Ax concept | optimize |
| API section | Optimizers |
| Form | axllm.Optimize(program, examples, options) |
| Returns | Value |
Important Options
student/clientteacher/reflection clientmetric budgetbootstrap
Examples
artifact, err := axllm.Optimize(qa, train, map[string]axllm.Value{"studentAI": client})axllm.AxBootstrapFewShot
Few-shot demonstration optimizer that selects successful evaluator rollouts before prompt/component evolution.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxBootstrapFewShot |
| API section | Optimizers |
| Form | axllm.NewBootstrapFewShot(options) |
| Returns | optimizer engine |
Important Options
quality thresholdmax demosmax roundsbatch size
Examples
bootstrap := axllm.NewBootstrapFewShot(map[string]axllm.Value{"qualityThreshold": 0.7})axllm.AxGEPA
Generated GEPA optimizer engine with Core-owned reflection, Pareto, bootstrap, and selector-state behavior.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxGEPA |
| API section | Optimizers |
| Form | axllm.NewGEPA(reflection, options) |
| Returns | optimizer engine |
Important Options
reflection clientbudgetmetriccandidate count
Examples
engine := axllm.NewGEPA(reflectionClient, nil)axllm.OptimizerEngine
Optimizer boundary consumed by AxGen, AxAgent, and AxFlow optimization helpers.
| Field | Value |
|---|---|
| Kind | interface |
| Ax concept | OptimizerEngine |
| API section | Optimizers |
| Form | OptimizerEngine.Optimize(request, evaluator) |
| Returns | optimized artifact |
Important Options
requestevaluator
axllm.OptimizerEvaluator
Evaluator callback boundary used by generated optimizers.
| Field | Value |
|---|---|
| Kind | interface |
| Ax concept | OptimizerEvaluator |
| API section | Optimizers |
| Form | OptimizerEvaluator.Evaluate(request) |
| Returns | score/evidence result |
Important Options
dataset rowscandidate mapevidence
Full Reference
Open the full Go reference. This page highlights the optimize symbols most relevant to everyday use.