adk eval
https://github.com/google/adk-python/blob/v1.23.0/src/google/adk/cli/cli_tools_click.py#L661
#adkコマンド
eval extraを指定してgoogle-adkをインストール
eval_config = get_evaluation_criteria_or_default(config_file_path)
eval_metrics = get_eval_metrics_from_config(eval_config)
root_agent = get_root_agent(agent_module_file_path)
eval_set_results_manager = LocalEvalSetResultsManager(agents_dir=agents_dir)
google.adk.evaluation.local_eval_set_results_manager.LocalEvalSetResultsManager
InferenceRequestを用意する
asyncio.runする
inferencesを作って、eval_resultsに変換する
google.adk.cli.cli_eval._collect_inferences()
google.adk.cli.cli_eval._collect_eval_results()
google.adk.evaluation.local_eval_service.LocalEvalService
metric_evaluator_registryが渡されるのでカスタムメトリクスもサポート (v1.23.0)
metric_evaluator_registry.register_evaluator(metric_info, _CustomMetricEvaluator)したものが渡される
google.adk.evaluation.custom_metric_evaluator._CustomMetricEvaluator
以下は古くなってしまった
run_evals https://github.com/google/adk-python/blob/v0.1.0/src/google/adk/cli/cli_eval.py#L149
Returns a summary of eval runs.
ResponseEvaluator.evaluate()