optimize() API GEPA optimizer, Pareto, artifact, and evaluation APIs. java api api/optimize packages/java/axir-api.json api optimize() API

optimize() API

GEPA, Pareto, artifact, and optimizer APIs.

Most Used

Ax.optimize

Convenience optimizer helper that composes AxBootstrapFewShot before AxGEPA and returns an artifact without applying final component changes.

FieldValue
Kindfunction
Ax conceptoptimize
API sectionOptimizers
FormAx.optimize(program, examples, options)
Returnsoptimized artifact

Important Options

  • student/client
  • teacher/reflection client
  • metric budget
  • bootstrap

Examples

Java
Map<String, Object> artifact = Ax.optimize(qa, train, Map.of("studentAI", client, "teacherAI", reflection));

Full reference

AxBootstrapFewShot

Few-shot demonstration optimizer that selects successful evaluator rollouts before prompt/component evolution.

FieldValue
Kindtype
Ax conceptAxBootstrapFewShot
API sectionOptimizers
Formnew AxBootstrapFewShot(options)
Returnsoptimizer engine

Important Options

  • quality threshold
  • max demos
  • max rounds
  • batch size

Examples

Java
AxBootstrapFewShot bootstrap = new AxBootstrapFewShot(Map.of("qualityThreshold", 0.7));

Full reference

AxGEPA

Generated GEPA optimizer engine with Core-owned reflection, Pareto, bootstrap, and selector-state behavior.

FieldValue
Kindtype
Ax conceptAxGEPA
API sectionOptimizers
Formnew AxGEPA(reflection, options)
Returnsoptimizer engine

Important Options

  • reflection client
  • budget
  • metric
  • candidate count

Examples

Java
AxGEPA engine = new AxGEPA(reflectionClient, Map.of());

Full reference

OptimizerEngine

Optimizer boundary consumed by AxGen, AxAgent, and AxFlow optimization helpers.

FieldValue
Kindinterface
Ax conceptOptimizerEngine
API sectionOptimizers
FormOptimizerEngine.optimize(request, evaluator)
Returnsoptimized artifact

Important Options

  • request
  • evaluator

Full reference

OptimizerEvaluator

Evaluator callback boundary used by generated optimizers.

FieldValue
Kindinterface
Ax conceptOptimizerEvaluator
API sectionOptimizers
FormOptimizerEvaluator.evaluate(request)
Returnsscore/evidence result

Important Options

  • dataset rows
  • candidate map
  • evidence

Full reference

Full Reference

Open the full Java reference. This page highlights the optimize symbols most relevant to everyday use.

Docs