| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Shikumi.Optimize
Contents
Description
The public surface of the optimizer framework (EP-10).
optimize is the one stable entry point EP-12's CLI calls: it applies an
Optimizer strategy to a starting program and returns a CompiledProgram. The
shared search-state plumbing (selectBest, scoreOn, freezeProgram) lives in
Shikumi.Optimize.Search and is re-exported here; the four strategies are
re-exported from their own modules.
No global mutable state. Candidate programs are threaded as ordinary values
through pure folds; the only effectful step is scoring a candidate (which runs
it over the dataset via scoreOn). This is the "thread candidates explicitly"
discipline the MasterPlan mandates.
Synopsis
- optimize :: forall (es :: [Effect]) i o. (LLM :> es, Concurrent :> es, Error ShikumiError :> es, Time :> es, Prim :> es) => Optimizer i o -> Dataset i o -> Metric o -> Program i o -> Eff es (CompiledProgram i o)
- module Shikumi.Optimize.Types
- module Shikumi.Optimize.Search
- module Shikumi.Optimize.LabeledFewShot
- module Shikumi.Optimize.Bootstrap
- module Shikumi.Optimize.Instruction
- module Shikumi.Optimize.COPRO
- module Shikumi.Optimize.MIPRO
- module Shikumi.Optimize.GEPA
- module Shikumi.Optimize.Pareto
- module Shikumi.Optimize.KNN
- module Shikumi.Optimize.RandomSearch
- module Shikumi.Optimize.Ensemble
The driver
optimize :: forall (es :: [Effect]) i o. (LLM :> es, Concurrent :> es, Error ShikumiError :> es, Time :> es, Prim :> es) => Optimizer i o -> Dataset i o -> Metric o -> Program i o -> Eff es (CompiledProgram i o) Source #
Apply an optimizer to a starting program. A thin wrapper around the strategy so the public API is one stable name (and so EP-12's CLI dispatches on one function regardless of which optimizer the user picked).
Re-exports
module Shikumi.Optimize.Types
module Shikumi.Optimize.Search
module Shikumi.Optimize.Bootstrap
module Shikumi.Optimize.Instruction
module Shikumi.Optimize.COPRO
module Shikumi.Optimize.MIPRO
module Shikumi.Optimize.GEPA
module Shikumi.Optimize.Pareto
module Shikumi.Optimize.KNN
module Shikumi.Optimize.Ensemble