Skip to content

llm_optimizer

diapason.learning.optimize.llm_optimizer

LLM-based optimizer for Diapason configuration tuning.

Uses a cloud LLM to propose optimal Diapason configs, inspired by DSPy's GEPA approach: textual feedback from execution traces rather than just scalar rewards guides the optimizer toward better configurations.

LLMOptimizer

Uses a cloud LLM to propose optimal Diapason configs.

Inspired by DSPy's GEPA: uses textual feedback from execution traces rather than just scalar rewards.

analyze_trial(trial, summary, traces=None, sample_scores=None, per_benchmark=None)

Ask the LLM to analyze a completed trial. Returns structured feedback.

propose_initial()

Propose a reasonable starting config from the search space.

propose_merge(candidates, history, frontier_ids=None)

Combine best aspects of frontier members into one config.

propose_next(history, traces=None, frontier_ids=None)

Ask the LLM to propose the next config to evaluate.

propose_targeted(history, base_config, target_primitive, frontier_ids=None)

Propose a config that only changes one primitive.