Class: Leva::Optimizers::GepaOptimizer

Inherits:
Base
  • Object
show all
Defined in:
app/services/leva/optimizers/gepa_optimizer.rb

Overview

GEPA (Genetic-Pareto) optimization strategy.

Uses reflective prompt evolution with genetic algorithms and Pareto optimization for best quality results.

Requires the dspy-gepa gem.

Instance Attribute Summary

Attributes inherited from Base

#metric, #mode, #model, #progress_callback

Instance Method Summary collapse

Methods inherited from Base

#initialize, #optimize

Constructor Details

This class inherits a constructor from Leva::Optimizers::Base

Instance Method Details

#optimizer_nameObject



16
17
18
# File 'app/services/leva/optimizers/gepa_optimizer.rb', line 16

def optimizer_name
  "GEPA"
end

#optimizer_typeObject



20
21
22
# File 'app/services/leva/optimizers/gepa_optimizer.rb', line 20

def optimizer_type
  :gepa
end

#step_nameObject



12
13
14
# File 'app/services/leva/optimizers/gepa_optimizer.rb', line 12

def step_name
  "gepa_optimizing"
end