gooddata-eval 1.80.1.dev2__tar.gz → 1.80.1.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/AGENTS.md +9 -7
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/Makefile +4 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/PKG-INFO +95 -6
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/README.md +93 -4
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/pyproject.toml +2 -2
- gooddata_eval-1.80.1.dev4/scripts/calibrate_catalog_metadata_judge.py +67 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/scripts/calibrate_takeaway_judge.py +10 -4
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/cli/agentic_runner.py +13 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/cli/main.py +6 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/_retry.py +27 -0
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/agentic/_failed_runs.py +106 -0
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/agentic/_failure_message.py +198 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_gate.py +10 -3
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/agentic/_outcome.py +318 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_trace_linker.py +3 -2
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/alert_skill.py +30 -5
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/anomaly_detection.py +40 -15
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/conversation.py +9 -3
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/dashboard_skill.py +31 -6
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/document_skill.py +24 -4
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/general_question.py +30 -7
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/guardrail.py +30 -7
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/kda_skill.py +38 -6
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/metric_skill.py +41 -5
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/visualization.py +133 -14
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/what_if.py +42 -17
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/catalog/evaluate.py +268 -0
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/catalog/http_client.py +98 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/chat/sse_client.py +39 -12
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/dataset/langfuse_source.py +31 -4
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/__init__.py +4 -2
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/_llm_judge.py +4 -0
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/evaluators/_text_utils.py +43 -0
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/evaluators/catalog_metadata.py +200 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/takeaway.py +12 -24
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/visualization.py +197 -3
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/models.py +49 -6
- gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/outcome.py +159 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/reporting/json_report.py +3 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/runner.py +10 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/takeaway/http_client.py +4 -25
- gooddata_eval-1.80.1.dev4/tests/__init__.py +1 -0
- gooddata_eval-1.80.1.dev4/tests/fixtures/catalog_metadata_calibration.json +290 -0
- gooddata_eval-1.80.1.dev4/tests/fixtures/takeaway_calibration.json +157 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_alert_skill.py +19 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_anomaly_detection.py +14 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_conversation.py +27 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_dashboard_skill.py +17 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_document_skill.py +34 -10
- gooddata_eval-1.80.1.dev4/tests/test_agentic_failure_message.py +522 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_gate.py +16 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_kda_skill.py +28 -2
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_metric_skill.py +79 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_observe_experiment.py +12 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_runner.py +33 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_visualization.py +33 -1
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_what_if.py +14 -1
- gooddata_eval-1.80.1.dev4/tests/test_catalog_metadata_client.py +181 -0
- gooddata_eval-1.80.1.dev4/tests/test_catalog_metadata_evaluate.py +256 -0
- gooddata_eval-1.80.1.dev4/tests/test_catalog_metadata_evaluator.py +159 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_cli.py +19 -0
- gooddata_eval-1.80.1.dev4/tests/test_context_date_filter.py +547 -0
- gooddata_eval-1.80.1.dev4/tests/test_eval_error_scores.py +162 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_source.py +52 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_models.py +8 -0
- gooddata_eval-1.80.1.dev4/tests/test_outcome.py +539 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_runner.py +1 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_sse_client.py +67 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_takeaway_evaluator.py +5 -0
- gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/agentic/_failed_runs.py +0 -72
- gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/agentic/_outcome.py +0 -123
- gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/evaluators/_text_utils.py +0 -10
- gooddata_eval-1.80.1.dev2/tests/fixtures/takeaway_calibration.json +0 -68
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/.gitignore +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/CLAUDE.md +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/LICENSE.txt +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/scripts/verify_guardrail_refusal_criteria.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/_version.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/cli/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/_output.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_filters.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/forecasting.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
- {gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/chat → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/catalog}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/dataset → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/chat}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/chat/render.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/config.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/connection.py +0 -0
- {gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/langfuse → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/dataset}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/dataset/local.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/base.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/evaluators/summary.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/granularity.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/interaction.py +0 -0
- {gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/reporting → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/langfuse}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/_env.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/client.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/observations.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/langfuse/sink.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/number_format.py +0 -0
- {gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/summary → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/reporting}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/reporting/console.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/reporting/html_report.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/reporting/report_template.html +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/scoring.py +0 -0
- {gooddata_eval-1.80.1.dev2/src/gooddata_eval/core/takeaway → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/summary}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/summary/http_client.py +0 -0
- {gooddata_eval-1.80.1.dev2/tests → gooddata_eval-1.80.1.dev4/src/gooddata_eval/core/takeaway}/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/timing.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/core/workspace.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/_fake_langfuse.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/conftest.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/fixtures/sse_visualization_stream.txt +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_dashboard_summary.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_document_editor_takeaways.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_forecasting.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_general_question.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_guardrail.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_join_trace.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_langfuse_trace.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_run_context.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_agentic_search_tool.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_alert_skill_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_chat_render.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_connection.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_deep_subset.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_fake_langfuse.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_from_insights.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_guardrail_criteria.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_html_report.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_interaction.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_client.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_e2e_fake_server.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_env.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_experiment.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_item_scope.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_observations.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_otlp.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_langfuse_sink.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_llm_judge.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_local_loader.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_maql_normalize.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_metric_skill_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_number_format.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_reporting.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_scoring.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_search_tool_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_summary_client.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_summary_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_takeaway_client.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_takeaway_evaluate.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_text_evaluators.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_timing.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_trace_linker.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_visualization_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tests/test_workspace.py +0 -0
- {gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/tox.ini +0 -0
|
@@ -28,12 +28,14 @@ experiment. The newest and most actively developed package in the repo.
|
|
|
28
28
|
| `core/chat/` | SSE client for the agent's streaming chat endpoint |
|
|
29
29
|
| `core/summary/` | HTTP client for the dedicated dashboard-summary endpoint — a single-shot chat backend, not reporting |
|
|
30
30
|
| `core/takeaway/` | HTTP client for the AI Publisher takeaway endpoint — a single-shot backend like `core/summary/`, keeping the whole response on `ChatResult.raw_response` — plus `evaluate_document_takeaway`, the K-run, gate and Langfuse entry point the Tavern shim calls. Also used by the agentic document skill to write the takeaways the copilot leaves to the editor, before the narrative is graded |
|
|
31
|
+
| `core/catalog/` | HTTP client for the Analytics Catalog `generateTitle` / `generateDescription` endpoints — single-shot like `core/takeaway/`, asking again once on a 200 answer without usable text — plus `evaluate_catalog_metadata`, the K-run, gate and Langfuse entry point the Tavern shim calls |
|
|
31
32
|
| `core/dataset/` | dataset format, loading, and `from_insights.py` — dataset generation from a workspace's real insights |
|
|
32
33
|
| `core/evaluators/` | single-shot evaluators and their registry |
|
|
33
34
|
| `core/langfuse/` | the whole Langfuse v4 client: `_env` (base URL + credentials), `otlp` (OTLP/JSON encoding), `experiment` (root-span construction, score targets), `item_scope` (an item's experiment scope sent to gen-ai as baggage, and which conversations joined), `observations` (trace reads), `client` (httpx calls), `sink` (single-shot results as experiments) |
|
|
34
35
|
| `core/reporting/` | console and JSON output rendering |
|
|
35
36
|
| `core/scoring.py`, `core/runner.py` | scoring and orchestration |
|
|
36
37
|
| `core/models.py` | `DatasetItem`, `ChatResult`, `ItemReport` and friends |
|
|
38
|
+
| `core/outcome.py` | `Outcome` (PASS / FAIL / ERROR): the one fail-closed rule that labels a failing run ERROR when the harness failed (simulated user, judge), plus the item label and the recorded-only shadow verdict. Labels decide no verdict; the agentic kinds reach it through `core/agentic/_outcome.py`'s `label_runs` |
|
|
37
39
|
|
|
38
40
|
**Depends on**: `gooddata-sdk`, `httpx`, `pydantic`, `orjson`, `rich`. The LLM-judge
|
|
39
41
|
evaluator is an optional extra (`llm-judge`, pulling `openai>=1.45,<2.0`); every `openai`
|
|
@@ -61,7 +63,7 @@ implementation, sometimes under different `test_kind` strings (`search_tool` vs
|
|
|
61
63
|
its own shape. `test_kind` on the item is what labels the result, not the evaluator class,
|
|
62
64
|
which is why `knowledge_question` can reuse `GeneralQuestionEvaluator` verbatim.
|
|
63
65
|
`dashboard_summary` items additionally need `summary_input`, `document_takeaway` items
|
|
64
|
-
`takeaway_input`.
|
|
66
|
+
`takeaway_input`, `catalog_metadata` items `catalog_input`.
|
|
65
67
|
|
|
66
68
|
## Running the pipeline
|
|
67
69
|
|
|
@@ -157,8 +159,8 @@ Run this before guessing a `--model` string.
|
|
|
157
159
|
| `GD_EVAL_JUDGE_MODEL` | judge model, same as `--judge-model` |
|
|
158
160
|
| `GD_EVAL_AGENT_ID` | which agent to drive, same as `--agent-id` |
|
|
159
161
|
| `LANGFUSE_HOST`, `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY` | `--langfuse`, `--langfuse-dataset` |
|
|
160
|
-
| `GOODDATA_EVAL_CHAT_*` | retry and backoff knobs shared by the chat and
|
|
161
|
-
| `GOODDATA_EVAL_TRACE_LABELS` | `key=value,...` labels stamped on every observation of a chat conversation via W3C baggage; `model_version` also sets the observation `version`, so set it only for a one-model run: every `--model` in one process gets the same labels. Keys must match `[A-Za-z0-9_-]+`; others are skipped with a warning. Dashboard-summary
|
|
162
|
+
| `GOODDATA_EVAL_CHAT_*` | retry and backoff knobs shared by the chat, takeaway and catalog clients (`core/_retry.py`), and the SSE turn and item timeouts |
|
|
163
|
+
| `GOODDATA_EVAL_TRACE_LABELS` | `key=value,...` labels stamped on every observation of a chat conversation via W3C baggage; `model_version` also sets the observation `version`, so set it only for a one-model run: every `--model` in one process gets the same labels. Keys must match `[A-Za-z0-9_-]+`; others are skipped with a warning. Dashboard-summary, document-takeaway and catalog-metadata runs are not labelled |
|
|
162
164
|
| `GOODDATA_EVAL_JOIN_GENAI_TRACE` | on unless set to `0`, `false`, `no`, `off` or empty. An agentic item's chat turns ask gen-ai to open them under gd-eval's experiment root, so each item is one Langfuse trace with its scores written once. A gen-ai that drops caller baggage keeps today's separate traces; see the gotcha below |
|
|
163
165
|
| `GD_EVAL_TIMERS` | same as `--timers` |
|
|
164
166
|
|
|
@@ -184,14 +186,14 @@ Adding a kind to `PARALLEL_SAFE_TEST_KINDS` is a deliberate assertion that it is
|
|
|
184
186
|
which nothing in the package can prove for you.
|
|
185
187
|
|
|
186
188
|
**The SSE client's retry predicate is load-bearing.** The backoff loop and the retryable
|
|
187
|
-
status set (429/500/502/503/504) live in `core/_retry.py`, shared by the chat and
|
|
188
|
-
clients and tuned by the same `GOODDATA_EVAL_CHAT_*` knobs. `core/chat/sse_client.py`
|
|
189
|
+
status set (429/500/502/503/504) live in `core/_retry.py`, shared by the chat, takeaway and
|
|
190
|
+
catalog clients and tuned by the same `GOODDATA_EVAL_CHAT_*` knobs. `core/chat/sse_client.py`
|
|
189
191
|
retries that status set and `httpx.RemoteProtocolError` (a mid-stream disconnect), and
|
|
190
192
|
treats a `METADATA_SYNC_IN_PROGRESS` payload as transient. The `RemoteProtocolError` case
|
|
191
193
|
was added after it was confirmed live to contaminate a small percentage of visualization
|
|
192
194
|
runs with a hard fail and no retry. Narrowing that predicate reintroduces the problem. The
|
|
193
|
-
takeaway
|
|
194
|
-
timeout: a slow page would spend the whole timeout again on every attempt.
|
|
195
|
+
takeaway and catalog clients retry the same status set plus connection failures, but not a
|
|
196
|
+
read timeout: a slow page would spend the whole timeout again on every attempt.
|
|
195
197
|
|
|
196
198
|
**Langfuse trace linking is deliberately off the item critical path.** Polling for trace
|
|
197
199
|
ingestion has no pass/fail signal and inflates or misattributes per-item latency, so
|
|
@@ -4,3 +4,7 @@ include ../../project_common.mk
|
|
|
4
4
|
.PHONY: calibrate-takeaway
|
|
5
5
|
calibrate-takeaway:
|
|
6
6
|
uv run --package gooddata-eval --extra llm-judge python scripts/calibrate_takeaway_judge.py
|
|
7
|
+
|
|
8
|
+
.PHONY: calibrate-catalog-metadata
|
|
9
|
+
calibrate-catalog-metadata:
|
|
10
|
+
uv run --package gooddata-eval --extra llm-judge python scripts/calibrate_catalog_metadata_judge.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gooddata-eval
|
|
3
|
-
Version: 1.80.1.
|
|
3
|
+
Version: 1.80.1.dev4
|
|
4
4
|
Summary: Evaluate the GoodData AI agent against your own questions and models.
|
|
5
5
|
Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
|
|
6
6
|
Author-email: GoodData <support@gooddata.com>
|
|
@@ -18,7 +18,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
18
18
|
Classifier: Topic :: Software Development
|
|
19
19
|
Classifier: Typing :: Typed
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
|
-
Requires-Dist: gooddata-sdk~=1.80.1.
|
|
21
|
+
Requires-Dist: gooddata-sdk~=1.80.1.dev4
|
|
22
22
|
Requires-Dist: httpx<1.0,>=0.27
|
|
23
23
|
Requires-Dist: jsonpatch<2.0,>=1.33
|
|
24
24
|
Requires-Dist: orjson<4.0.0,>=3.9.15
|
|
@@ -162,8 +162,8 @@ gd-eval run \
|
|
|
162
162
|
| `--runs K` | `2` | Independent runs per item. |
|
|
163
163
|
| `--gate` | `any` | Which verdict decides an item: `any` = pass@K (a run passing is enough), `power` = pass^K (every run must pass, so the verdict measures stability). Identical at `--runs 1`. Kinds that repeat K runs only — `power` is refused when the dataset also has non-agentic items or `agentic_conversation`, which are always decided on pass@K. |
|
|
164
164
|
| `--concurrency K` | `1` | Number of items evaluated concurrently. `1` = sequential (default). Increase to load-test the agent under simultaneous requests — see *Concurrency and workspace safety* below. |
|
|
165
|
-
| `--judge-model MODEL` | `gpt-4o` | Model used for LLM-as-judge scoring — `agentic_general_question`, `agentic_guardrail`, `general_question`, `guardrail`, `dashboard_summary` and `
|
|
166
|
-
| `--reasoning-effort LEVEL` | server default | `LOW`, `MEDIUM` or `HIGH`, sent as `options.reasoningEffort` on every chat message. Requires the `enableGenAiReasoningEffort` feature flag on the target organization — without it the server ignores the value. Applies to chat items only; `dashboard_summary` and `
|
|
165
|
+
| `--judge-model MODEL` | `gpt-4o` | Model used for LLM-as-judge scoring — `agentic_general_question`, `agentic_guardrail`, `general_question`, `guardrail`, `dashboard_summary`, `document_takeaway` and `catalog_metadata`. Also settable via `GD_EVAL_JUDGE_MODEL`. Two things to weigh before changing it: the gpt-5 family rejects `temperature=0`, so verdicts stop being reproducible (the run warns when this happens); and choosing the same model the agent runs means the judge grades its own family's output. |
|
|
166
|
+
| `--reasoning-effort LEVEL` | server default | `LOW`, `MEDIUM` or `HIGH`, sent as `options.reasoningEffort` on every chat message. Requires the `enableGenAiReasoningEffort` feature flag on the target organization — without it the server ignores the value. Applies to chat items only; `dashboard_summary`, `document_takeaway` and `catalog_metadata` items go through their own endpoints, which have no such option. |
|
|
167
167
|
|
|
168
168
|
**Concurrency and workspace safety.** Agentic kinds that create workspace objects
|
|
169
169
|
(`agentic_metric_skill`, `agentic_alert_skill`, `agentic_conversation`, `agentic_kda_skill`) always run one at a
|
|
@@ -738,7 +738,8 @@ A dataset is a folder of `.json` files, one per question:
|
|
|
738
738
|
```
|
|
739
739
|
|
|
740
740
|
Supported `test_kind` values: `visualization`, `metric_skill`, `alert_skill`,
|
|
741
|
-
`search_tool`, `general_question`, `guardrail`, `dashboard_summary`, `document_takeaway
|
|
741
|
+
`search_tool`, `general_question`, `guardrail`, `dashboard_summary`, `document_takeaway`,
|
|
742
|
+
`catalog_metadata`.
|
|
742
743
|
|
|
743
744
|
### `visualization` items
|
|
744
745
|
|
|
@@ -782,6 +783,9 @@ Item-level keys, all optional except the candidates:
|
|
|
782
783
|
`{"metric/net_sales": {"divide_by": 1000000, "decimals": 1, "suffix": "M"}}`.
|
|
783
784
|
- `requires_visualization_part` — the chart must come back as a part of the answer, not only as
|
|
784
785
|
the arguments of the chart tool call.
|
|
786
|
+
- `date_filter_from_context` — `true` or `{"dataset": "<date dataset>"}`: a candidate without a
|
|
787
|
+
date filter also accepts the chart carrying a date filter of the dashboard in the item's
|
|
788
|
+
`user_context`. See *Date filter carried over from the dashboard* below.
|
|
785
789
|
|
|
786
790
|
Switches on a candidate chart:
|
|
787
791
|
|
|
@@ -882,7 +886,8 @@ an item carrying `takeaway_input` is a `document_takeaway` item unless it declar
|
|
|
882
886
|
|
|
883
887
|
`word_count` and `headline_word_count` are reported in the item detail. The default judge
|
|
884
888
|
criteria are calibrated with `make calibrate-takeaway` (needs `OPENAI_API_KEY`); re-run it
|
|
885
|
-
after changing their wording.
|
|
889
|
+
after changing their wording. The judge reads the item's `input` as the page label, and the
|
|
890
|
+
label can change a verdict, so describe the page and the request in plain words.
|
|
886
891
|
|
|
887
892
|
The client retries 429/5xx answers and connection failures. A request error that survives
|
|
888
893
|
the retries is handled differently by the two entry points: `gd-eval run` aborts the item
|
|
@@ -892,6 +897,51 @@ and raises only when no run completed. A read timeout is not retried, and the CI
|
|
|
892
897
|
point records it as an errored run too. Any other 4xx and an unsupported URL scheme are
|
|
893
898
|
never retried and fail the item in both.
|
|
894
899
|
|
|
900
|
+
### `catalog_metadata` items
|
|
901
|
+
|
|
902
|
+
Catalog items call the Analytics Catalog generate endpoints
|
|
903
|
+
(`POST /api/v1/actions/workspaces/{ws}/ai/analyticsCatalog/generateTitle` or
|
|
904
|
+
`/generateDescription`) for one object, named by a `catalog_input` block. In a Langfuse
|
|
905
|
+
dataset the block goes in the item's `metadata` or its `input` object (`input` wins); a
|
|
906
|
+
value that is not an object fails the item. An item carrying
|
|
907
|
+
`catalog_input` is a `catalog_metadata` item unless it declares another `test_kind`. The
|
|
908
|
+
judge reads the item's `question` as the ground truth, so state the object's real metadata
|
|
909
|
+
there in plain words (what a metric computes, which filters a visualization has).
|
|
910
|
+
|
|
911
|
+
```json
|
|
912
|
+
{
|
|
913
|
+
"id": "catalog-001",
|
|
914
|
+
"dataset_name": "analytics_catalog_generate",
|
|
915
|
+
"test_kind": "catalog_metadata",
|
|
916
|
+
"question": "Description for the metric '# of Single Orders'. Its MAQL counts customers who placed exactly one order.",
|
|
917
|
+
"catalog_input": {"object_type": "Metric", "object_id": "of_orders_1", "output": "description"},
|
|
918
|
+
"expected_output": {
|
|
919
|
+
"must_include": ["Says that it counts customers who placed exactly one order."],
|
|
920
|
+
"must_not_include": ["Says the metric counts orders rather than customers."],
|
|
921
|
+
"rubric": []
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
`object_type` is one of `Visualization`, `Dashboard`, `Metric`, `Fact`, `Attribute`;
|
|
927
|
+
`output` is `title` or `description`; unknown keys are rejected. Every `expected_output`
|
|
928
|
+
key is optional:
|
|
929
|
+
|
|
930
|
+
- `expect_note` — `true` for an object the endpoint must decline: the item passes on no
|
|
931
|
+
text plus a non-empty `note`, and nothing else is graded.
|
|
932
|
+
- `format` — overrides of the deterministic checks, which gate pass/fail: `max_words`
|
|
933
|
+
(title 10, description 80), `max_sentences` (title 1, description 4), `no_end_period`
|
|
934
|
+
(title), `no_markup`, `no_ids`. `false` or `null` switches a check off; unknown keys are
|
|
935
|
+
rejected. A generated text (`generated`) and an empty `note` (`no_note`) always apply.
|
|
936
|
+
- `must_include`, `must_not_include`, `rubric` — judge criteria, graded like
|
|
937
|
+
`dashboard_summary`. Criteria may name the object's metadata; the judge sees no data.
|
|
938
|
+
|
|
939
|
+
A 200 answer with no usable text (a null value without a note, or the placeholder
|
|
940
|
+
`"string"`) is asked again once; `unusable_retries` in the item detail records it, with
|
|
941
|
+
`word_count`. The judge steps are calibrated with `make calibrate-catalog-metadata` (needs
|
|
942
|
+
`OPENAI_API_KEY`); re-run it after changing them. Request errors are handled as for
|
|
943
|
+
`document_takeaway`; the CI entry point is `evaluate_catalog_metadata`.
|
|
944
|
+
|
|
895
945
|
### Items asked in a dashboard context (`user_context`)
|
|
896
946
|
|
|
897
947
|
An item can be asked the way a user asks from an open dashboard or an attached widget.
|
|
@@ -932,6 +982,44 @@ In a Langfuse dataset, put it in the item `metadata` (or in the `input` object)
|
|
|
932
982
|
`null` value in `input` falls back to `metadata`. The value used must be an object or `null`;
|
|
933
983
|
anything else fails the dataset load.
|
|
934
984
|
|
|
985
|
+
#### Date filter carried over from the dashboard
|
|
986
|
+
|
|
987
|
+
A user who asks for a new chart from an open dashboard without naming a period may get the
|
|
988
|
+
dashboard's date filter on the chart, and the product accepts that as well as a chart with no
|
|
989
|
+
date filter. An item says so with `date_filter_from_context`:
|
|
990
|
+
|
|
991
|
+
```json
|
|
992
|
+
"expected_output": {
|
|
993
|
+
"visualization": {"type": "headline_chart", "query": {"fields": {"m": {"using": "metric/gross_margin_pct"}}}, "metrics": ["m"]},
|
|
994
|
+
"date_filter_from_context": {"dataset": "dataset/transaction_date"}
|
|
995
|
+
}
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
Each candidate without a date filter then also counts once more per date filter in
|
|
999
|
+
`user_context.view.dashboard.filters`, with that filter added. Both sides resolve against the
|
|
1000
|
+
same day, so a relative and an absolute period that cover the same days match. The date dataset
|
|
1001
|
+
of the added filter is, in order: the `dataset` the key states; the one the dashboard filter
|
|
1002
|
+
names in `using` (a bare id such as `order_date` reads as `dataset/order_date`); for the
|
|
1003
|
+
dashboard's common date filter, which names none, the one the chart's only date filter uses.
|
|
1004
|
+
`true` therefore accepts any date dataset for the common date filter. The key's `dataset` must
|
|
1005
|
+
be a bare id or a `dataset/` URI; anything else, such as `label/region` or a misspelled
|
|
1006
|
+
`datset/order_date`, is an error. A dashboard filter whose `using` is not a date dataset adds
|
|
1007
|
+
no candidate.
|
|
1008
|
+
|
|
1009
|
+
A candidate that states a date filter is not extended: a question that names a period is scored
|
|
1010
|
+
on that period only. A chart with two date filters matches no added candidate. Ranking and
|
|
1011
|
+
attribute filters are unaffected.
|
|
1012
|
+
|
|
1013
|
+
When the chart matches an added candidate, the run detail carries
|
|
1014
|
+
`filter_date_context: {"inherited": true, "dataset": ...}` and a failure summary shows
|
|
1015
|
+
`date : True (matches the dashboard date filter in user_context)`. The expected output reported
|
|
1016
|
+
is still the candidate the item states; `expected_filters` shows the dashboard filter it was
|
|
1017
|
+
scored with. A stated candidate that matched the date wins over an added one it ties with. Without the key an item is
|
|
1018
|
+
scored exactly as before, so an item that must reject the dashboard's period ("all time")
|
|
1019
|
+
simply leaves it out. The key on an item whose `user_context` has no dashboard date filter is
|
|
1020
|
+
an error, raised before any request. Applies to `visualization`, `vis_agentic` and
|
|
1021
|
+
`agentic_visualization` items; `agentic_conversation` turns do not read it.
|
|
1022
|
+
|
|
935
1023
|
`agentic_conversation` items take the item's `user_context` as the context of the first
|
|
936
1024
|
turn. A turn in `expected_output.turns` can set its own `user_context`, which applies
|
|
937
1025
|
from that turn on until another turn changes it, as the attached context does in the UI:
|
|
@@ -954,6 +1042,7 @@ from that turn on until another turn changes it, as the attached context does in
|
|
|
954
1042
|
| `guardrail` | Refusal/redirect (visualization response auto-fails) | `[llm-judge]` |
|
|
955
1043
|
| `dashboard_summary` | Dashboard summary (via `/summary` endpoint) scored against a rubric by LLM | `[llm-judge]` |
|
|
956
1044
|
| `document_takeaway` | One short takeaway for a page (via `/takeaway` endpoint): deterministic format checks plus a rubric scored by LLM | `[llm-judge]` |
|
|
1045
|
+
| `catalog_metadata` | Analytics Catalog title or description for one object (via the `analyticsCatalog/generate*` endpoints): format checks plus a rubric scored by LLM | `[llm-judge]` |
|
|
957
1046
|
|
|
958
1047
|
## Optional extras
|
|
959
1048
|
|
|
@@ -132,8 +132,8 @@ gd-eval run \
|
|
|
132
132
|
| `--runs K` | `2` | Independent runs per item. |
|
|
133
133
|
| `--gate` | `any` | Which verdict decides an item: `any` = pass@K (a run passing is enough), `power` = pass^K (every run must pass, so the verdict measures stability). Identical at `--runs 1`. Kinds that repeat K runs only — `power` is refused when the dataset also has non-agentic items or `agentic_conversation`, which are always decided on pass@K. |
|
|
134
134
|
| `--concurrency K` | `1` | Number of items evaluated concurrently. `1` = sequential (default). Increase to load-test the agent under simultaneous requests — see *Concurrency and workspace safety* below. |
|
|
135
|
-
| `--judge-model MODEL` | `gpt-4o` | Model used for LLM-as-judge scoring — `agentic_general_question`, `agentic_guardrail`, `general_question`, `guardrail`, `dashboard_summary` and `
|
|
136
|
-
| `--reasoning-effort LEVEL` | server default | `LOW`, `MEDIUM` or `HIGH`, sent as `options.reasoningEffort` on every chat message. Requires the `enableGenAiReasoningEffort` feature flag on the target organization — without it the server ignores the value. Applies to chat items only; `dashboard_summary` and `
|
|
135
|
+
| `--judge-model MODEL` | `gpt-4o` | Model used for LLM-as-judge scoring — `agentic_general_question`, `agentic_guardrail`, `general_question`, `guardrail`, `dashboard_summary`, `document_takeaway` and `catalog_metadata`. Also settable via `GD_EVAL_JUDGE_MODEL`. Two things to weigh before changing it: the gpt-5 family rejects `temperature=0`, so verdicts stop being reproducible (the run warns when this happens); and choosing the same model the agent runs means the judge grades its own family's output. |
|
|
136
|
+
| `--reasoning-effort LEVEL` | server default | `LOW`, `MEDIUM` or `HIGH`, sent as `options.reasoningEffort` on every chat message. Requires the `enableGenAiReasoningEffort` feature flag on the target organization — without it the server ignores the value. Applies to chat items only; `dashboard_summary`, `document_takeaway` and `catalog_metadata` items go through their own endpoints, which have no such option. |
|
|
137
137
|
|
|
138
138
|
**Concurrency and workspace safety.** Agentic kinds that create workspace objects
|
|
139
139
|
(`agentic_metric_skill`, `agentic_alert_skill`, `agentic_conversation`, `agentic_kda_skill`) always run one at a
|
|
@@ -708,7 +708,8 @@ A dataset is a folder of `.json` files, one per question:
|
|
|
708
708
|
```
|
|
709
709
|
|
|
710
710
|
Supported `test_kind` values: `visualization`, `metric_skill`, `alert_skill`,
|
|
711
|
-
`search_tool`, `general_question`, `guardrail`, `dashboard_summary`, `document_takeaway
|
|
711
|
+
`search_tool`, `general_question`, `guardrail`, `dashboard_summary`, `document_takeaway`,
|
|
712
|
+
`catalog_metadata`.
|
|
712
713
|
|
|
713
714
|
### `visualization` items
|
|
714
715
|
|
|
@@ -752,6 +753,9 @@ Item-level keys, all optional except the candidates:
|
|
|
752
753
|
`{"metric/net_sales": {"divide_by": 1000000, "decimals": 1, "suffix": "M"}}`.
|
|
753
754
|
- `requires_visualization_part` — the chart must come back as a part of the answer, not only as
|
|
754
755
|
the arguments of the chart tool call.
|
|
756
|
+
- `date_filter_from_context` — `true` or `{"dataset": "<date dataset>"}`: a candidate without a
|
|
757
|
+
date filter also accepts the chart carrying a date filter of the dashboard in the item's
|
|
758
|
+
`user_context`. See *Date filter carried over from the dashboard* below.
|
|
755
759
|
|
|
756
760
|
Switches on a candidate chart:
|
|
757
761
|
|
|
@@ -852,7 +856,8 @@ an item carrying `takeaway_input` is a `document_takeaway` item unless it declar
|
|
|
852
856
|
|
|
853
857
|
`word_count` and `headline_word_count` are reported in the item detail. The default judge
|
|
854
858
|
criteria are calibrated with `make calibrate-takeaway` (needs `OPENAI_API_KEY`); re-run it
|
|
855
|
-
after changing their wording.
|
|
859
|
+
after changing their wording. The judge reads the item's `input` as the page label, and the
|
|
860
|
+
label can change a verdict, so describe the page and the request in plain words.
|
|
856
861
|
|
|
857
862
|
The client retries 429/5xx answers and connection failures. A request error that survives
|
|
858
863
|
the retries is handled differently by the two entry points: `gd-eval run` aborts the item
|
|
@@ -862,6 +867,51 @@ and raises only when no run completed. A read timeout is not retried, and the CI
|
|
|
862
867
|
point records it as an errored run too. Any other 4xx and an unsupported URL scheme are
|
|
863
868
|
never retried and fail the item in both.
|
|
864
869
|
|
|
870
|
+
### `catalog_metadata` items
|
|
871
|
+
|
|
872
|
+
Catalog items call the Analytics Catalog generate endpoints
|
|
873
|
+
(`POST /api/v1/actions/workspaces/{ws}/ai/analyticsCatalog/generateTitle` or
|
|
874
|
+
`/generateDescription`) for one object, named by a `catalog_input` block. In a Langfuse
|
|
875
|
+
dataset the block goes in the item's `metadata` or its `input` object (`input` wins); a
|
|
876
|
+
value that is not an object fails the item. An item carrying
|
|
877
|
+
`catalog_input` is a `catalog_metadata` item unless it declares another `test_kind`. The
|
|
878
|
+
judge reads the item's `question` as the ground truth, so state the object's real metadata
|
|
879
|
+
there in plain words (what a metric computes, which filters a visualization has).
|
|
880
|
+
|
|
881
|
+
```json
|
|
882
|
+
{
|
|
883
|
+
"id": "catalog-001",
|
|
884
|
+
"dataset_name": "analytics_catalog_generate",
|
|
885
|
+
"test_kind": "catalog_metadata",
|
|
886
|
+
"question": "Description for the metric '# of Single Orders'. Its MAQL counts customers who placed exactly one order.",
|
|
887
|
+
"catalog_input": {"object_type": "Metric", "object_id": "of_orders_1", "output": "description"},
|
|
888
|
+
"expected_output": {
|
|
889
|
+
"must_include": ["Says that it counts customers who placed exactly one order."],
|
|
890
|
+
"must_not_include": ["Says the metric counts orders rather than customers."],
|
|
891
|
+
"rubric": []
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
`object_type` is one of `Visualization`, `Dashboard`, `Metric`, `Fact`, `Attribute`;
|
|
897
|
+
`output` is `title` or `description`; unknown keys are rejected. Every `expected_output`
|
|
898
|
+
key is optional:
|
|
899
|
+
|
|
900
|
+
- `expect_note` — `true` for an object the endpoint must decline: the item passes on no
|
|
901
|
+
text plus a non-empty `note`, and nothing else is graded.
|
|
902
|
+
- `format` — overrides of the deterministic checks, which gate pass/fail: `max_words`
|
|
903
|
+
(title 10, description 80), `max_sentences` (title 1, description 4), `no_end_period`
|
|
904
|
+
(title), `no_markup`, `no_ids`. `false` or `null` switches a check off; unknown keys are
|
|
905
|
+
rejected. A generated text (`generated`) and an empty `note` (`no_note`) always apply.
|
|
906
|
+
- `must_include`, `must_not_include`, `rubric` — judge criteria, graded like
|
|
907
|
+
`dashboard_summary`. Criteria may name the object's metadata; the judge sees no data.
|
|
908
|
+
|
|
909
|
+
A 200 answer with no usable text (a null value without a note, or the placeholder
|
|
910
|
+
`"string"`) is asked again once; `unusable_retries` in the item detail records it, with
|
|
911
|
+
`word_count`. The judge steps are calibrated with `make calibrate-catalog-metadata` (needs
|
|
912
|
+
`OPENAI_API_KEY`); re-run it after changing them. Request errors are handled as for
|
|
913
|
+
`document_takeaway`; the CI entry point is `evaluate_catalog_metadata`.
|
|
914
|
+
|
|
865
915
|
### Items asked in a dashboard context (`user_context`)
|
|
866
916
|
|
|
867
917
|
An item can be asked the way a user asks from an open dashboard or an attached widget.
|
|
@@ -902,6 +952,44 @@ In a Langfuse dataset, put it in the item `metadata` (or in the `input` object)
|
|
|
902
952
|
`null` value in `input` falls back to `metadata`. The value used must be an object or `null`;
|
|
903
953
|
anything else fails the dataset load.
|
|
904
954
|
|
|
955
|
+
#### Date filter carried over from the dashboard
|
|
956
|
+
|
|
957
|
+
A user who asks for a new chart from an open dashboard without naming a period may get the
|
|
958
|
+
dashboard's date filter on the chart, and the product accepts that as well as a chart with no
|
|
959
|
+
date filter. An item says so with `date_filter_from_context`:
|
|
960
|
+
|
|
961
|
+
```json
|
|
962
|
+
"expected_output": {
|
|
963
|
+
"visualization": {"type": "headline_chart", "query": {"fields": {"m": {"using": "metric/gross_margin_pct"}}}, "metrics": ["m"]},
|
|
964
|
+
"date_filter_from_context": {"dataset": "dataset/transaction_date"}
|
|
965
|
+
}
|
|
966
|
+
```
|
|
967
|
+
|
|
968
|
+
Each candidate without a date filter then also counts once more per date filter in
|
|
969
|
+
`user_context.view.dashboard.filters`, with that filter added. Both sides resolve against the
|
|
970
|
+
same day, so a relative and an absolute period that cover the same days match. The date dataset
|
|
971
|
+
of the added filter is, in order: the `dataset` the key states; the one the dashboard filter
|
|
972
|
+
names in `using` (a bare id such as `order_date` reads as `dataset/order_date`); for the
|
|
973
|
+
dashboard's common date filter, which names none, the one the chart's only date filter uses.
|
|
974
|
+
`true` therefore accepts any date dataset for the common date filter. The key's `dataset` must
|
|
975
|
+
be a bare id or a `dataset/` URI; anything else, such as `label/region` or a misspelled
|
|
976
|
+
`datset/order_date`, is an error. A dashboard filter whose `using` is not a date dataset adds
|
|
977
|
+
no candidate.
|
|
978
|
+
|
|
979
|
+
A candidate that states a date filter is not extended: a question that names a period is scored
|
|
980
|
+
on that period only. A chart with two date filters matches no added candidate. Ranking and
|
|
981
|
+
attribute filters are unaffected.
|
|
982
|
+
|
|
983
|
+
When the chart matches an added candidate, the run detail carries
|
|
984
|
+
`filter_date_context: {"inherited": true, "dataset": ...}` and a failure summary shows
|
|
985
|
+
`date : True (matches the dashboard date filter in user_context)`. The expected output reported
|
|
986
|
+
is still the candidate the item states; `expected_filters` shows the dashboard filter it was
|
|
987
|
+
scored with. A stated candidate that matched the date wins over an added one it ties with. Without the key an item is
|
|
988
|
+
scored exactly as before, so an item that must reject the dashboard's period ("all time")
|
|
989
|
+
simply leaves it out. The key on an item whose `user_context` has no dashboard date filter is
|
|
990
|
+
an error, raised before any request. Applies to `visualization`, `vis_agentic` and
|
|
991
|
+
`agentic_visualization` items; `agentic_conversation` turns do not read it.
|
|
992
|
+
|
|
905
993
|
`agentic_conversation` items take the item's `user_context` as the context of the first
|
|
906
994
|
turn. A turn in `expected_output.turns` can set its own `user_context`, which applies
|
|
907
995
|
from that turn on until another turn changes it, as the attached context does in the UI:
|
|
@@ -924,6 +1012,7 @@ from that turn on until another turn changes it, as the attached context does in
|
|
|
924
1012
|
| `guardrail` | Refusal/redirect (visualization response auto-fails) | `[llm-judge]` |
|
|
925
1013
|
| `dashboard_summary` | Dashboard summary (via `/summary` endpoint) scored against a rubric by LLM | `[llm-judge]` |
|
|
926
1014
|
| `document_takeaway` | One short takeaway for a page (via `/takeaway` endpoint): deterministic format checks plus a rubric scored by LLM | `[llm-judge]` |
|
|
1015
|
+
| `catalog_metadata` | Analytics Catalog title or description for one object (via the `analyticsCatalog/generate*` endpoints): format checks plus a rubric scored by LLM | `[llm-judge]` |
|
|
927
1016
|
|
|
928
1017
|
## Optional extras
|
|
929
1018
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# (C) 2026 GoodData Corporation
|
|
2
2
|
[project]
|
|
3
3
|
name = "gooddata-eval"
|
|
4
|
-
version = "1.80.1.
|
|
4
|
+
version = "1.80.1.dev4"
|
|
5
5
|
description = "Evaluate the GoodData AI agent against your own questions and models."
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = "MIT"
|
|
@@ -11,7 +11,7 @@ authors = [
|
|
|
11
11
|
keywords = ["gooddata", "ai", "evaluation", "llm", "analytics", "cli"]
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
13
|
dependencies = [
|
|
14
|
-
"gooddata-sdk~=1.80.1.
|
|
14
|
+
"gooddata-sdk~=1.80.1.dev4",
|
|
15
15
|
"httpx>=0.27,<1.0",
|
|
16
16
|
"jsonpatch>=1.33,<2.0",
|
|
17
17
|
"orjson>=3.9.15,<4.0.0",
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# (C) 2026 GoodData Corporation
|
|
2
|
+
"""Does the real judge grade catalog_metadata criteria on the right side?
|
|
3
|
+
|
|
4
|
+
tests/test_catalog_metadata_evaluator.py pins the wiring; it cannot pin the verdict, because
|
|
5
|
+
the verdict is an LLM's. This does, against tests/fixtures/catalog_metadata_calibration.json:
|
|
6
|
+
each case is one item question (the object's real metadata), one criterion and one text, and
|
|
7
|
+
the criterion must be satisfied ("pass") or not ("fail") on every run.
|
|
8
|
+
|
|
9
|
+
The fixture keeps texts that state a wrong fact the question contradicts: a violation judge
|
|
10
|
+
that grades correctness instead of presence scores those as absent and lets them pass.
|
|
11
|
+
|
|
12
|
+
Run it after changing _POSITIVE_STEPS / _VIOLATION_STEPS:
|
|
13
|
+
|
|
14
|
+
OPENAI_API_KEY=... make calibrate-catalog-metadata
|
|
15
|
+
|
|
16
|
+
It is a script rather than a test because CI has no OPENAI_API_KEY. Exits 1 on any mismatch.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
import sys
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
from gooddata_eval.core.evaluators.catalog_metadata import CatalogMetadataEvaluator
|
|
25
|
+
from gooddata_eval.core.models import CatalogInput, ChatResult, DatasetItem
|
|
26
|
+
|
|
27
|
+
RUNS = 3
|
|
28
|
+
FIXTURE = Path(__file__).resolve().parent.parent / "tests" / "fixtures" / "catalog_metadata_calibration.json"
|
|
29
|
+
_FIELDS = {"include": "must_include", "exclude": "must_not_include"}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def main() -> int:
|
|
33
|
+
if not os.environ.get("OPENAI_API_KEY"):
|
|
34
|
+
raise SystemExit("OPENAI_API_KEY required")
|
|
35
|
+
cases = json.loads(FIXTURE.read_text())
|
|
36
|
+
evaluator = CatalogMetadataEvaluator()
|
|
37
|
+
print(f"judge model: {evaluator._positive_judge.model}, runs: {RUNS}")
|
|
38
|
+
mismatches = 0
|
|
39
|
+
for case in cases:
|
|
40
|
+
item = DatasetItem(
|
|
41
|
+
id=case["label"],
|
|
42
|
+
dataset_name="catalog_metadata_calibration",
|
|
43
|
+
test_kind="catalog_metadata",
|
|
44
|
+
question=case["question"],
|
|
45
|
+
expected_output={_FIELDS[case["kind"]]: [case["criterion"]], "format": {}},
|
|
46
|
+
catalog_input=CatalogInput.model_validate(
|
|
47
|
+
{"object_type": "Metric", "object_id": "calibration", "output": case["output"]}
|
|
48
|
+
),
|
|
49
|
+
)
|
|
50
|
+
chat = ChatResult(text_response=case["text"], raw_response={"note": None})
|
|
51
|
+
key = f"{case['kind']}_0"
|
|
52
|
+
verdicts = [evaluator.evaluate(item, chat).detail.get(key) for _ in range(RUNS)]
|
|
53
|
+
ungraded = sum(not isinstance(v, bool) for v in verdicts)
|
|
54
|
+
satisfied = sum(v is True for v in verdicts)
|
|
55
|
+
want = RUNS if case["want"] == "pass" else 0
|
|
56
|
+
# An ungraded run proves nothing, on either side.
|
|
57
|
+
ok = satisfied == want and not ungraded
|
|
58
|
+
mismatches += not ok
|
|
59
|
+
print(
|
|
60
|
+
f"{case['label']:48} want {case['want']:4} satisfied {satisfied}/{RUNS}{f' ungraded {ungraded}' if ungraded else ''} {'OK' if ok else 'MISMATCH'}"
|
|
61
|
+
)
|
|
62
|
+
print(f"\n{'all calibration texts on the right side' if not mismatches else f'{mismatches} mismatch(es)'}")
|
|
63
|
+
return 1 if mismatches else 0
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if __name__ == "__main__":
|
|
67
|
+
sys.exit(main())
|
|
@@ -6,7 +6,9 @@ the verdict, because the verdict is an LLM's. This does, against the texts in
|
|
|
6
6
|
tests/fixtures/takeaway_calibration.json:
|
|
7
7
|
|
|
8
8
|
- a "pass" text must satisfy every default judge criterion on every run;
|
|
9
|
-
- a "fail" text must violate each criterion it names on every run
|
|
9
|
+
- a "fail" text must violate each criterion it names on every run;
|
|
10
|
+
- a text's own "question" is the page label the judge reads (default: the fixture's). The label
|
|
11
|
+
can change the verdict; a text from a real run usually keeps its item's label.
|
|
10
12
|
|
|
11
13
|
Run it after changing any DEFAULT_MUST_INCLUDE / DEFAULT_MUST_NOT_INCLUDE wording:
|
|
12
14
|
|
|
@@ -47,15 +49,18 @@ def main() -> int:
|
|
|
47
49
|
id=case["label"],
|
|
48
50
|
dataset_name="takeaway_calibration",
|
|
49
51
|
test_kind="document_takeaway",
|
|
50
|
-
question=fixture["question"],
|
|
52
|
+
question=case.get("question", fixture["question"]),
|
|
51
53
|
expected_output={},
|
|
52
54
|
takeaway_input=TakeawayInput(visualizations=["calibration"]),
|
|
53
55
|
)
|
|
54
56
|
chat = ChatResult(text_response=case["text"], raw_response={"takeaway": case["text"], "noData": False})
|
|
55
57
|
satisfied = dict.fromkeys(CRITERIA.values(), 0)
|
|
58
|
+
# An ungraded criterion has no key in detail; never count it as a verdict.
|
|
59
|
+
ungraded = dict.fromkeys(CRITERIA.values(), 0)
|
|
56
60
|
for _ in range(RUNS):
|
|
57
61
|
detail = evaluator.evaluate(item, chat).detail
|
|
58
62
|
for key, name in CRITERIA.items():
|
|
63
|
+
ungraded[name] += key not in detail
|
|
59
64
|
satisfied[name] += detail.get(key) is True
|
|
60
65
|
want_pass = case["want"] == "pass"
|
|
61
66
|
must = dict.fromkeys(satisfied, RUNS) if want_pass else dict.fromkeys(case["criteria"], 0)
|
|
@@ -63,10 +68,11 @@ def main() -> int:
|
|
|
63
68
|
for name, count in satisfied.items():
|
|
64
69
|
flag = ""
|
|
65
70
|
if name in must:
|
|
66
|
-
ok = count == must[name]
|
|
71
|
+
ok = count == must[name] and not ungraded[name]
|
|
67
72
|
mismatches += not ok
|
|
68
73
|
flag = "OK" if ok else "MISMATCH"
|
|
69
|
-
|
|
74
|
+
note = f" ({ungraded[name]} ungraded)" if ungraded[name] else ""
|
|
75
|
+
print(f" {name:20} satisfied {count}/{RUNS}{note} {flag}")
|
|
70
76
|
print(f"\n{'all calibration texts on the right side' if not mismatches else f'{mismatches} mismatch(es)'}")
|
|
71
77
|
return 1 if mismatches else 0
|
|
72
78
|
|
{gooddata_eval-1.80.1.dev2 → gooddata_eval-1.80.1.dev4}/src/gooddata_eval/cli/agentic_runner.py
RENAMED
|
@@ -404,6 +404,16 @@ def _apply_run_counts(item_report: ItemReport, source: Any) -> None:
|
|
|
404
404
|
item_report.runs_ungraded = unscored
|
|
405
405
|
|
|
406
406
|
|
|
407
|
+
def _apply_labels(item_report: ItemReport, source: Any) -> None:
|
|
408
|
+
"""Copy the item's harness label and shadow verdict off an outcome or a failure, if set."""
|
|
409
|
+
harness_error = getattr(source, "harness_error", None)
|
|
410
|
+
if isinstance(harness_error, dict):
|
|
411
|
+
item_report.harness_error = harness_error
|
|
412
|
+
shadow = getattr(source, "shadow", None)
|
|
413
|
+
if isinstance(shadow, dict):
|
|
414
|
+
item_report.shadow = shadow
|
|
415
|
+
|
|
416
|
+
|
|
407
417
|
def _apply_failed_runs(item_report: ItemReport, source: Any) -> None:
|
|
408
418
|
"""Copy the per-run failure records off an outcome or a failure, if the kind built any.
|
|
409
419
|
|
|
@@ -555,6 +565,7 @@ def run_agentic_items(
|
|
|
555
565
|
_apply_best_run_latency(item_report, outcome)
|
|
556
566
|
_apply_run_counts(item_report, outcome)
|
|
557
567
|
_apply_failed_runs(item_report, outcome)
|
|
568
|
+
_apply_labels(item_report, outcome)
|
|
558
569
|
_apply_run_latencies(item_report, outcome)
|
|
559
570
|
except AssertionError as exc:
|
|
560
571
|
item_report.gate_passed = False if gated else None
|
|
@@ -567,6 +578,7 @@ def run_agentic_items(
|
|
|
567
578
|
_apply_best_run_latency(item_report, exc)
|
|
568
579
|
_apply_run_counts(item_report, exc)
|
|
569
580
|
_apply_failed_runs(item_report, exc)
|
|
581
|
+
_apply_labels(item_report, exc)
|
|
570
582
|
_apply_run_latencies(item_report, exc)
|
|
571
583
|
# Read off the counts, not off the gate: pass^K fails items where runs did pass,
|
|
572
584
|
# and reporting those as pass_at_k False would contradict the Langfuse score of
|
|
@@ -588,6 +600,7 @@ def run_agentic_items(
|
|
|
588
600
|
_apply_timings(item_report, getattr(exc, "timings", None))
|
|
589
601
|
_apply_run_counts(item_report, exc)
|
|
590
602
|
_apply_failed_runs(item_report, exc)
|
|
603
|
+
_apply_labels(item_report, exc)
|
|
591
604
|
_apply_run_latencies(item_report, exc)
|
|
592
605
|
# Every run ungraded, by definition of this error -- said explicitly rather than
|
|
593
606
|
# left to _apply_run_counts, whose source is detail["unscored_runs"] and which a
|
|
@@ -15,6 +15,7 @@ from rich.console import Console
|
|
|
15
15
|
from rich.table import Table
|
|
16
16
|
|
|
17
17
|
from gooddata_eval.cli.agentic_runner import AGENTIC_TEST_KINDS, UNGATED_AGENTIC_TEST_KINDS, run_agentic_items
|
|
18
|
+
from gooddata_eval.core.catalog.http_client import CatalogMetadataClient
|
|
18
19
|
from gooddata_eval.core.chat.sse_client import ChatClient, set_default_item_timeout, set_default_turn_timeout
|
|
19
20
|
from gooddata_eval.core.config import (
|
|
20
21
|
DEFAULT_GATE,
|
|
@@ -48,7 +49,8 @@ class _RoutingBackend:
|
|
|
48
49
|
"""Dispatch each item to the right backend by test_kind.
|
|
49
50
|
|
|
50
51
|
Kinds in `by_kind` go to their dedicated endpoint client (`dashboard_summary` to the
|
|
51
|
-
summary endpoint, `document_takeaway` to the takeaway endpoint
|
|
52
|
+
summary endpoint, `document_takeaway` to the takeaway endpoint, `catalog_metadata` to the
|
|
53
|
+
Analytics Catalog generate endpoints); everything else uses
|
|
52
54
|
the conversational chat endpoint.
|
|
53
55
|
"""
|
|
54
56
|
|
|
@@ -620,6 +622,9 @@ def _run(config: RunConfig) -> int:
|
|
|
620
622
|
"document_takeaway": TakeawayClient(
|
|
621
623
|
host=config.host, token=config.token, workspace_id=config.workspace_id
|
|
622
624
|
),
|
|
625
|
+
"catalog_metadata": CatalogMetadataClient(
|
|
626
|
+
host=config.host, token=config.token, workspace_id=config.workspace_id
|
|
627
|
+
),
|
|
623
628
|
},
|
|
624
629
|
)
|
|
625
630
|
try:
|
|
@@ -13,6 +13,8 @@ import time
|
|
|
13
13
|
from collections.abc import Callable
|
|
14
14
|
from typing import TypeVar
|
|
15
15
|
|
|
16
|
+
import httpx
|
|
17
|
+
|
|
16
18
|
_log = logging.getLogger(__name__)
|
|
17
19
|
|
|
18
20
|
T = TypeVar("T")
|
|
@@ -24,6 +26,31 @@ T = TypeVar("T")
|
|
|
24
26
|
RETRYABLE_STATUS_CODES: frozenset[int] = frozenset({429, 500, 502, 503, 504})
|
|
25
27
|
|
|
26
28
|
|
|
29
|
+
# Failures of the single-shot endpoint clients (takeaway, catalog) that say nothing about the
|
|
30
|
+
# request. A read timeout is left out: the server was computing, and retrying spends the whole
|
|
31
|
+
# timeout again on every attempt.
|
|
32
|
+
RETRYABLE_TRANSPORT_ERRORS = (httpx.ConnectError, httpx.ConnectTimeout, httpx.RemoteProtocolError, httpx.PoolTimeout)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def is_retryable_request_error(exc: Exception) -> bool:
|
|
36
|
+
"""Whether a single-shot endpoint client retries this failure: a retryable status or transport error."""
|
|
37
|
+
if isinstance(exc, httpx.HTTPStatusError):
|
|
38
|
+
return exc.response.status_code in RETRYABLE_STATUS_CODES
|
|
39
|
+
return isinstance(exc, RETRYABLE_TRANSPORT_ERRORS)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def is_transient(exc: httpx.HTTPError) -> bool:
|
|
43
|
+
"""Whether a failure left after the client's retries says nothing about the request.
|
|
44
|
+
|
|
45
|
+
429, 5xx and transport failures (a read timeout included) are transient; any other 4xx
|
|
46
|
+
(flag off, no agent, invalid body) and an unsupported URL scheme are setup problems.
|
|
47
|
+
"""
|
|
48
|
+
if isinstance(exc, httpx.HTTPStatusError):
|
|
49
|
+
status = exc.response.status_code
|
|
50
|
+
return status == 429 or status >= 500
|
|
51
|
+
return isinstance(exc, httpx.TransportError) and not isinstance(exc, httpx.UnsupportedProtocol)
|
|
52
|
+
|
|
53
|
+
|
|
27
54
|
def int_env(name: str, default: int) -> int:
|
|
28
55
|
"""Read an int from the environment, falling back to ``default`` when unset or blank."""
|
|
29
56
|
raw = os.getenv(name)
|