OptimizationContext reference
This topic has a full field reference for the OptimizationContext object returned by all optimization methods.
OptimizationContext is the return value of optimize_from_config, optimize_from_options, and optimize_from_ground_truth_options. It represents the final state of the optimization run and includes scores, the winning configuration, token usage, and the full iteration history.
Example OptimizationContext object
Here is an example OptimizationContext object:
JSON
Fields
This table describes the fields available in OptimizationContext:
JudgeResult
Each entry in scores is a JudgeResult with the following fields:
TokenUsage
Used in both OptimizationContext.usage and JudgeResult.usage: