gooddata-eval 1.78.1.dev2__tar.gz → 1.78.1.dev3__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.78.1.dev2 → gooddata_eval-1.78.1.dev3}/PKG-INFO +2 -2
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/pyproject.toml +2 -2
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_catalog.py +9 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/alert_skill.py +230 -81
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_alert_skill.py +356 -2
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/.gitignore +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/AGENTS.md +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/CLAUDE.md +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/LICENSE.txt +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/Makefile +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/README.md +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/scripts/calibrate_takeaway_judge.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/scripts/verify_guardrail_refusal_criteria.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/_version.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/cli/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/cli/agentic_runner.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/cli/main.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/_output.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/_retry.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_gate.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/conversation.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/dashboard_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/document_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/general_question.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/kda_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/visualization.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/what_if.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/chat/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/chat/render.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/chat/sse_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/config.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/connection.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/dataset/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/dataset/local.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/base.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/summary.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/granularity.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/interaction.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/_env.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/observations.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/langfuse/sink.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/models.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/number_format.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/reporting/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/reporting/console.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/reporting/html_report.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/reporting/json_report.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/reporting/report_template.html +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/runner.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/scoring.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/summary/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/summary/http_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/timing.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/workspace.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/__init__.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/_fake_langfuse.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/conftest.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/fixtures/sse_visualization_stream.txt +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/fixtures/takeaway_calibration.json +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_anomaly_detection.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_conversation.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_dashboard_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_document_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_gate.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_general_question.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_guardrail.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_join_trace.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_kda_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_langfuse_trace.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_metric_skill.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_observe_experiment.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_run_context.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_runner.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_search_tool.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_visualization.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_agentic_what_if.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_alert_skill_evaluator.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_chat_render.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_cli.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_connection.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_deep_subset.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_fake_langfuse.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_from_insights.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_guardrail_criteria.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_html_report.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_interaction.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_e2e_fake_server.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_env.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_experiment.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_item_scope.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_observations.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_otlp.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_sink.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_langfuse_source.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_llm_judge.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_local_loader.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_maql_normalize.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_metric_skill_evaluator.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_models.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_number_format.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_reporting.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_runner.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_scoring.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_search_tool_evaluator.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_sse_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_summary_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_summary_evaluator.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_takeaway_client.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_takeaway_evaluate.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_takeaway_evaluator.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_text_evaluators.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_timing.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_trace_linker.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_visualization_evaluator.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tests/test_workspace.py +0 -0
- {gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gooddata-eval
|
|
3
|
-
Version: 1.78.1.
|
|
3
|
+
Version: 1.78.1.dev3
|
|
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>
|
|
@@ -17,7 +17,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
17
17
|
Classifier: Topic :: Software Development
|
|
18
18
|
Classifier: Typing :: Typed
|
|
19
19
|
Requires-Python: >=3.10
|
|
20
|
-
Requires-Dist: gooddata-sdk~=1.78.1.
|
|
20
|
+
Requires-Dist: gooddata-sdk~=1.78.1.dev3
|
|
21
21
|
Requires-Dist: httpx<1.0,>=0.27
|
|
22
22
|
Requires-Dist: jsonpatch<2.0,>=1.33
|
|
23
23
|
Requires-Dist: orjson<4.0.0,>=3.9.15
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# (C) 2026 GoodData Corporation
|
|
2
2
|
[project]
|
|
3
3
|
name = "gooddata-eval"
|
|
4
|
-
version = "1.78.1.
|
|
4
|
+
version = "1.78.1.dev3"
|
|
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.10"
|
|
13
13
|
dependencies = [
|
|
14
|
-
"gooddata-sdk~=1.78.1.
|
|
14
|
+
"gooddata-sdk~=1.78.1.dev3",
|
|
15
15
|
"httpx>=0.27,<1.0",
|
|
16
16
|
"jsonpatch>=1.33,<2.0",
|
|
17
17
|
"orjson>=3.9.15,<4.0.0",
|
{gooddata_eval-1.78.1.dev2 → gooddata_eval-1.78.1.dev3}/src/gooddata_eval/core/agentic/_catalog.py
RENAMED
|
@@ -67,6 +67,12 @@ class CatalogMetricAlert:
|
|
|
67
67
|
"""Expected group-by attributes; ``None`` means the fixture states no expectation."""
|
|
68
68
|
granularity: AnomalyDetectionGranularity | None = None
|
|
69
69
|
"""Detection interval for an ANOMALY alert (DAY/WEEK/MONTH/...). Not a date filter."""
|
|
70
|
+
comparison: dict[str, str | int | float | None] | None = None
|
|
71
|
+
"""Expected period comparison as ``create_metric_alert`` argument names; ``None`` means unasserted."""
|
|
72
|
+
title: str | None = None
|
|
73
|
+
"""Alert name the user asked for; ``None`` means unasserted."""
|
|
74
|
+
dashboard_id: str | None = None
|
|
75
|
+
"""Dashboard the alert must be bound to; ``None`` means unasserted."""
|
|
70
76
|
|
|
71
77
|
@classmethod
|
|
72
78
|
def from_dict(cls, d: dict) -> CatalogMetricAlert:
|
|
@@ -87,4 +93,7 @@ class CatalogMetricAlert:
|
|
|
87
93
|
filters=d.get("filters"),
|
|
88
94
|
attributes=d.get("attributes"),
|
|
89
95
|
granularity=AnomalyDetectionGranularity.parse(d.get("granularity")),
|
|
96
|
+
comparison=d.get("comparison"),
|
|
97
|
+
title=d.get("title"),
|
|
98
|
+
dashboard_id=d.get("dashboard_id"),
|
|
90
99
|
)
|
|
@@ -58,6 +58,37 @@ _TRIGGER_DISPLAY_TO_API = {"Every time": "ALWAYS", "One time": "ONCE"}
|
|
|
58
58
|
_ALWAYS_TRIGGER_VALUES = {"Every time", "ALWAYS", "not specified"}
|
|
59
59
|
_RELATIVE_OPERATORS = ("INCREASES_BY", "DECREASES_BY", "CHANGES_BY")
|
|
60
60
|
|
|
61
|
+
# Fixture spelling of each period-comparison property -> the create_metric_alert argument.
|
|
62
|
+
_COMPARISON_ARGS = {
|
|
63
|
+
"kind": "comparison_kind",
|
|
64
|
+
"periods_ago": "comparison_periods_ago",
|
|
65
|
+
"date_dataset_id": "comparison_date_dataset_id",
|
|
66
|
+
"date_attribute_id": "comparison_date_attribute_id",
|
|
67
|
+
"arithmetic_operator": "arithmetic_operator",
|
|
68
|
+
}
|
|
69
|
+
# Compared verbatim: object ids are case-sensitive, unlike the enum-valued properties.
|
|
70
|
+
_COMPARISON_ID_ARGS = ("comparison_date_dataset_id", "comparison_date_attribute_id")
|
|
71
|
+
# What create_metric_alert applies when the argument is left out, per its own contract. A
|
|
72
|
+
# metric-to-metric comparison has no periods, so periods_ago defaults only for a period kind.
|
|
73
|
+
_COMPARISON_ARG_DEFAULTS: dict[str, object] = {"comparison_periods_ago": 1, "arithmetic_operator": "DIFFERENCE"}
|
|
74
|
+
_PERIOD_COMPARISON_KINDS = ("PREVIOUS_PERIOD", "SAME_PERIOD_PRIOR_YEAR")
|
|
75
|
+
_NO_COMPARISON_MARKERS = ("none", "no comparison")
|
|
76
|
+
|
|
77
|
+
# AlertEvaluation checks, in report order. Every run is scored on the first group; the second only
|
|
78
|
+
# when the item states the matching expectation.
|
|
79
|
+
_ALERT_CHECKS = (
|
|
80
|
+
"alert_created",
|
|
81
|
+
"operator_correct",
|
|
82
|
+
"threshold_correct",
|
|
83
|
+
"trigger_correct",
|
|
84
|
+
"filters_correct",
|
|
85
|
+
"metric_correct",
|
|
86
|
+
"recipients_correct",
|
|
87
|
+
"attributes_correct",
|
|
88
|
+
"granularity_correct",
|
|
89
|
+
)
|
|
90
|
+
_CONDITIONAL_ALERT_CHECKS = ("comparison_correct", "title_correct", "dashboard_correct")
|
|
91
|
+
|
|
61
92
|
# Expected-recipient spellings that mean the owner of the API token.
|
|
62
93
|
_CURRENT_USER_RECIPIENT = "me"
|
|
63
94
|
_CURRENT_USER_MARKERS = {"me", "myself", "current user", "current_user"}
|
|
@@ -94,6 +125,29 @@ def _parse_recipients(recipients_str: str | None) -> list[str] | None:
|
|
|
94
125
|
return [r.strip() for r in recipients_str.replace(";", ",").split(",") if r.strip()]
|
|
95
126
|
|
|
96
127
|
|
|
128
|
+
def _recipient_list(value: object, *, split_bare: bool) -> list[str]:
|
|
129
|
+
"""A recipient argument as a list, decoded the way gen-ai does before calling the server.
|
|
130
|
+
|
|
131
|
+
The tool schema declares both recipient fields ``anyOf: [array of string, string, null]``,
|
|
132
|
+
and some models send the list JSON-encoded as a string (``'["admin"]'``). Empty or
|
|
133
|
+
``"null"`` means none; any other string that is not a JSON list of strings is a bare
|
|
134
|
+
value -- one user id, or with ``split_bare`` a comma/semicolon-separated email list
|
|
135
|
+
(gen-ai forwards a bare string as one entry; the split is this checker's own leniency).
|
|
136
|
+
A non-string list entry is kept as its ``str()`` so it compares unequal instead of raising.
|
|
137
|
+
"""
|
|
138
|
+
if isinstance(value, list):
|
|
139
|
+
return [str(item) for item in value]
|
|
140
|
+
if not isinstance(value, str) or value.strip() in ("", "null"):
|
|
141
|
+
return []
|
|
142
|
+
try:
|
|
143
|
+
parsed = json.loads(value)
|
|
144
|
+
except ValueError:
|
|
145
|
+
parsed = None
|
|
146
|
+
if isinstance(parsed, list) and all(isinstance(item, str) for item in parsed):
|
|
147
|
+
return parsed
|
|
148
|
+
return (_parse_recipients(value) or []) if split_bare else [value]
|
|
149
|
+
|
|
150
|
+
|
|
97
151
|
def _deep_subset(expected: object, actual: object) -> bool:
|
|
98
152
|
"""Return True if expected is a recursive subset of actual."""
|
|
99
153
|
if isinstance(expected, dict) and isinstance(actual, dict):
|
|
@@ -234,6 +288,66 @@ def _check_granularity(expected: CatalogMetricAlert, actual_args: dict) -> bool:
|
|
|
234
288
|
return str(actual).strip().upper() == expected.granularity.value
|
|
235
289
|
|
|
236
290
|
|
|
291
|
+
def _canonical_comparison_value(arg: str, value: object) -> str | int | float | None:
|
|
292
|
+
"""Fold one comparison value so fixture and tool-argument spellings compare equal."""
|
|
293
|
+
if value is None or str(value).strip() == "":
|
|
294
|
+
return None
|
|
295
|
+
if arg == "comparison_periods_ago":
|
|
296
|
+
return _to_number(value)
|
|
297
|
+
if arg in _COMPARISON_ID_ARGS:
|
|
298
|
+
return str(value).strip()
|
|
299
|
+
return str(value).strip().upper()
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def _check_comparison(expected: CatalogMetricAlert, actual_args: dict) -> bool:
|
|
303
|
+
"""Compare only the comparison properties the fixture states.
|
|
304
|
+
|
|
305
|
+
``None`` means unasserted. A stated ``comparison_kind`` of ``None`` asserts the alert has
|
|
306
|
+
no comparison at all. ``comparison_kind`` is read as ``create_metric_alert`` resolves it:
|
|
307
|
+
left out next to a ``compare_metric_id`` it is METRIC. Any other argument the agent left out
|
|
308
|
+
on an alert that does compare counts as the value ``create_metric_alert`` applies for it, so
|
|
309
|
+
omitting ``comparison_periods_ago`` matches 1 on a period comparison; a METRIC comparison has
|
|
310
|
+
no periods, and with no comparison there is nothing to default.
|
|
311
|
+
The comparison period itself (DAY, MONTH, ...) is not checked here: it is the granularity
|
|
312
|
+
of the comparison date filter, which ``filters`` asserts.
|
|
313
|
+
"""
|
|
314
|
+
if expected.comparison is None:
|
|
315
|
+
return True
|
|
316
|
+
kind = actual_args.get("comparison_kind") or ("METRIC" if actual_args.get("compare_metric_id") else None)
|
|
317
|
+
for arg, exp_value in expected.comparison.items():
|
|
318
|
+
act_raw = kind if arg == "comparison_kind" else actual_args.get(arg)
|
|
319
|
+
defaults_apply = arg != "comparison_periods_ago" or str(kind).upper() in _PERIOD_COMPARISON_KINDS
|
|
320
|
+
if act_raw is None and kind is not None and defaults_apply:
|
|
321
|
+
act_raw = _COMPARISON_ARG_DEFAULTS.get(arg)
|
|
322
|
+
# Only the fixture side of an object id is trimmed: a padded id is a different id.
|
|
323
|
+
actual = act_raw if arg in _COMPARISON_ID_ARGS else _canonical_comparison_value(arg, act_raw)
|
|
324
|
+
if actual != exp_value:
|
|
325
|
+
return False
|
|
326
|
+
return True
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def _check_title(expected: CatalogMetricAlert, actual_args: dict) -> bool:
|
|
330
|
+
"""Exact match on the alert name when the fixture states one.
|
|
331
|
+
|
|
332
|
+
Only the fixture side is trimmed: a name saved with padding is not the name the user asked for.
|
|
333
|
+
|
|
334
|
+
An omitted ``title`` fails: ``create_metric_alert`` then saves an auto-generated name, even
|
|
335
|
+
when ``automation_id`` carries a slug of the requested one.
|
|
336
|
+
"""
|
|
337
|
+
if expected.title is None:
|
|
338
|
+
return True
|
|
339
|
+
actual = actual_args.get("title")
|
|
340
|
+
return isinstance(actual, str) and actual == expected.title
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
def _check_dashboard(expected: CatalogMetricAlert, actual_args: dict) -> bool:
|
|
344
|
+
"""Compare the bound dashboard id when the fixture states one; the actual id verbatim."""
|
|
345
|
+
if expected.dashboard_id is None:
|
|
346
|
+
return True
|
|
347
|
+
actual = actual_args.get("dashboard_id")
|
|
348
|
+
return isinstance(actual, str) and actual == expected.dashboard_id
|
|
349
|
+
|
|
350
|
+
|
|
237
351
|
def _check_metric(expected: CatalogMetricAlert, actual_args: dict) -> bool:
|
|
238
352
|
if not expected.metric_id:
|
|
239
353
|
return True
|
|
@@ -305,35 +419,14 @@ def _check_recipients(
|
|
|
305
419
|
) -> bool:
|
|
306
420
|
if not expected.recipients:
|
|
307
421
|
return True
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
# external_recipients is JSON-encoded (e.g. '["email@example.com"]')
|
|
311
|
-
try:
|
|
312
|
-
parsed = json.loads(act_recip_raw)
|
|
313
|
-
act_recip = parsed if isinstance(parsed, list) else _parse_recipients(act_recip_raw)
|
|
314
|
-
except (json.JSONDecodeError, ValueError):
|
|
315
|
-
act_recip = _parse_recipients(act_recip_raw)
|
|
316
|
-
elif isinstance(act_recip_raw, list):
|
|
317
|
-
act_recip = act_recip_raw
|
|
318
|
-
else:
|
|
319
|
-
act_recip = []
|
|
320
|
-
act_internal_raw = actual_args.get("internal_recipients")
|
|
321
|
-
# internal_recipients is declared `anyOf: [array of string, string, null]` in the
|
|
322
|
-
# create_metric_alert tool schema -- a single id as a bare string is schema-legal,
|
|
323
|
-
# not a malformed call, so it needs the same string/list normalization already
|
|
324
|
-
# applied to recipients/external_recipients above.
|
|
325
|
-
if isinstance(act_internal_raw, str):
|
|
326
|
-
act_internal = [act_internal_raw]
|
|
327
|
-
elif isinstance(act_internal_raw, list):
|
|
328
|
-
act_internal = act_internal_raw
|
|
329
|
-
else:
|
|
330
|
-
act_internal = []
|
|
422
|
+
act_recip = _recipient_list(actual_args.get("recipients", actual_args.get("external_recipients")), split_bare=True)
|
|
423
|
+
act_internal = _recipient_list(actual_args.get("internal_recipients"), split_bare=False)
|
|
331
424
|
wants_current_user, expected_emails = _split_current_user(expected.recipients)
|
|
332
425
|
if wants_current_user:
|
|
333
426
|
if current_user_id is None or current_user_id not in act_internal:
|
|
334
427
|
return False
|
|
335
428
|
other_internal = set(act_internal) - {current_user_id}
|
|
336
|
-
external = set(act_recip
|
|
429
|
+
external = set(act_recip)
|
|
337
430
|
if external - set(expected_emails):
|
|
338
431
|
return False
|
|
339
432
|
# An email not sent externally must arrive as its user's id (workspace-restricted channel).
|
|
@@ -345,7 +438,7 @@ def _check_recipients(
|
|
|
345
438
|
# One lookup per email: a bulk lookup returns only the users that exist, hiding a missing one.
|
|
346
439
|
ids_per_email = [_resolve_internal_recipient_ids(sdk, [email]) for email in unmatched]
|
|
347
440
|
return all(ids_per_email) and other_internal == set().union(*ids_per_email)
|
|
348
|
-
if set(expected_emails) == set(act_recip
|
|
441
|
+
if set(expected_emails) == set(act_recip):
|
|
349
442
|
return True
|
|
350
443
|
if sdk is not None and act_internal:
|
|
351
444
|
internal_recipient_ids = _resolve_internal_recipient_ids(sdk, expected_emails)
|
|
@@ -489,6 +582,15 @@ def generate_simulated_alert_response(
|
|
|
489
582
|
|
|
490
583
|
original_request = f'Your original request to the agent was: "{question}"\n' if question else ""
|
|
491
584
|
|
|
585
|
+
# Only a stated title is enforced: an unstated one is the agent's to choose, and telling the
|
|
586
|
+
# sim-user nothing keeps it from objecting to a generated name.
|
|
587
|
+
title_rule = (
|
|
588
|
+
f'8. The alert must be named exactly "{expected.title}". If a summary or proposal shows a '
|
|
589
|
+
"different name, do NOT confirm: state that exact name and ask the agent to use it.\n"
|
|
590
|
+
if expected.title
|
|
591
|
+
else ""
|
|
592
|
+
)
|
|
593
|
+
|
|
492
594
|
system_prompt = (
|
|
493
595
|
"You are a user requesting creation of an alert for a metric from an AI agent. "
|
|
494
596
|
"Respond naturally but always steer toward the exact values you were given.\n"
|
|
@@ -509,7 +611,10 @@ def generate_simulated_alert_response(
|
|
|
509
611
|
+ recipients_rule
|
|
510
612
|
+ filters_rule
|
|
511
613
|
+ f"6. Proactively state how often you want to be alerted in your first reply: {trigger_request}. "
|
|
512
|
-
" Repeat it if the agent proposes a different cadence.\n"
|
|
614
|
+
" Repeat it if the agent proposes a different cadence.\n"
|
|
615
|
+
+ period_rule
|
|
616
|
+
+ title_rule
|
|
617
|
+
+ "Reply concisely and directly."
|
|
513
618
|
)
|
|
514
619
|
|
|
515
620
|
messages: list = [{"role": "system", "content": system_prompt}]
|
|
@@ -550,22 +655,28 @@ class AlertEvaluation:
|
|
|
550
655
|
recipients_correct: bool
|
|
551
656
|
attributes_correct: bool = True
|
|
552
657
|
granularity_correct: bool = True
|
|
658
|
+
# ``None``: the item states no such expectation, so the check is neither scored nor gated.
|
|
659
|
+
comparison_correct: bool | None = None
|
|
660
|
+
title_correct: bool | None = None
|
|
661
|
+
dashboard_correct: bool | None = None
|
|
662
|
+
|
|
663
|
+
def checks(self) -> dict[str, bool]:
|
|
664
|
+
"""Every check that ran, by name; strict_pass requires all of them.
|
|
665
|
+
|
|
666
|
+
The conditional checks are left out when unasserted, so an item that names no title does
|
|
667
|
+
not report a ``title_correct`` it was never scored on, and a refusal on it is not counted
|
|
668
|
+
as a title failure.
|
|
669
|
+
"""
|
|
670
|
+
ran: dict[str, bool] = {name: getattr(self, name) for name in _ALERT_CHECKS}
|
|
671
|
+
for name in _CONDITIONAL_ALERT_CHECKS:
|
|
672
|
+
value = getattr(self, name)
|
|
673
|
+
if value is not None:
|
|
674
|
+
ran[name] = value
|
|
675
|
+
return ran
|
|
553
676
|
|
|
554
677
|
@property
|
|
555
678
|
def strict_pass(self) -> bool:
|
|
556
|
-
return all(
|
|
557
|
-
[
|
|
558
|
-
self.alert_created,
|
|
559
|
-
self.operator_correct,
|
|
560
|
-
self.threshold_correct,
|
|
561
|
-
self.trigger_correct,
|
|
562
|
-
self.filters_correct,
|
|
563
|
-
self.metric_correct,
|
|
564
|
-
self.recipients_correct,
|
|
565
|
-
self.attributes_correct,
|
|
566
|
-
self.granularity_correct,
|
|
567
|
-
]
|
|
568
|
-
)
|
|
679
|
+
return all(self.checks().values())
|
|
569
680
|
|
|
570
681
|
|
|
571
682
|
@dataclass
|
|
@@ -666,6 +777,68 @@ def _normalize_expected_attributes(expected: dict) -> list | None:
|
|
|
666
777
|
raise ValueError(f"Attributes expectation must be a list or a display string, got {type(attributes).__name__}")
|
|
667
778
|
|
|
668
779
|
|
|
780
|
+
def _normalize_expected_comparison(expected: dict) -> dict[str, str | int | float | None] | None:
|
|
781
|
+
"""
|
|
782
|
+
* ``Comparison`` object -> its stated properties, keyed by tool-argument name
|
|
783
|
+
* "None" / "no comparison" -> ``{"comparison_kind": None}`` (stated: no comparison)
|
|
784
|
+
* absent, empty, or prose -> ``None`` (unstated; comparison not asserted)
|
|
785
|
+
|
|
786
|
+
Each property of the object is asserted only when it carries a value, so an item can pin
|
|
787
|
+
the comparison kind without also pinning the date dataset the agent may pick.
|
|
788
|
+
"""
|
|
789
|
+
comparison = _case_insensitive_get(expected, "comparison")
|
|
790
|
+
if comparison is None:
|
|
791
|
+
return None
|
|
792
|
+
if isinstance(comparison, str):
|
|
793
|
+
return {"comparison_kind": None} if any(kw in comparison.lower() for kw in _NO_COMPARISON_MARKERS) else None
|
|
794
|
+
if not isinstance(comparison, dict):
|
|
795
|
+
raise ValueError(f"Comparison expectation must be an object or a display string, got {comparison!r}")
|
|
796
|
+
stated: dict[str, str | int | float | None] = {}
|
|
797
|
+
for key, value in comparison.items():
|
|
798
|
+
name = str(key).strip().lower()
|
|
799
|
+
arg = _COMPARISON_ARGS.get(name) or (name if name in _COMPARISON_ARGS.values() else None)
|
|
800
|
+
if arg is None:
|
|
801
|
+
# Validated here so a misspelled property fails before the run spends an API call.
|
|
802
|
+
raise ValueError(f"Unrecognised comparison property {key!r}; expected one of {sorted(_COMPARISON_ARGS)}")
|
|
803
|
+
canonical = _canonical_comparison_value(arg, value)
|
|
804
|
+
if canonical is None and arg == "comparison_periods_ago" and str(value or "").strip():
|
|
805
|
+
raise ValueError(f"Comparison periods_ago must be a number, got {value!r}")
|
|
806
|
+
if canonical is not None:
|
|
807
|
+
stated[arg] = canonical
|
|
808
|
+
return stated or None
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
def _normalize_expected_text(expected: dict, *keys: str) -> str | None:
|
|
812
|
+
"""A stated string expectation, or ``None`` when absent or blank (unasserted)."""
|
|
813
|
+
value = _case_insensitive_get(expected, *keys)
|
|
814
|
+
if value is None:
|
|
815
|
+
return None
|
|
816
|
+
if not isinstance(value, str):
|
|
817
|
+
raise ValueError(f"{keys[0]} expectation must be a string, got {value!r}")
|
|
818
|
+
return value.strip() or None
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
def _normalize_expected_dashboard(expected: dict) -> str | None:
|
|
822
|
+
"""
|
|
823
|
+
* ``dashboard_id`` -> that id
|
|
824
|
+
* ``Dashboard`` "Title (id)" -> the id in the trailing parentheses, as ``Metric`` is read
|
|
825
|
+
* absent / empty -> ``None`` (unstated; binding not asserted)
|
|
826
|
+
|
|
827
|
+
A ``Dashboard`` without a trailing ``(id)`` raises: a title alone can never equal the
|
|
828
|
+
``dashboard_id`` the tool receives, so the item would fail on every run.
|
|
829
|
+
"""
|
|
830
|
+
dashboard_id = _normalize_expected_text(expected, "dashboard_id")
|
|
831
|
+
if dashboard_id is not None:
|
|
832
|
+
return dashboard_id
|
|
833
|
+
display = _normalize_expected_text(expected, "dashboard")
|
|
834
|
+
if display is None:
|
|
835
|
+
return None
|
|
836
|
+
parsed = _parse_metric_id(display)
|
|
837
|
+
if parsed is None:
|
|
838
|
+
raise ValueError(f'Dashboard expectation must be "Title (id)", got {display!r}; use dashboard_id for a bare id')
|
|
839
|
+
return parsed
|
|
840
|
+
|
|
841
|
+
|
|
669
842
|
def _normalize_expected_output(expected: dict) -> CatalogMetricAlert:
|
|
670
843
|
"""Parse expected_output dict into CatalogMetricAlert, accepting display-format or internal-format keys."""
|
|
671
844
|
operator = _case_insensitive_get(expected, "operator") or "GREATER_THAN"
|
|
@@ -696,6 +869,9 @@ def _normalize_expected_output(expected: dict) -> CatalogMetricAlert:
|
|
|
696
869
|
granularity = AnomalyDetectionGranularity.parse(
|
|
697
870
|
_case_insensitive_get(expected, "granularity", "detection granularity")
|
|
698
871
|
)
|
|
872
|
+
comparison = _normalize_expected_comparison(expected)
|
|
873
|
+
title = _normalize_expected_text(expected, "title")
|
|
874
|
+
dashboard_id = _normalize_expected_dashboard(expected)
|
|
699
875
|
|
|
700
876
|
return CatalogMetricAlert(
|
|
701
877
|
operator=operator,
|
|
@@ -708,6 +884,9 @@ def _normalize_expected_output(expected: dict) -> CatalogMetricAlert:
|
|
|
708
884
|
filters=filters,
|
|
709
885
|
attributes=attributes,
|
|
710
886
|
granularity=granularity,
|
|
887
|
+
comparison=comparison,
|
|
888
|
+
title=title,
|
|
889
|
+
dashboard_id=dashboard_id,
|
|
711
890
|
)
|
|
712
891
|
|
|
713
892
|
|
|
@@ -893,6 +1072,13 @@ def run_agentic_alert_skill(
|
|
|
893
1072
|
and _check_recipients(expected, actual_args, sdk=sdk, current_user_id=current_user_id),
|
|
894
1073
|
attributes_correct=tool_called and _check_attributes(expected, actual_args),
|
|
895
1074
|
granularity_correct=tool_called and _check_granularity(expected, actual_args),
|
|
1075
|
+
comparison_correct=None
|
|
1076
|
+
if expected.comparison is None
|
|
1077
|
+
else tool_called and _check_comparison(expected, actual_args),
|
|
1078
|
+
title_correct=None if expected.title is None else tool_called and _check_title(expected, actual_args),
|
|
1079
|
+
dashboard_correct=None
|
|
1080
|
+
if expected.dashboard_id is None
|
|
1081
|
+
else tool_called and _check_dashboard(expected, actual_args),
|
|
896
1082
|
)
|
|
897
1083
|
return AlertRunResult(
|
|
898
1084
|
conversation_id=conv_id,
|
|
@@ -934,19 +1120,7 @@ def run_agentic_alert_skill(
|
|
|
934
1120
|
pass_power_k = all(r.eval.strict_pass for r in run_results)
|
|
935
1121
|
best = max(
|
|
936
1122
|
run_results,
|
|
937
|
-
key=lambda r: sum(
|
|
938
|
-
[
|
|
939
|
-
r.eval.alert_created,
|
|
940
|
-
r.eval.operator_correct,
|
|
941
|
-
r.eval.threshold_correct,
|
|
942
|
-
r.eval.trigger_correct,
|
|
943
|
-
r.eval.filters_correct,
|
|
944
|
-
r.eval.metric_correct,
|
|
945
|
-
r.eval.recipients_correct,
|
|
946
|
-
r.eval.attributes_correct,
|
|
947
|
-
r.eval.granularity_correct,
|
|
948
|
-
]
|
|
949
|
-
),
|
|
1123
|
+
key=lambda r: sum(r.eval.checks().values()),
|
|
950
1124
|
)
|
|
951
1125
|
return AgenticAlertSummary(
|
|
952
1126
|
run_results=run_results,
|
|
@@ -966,17 +1140,8 @@ def _run_detail(run: AlertRunResult) -> dict:
|
|
|
966
1140
|
Extracted so a failing run is described by exactly the same keys as the winning run --
|
|
967
1141
|
for this kind that means the full per-field check breakdown and the arguments the run sent.
|
|
968
1142
|
"""
|
|
969
|
-
ev = run.eval
|
|
970
1143
|
return {
|
|
971
|
-
|
|
972
|
-
"operator_correct": ev.operator_correct,
|
|
973
|
-
"threshold_correct": ev.threshold_correct,
|
|
974
|
-
"trigger_correct": ev.trigger_correct,
|
|
975
|
-
"filters_correct": ev.filters_correct,
|
|
976
|
-
"metric_correct": ev.metric_correct,
|
|
977
|
-
"recipients_correct": ev.recipients_correct,
|
|
978
|
-
"attributes_correct": ev.attributes_correct,
|
|
979
|
-
"granularity_correct": ev.granularity_correct,
|
|
1144
|
+
**run.eval.checks(),
|
|
980
1145
|
"actual_alert_arguments": run.actual_alert_arguments,
|
|
981
1146
|
# Why the loop stopped. alert_created=False alone cannot tell a refusal from a run
|
|
982
1147
|
# that hit max_iterations while still on track -- see LoopExit. Per-run rather than
|
|
@@ -1052,18 +1217,7 @@ def evaluate_agentic_alert_skill(
|
|
|
1052
1217
|
|
|
1053
1218
|
for run_idx, run in enumerate(summary.run_results):
|
|
1054
1219
|
pt = ctx.trace(run.conversation_id)
|
|
1055
|
-
|
|
1056
|
-
strict_checks = {
|
|
1057
|
-
"alert_created": ev.alert_created,
|
|
1058
|
-
"operator_correct": ev.operator_correct,
|
|
1059
|
-
"threshold_correct": ev.threshold_correct,
|
|
1060
|
-
"trigger_correct": ev.trigger_correct,
|
|
1061
|
-
"filters_correct": ev.filters_correct,
|
|
1062
|
-
"metric_correct": ev.metric_correct,
|
|
1063
|
-
"recipients_correct": ev.recipients_correct,
|
|
1064
|
-
"attributes_correct": ev.attributes_correct,
|
|
1065
|
-
"granularity_correct": ev.granularity_correct,
|
|
1066
|
-
}
|
|
1220
|
+
strict_checks = run.eval.checks()
|
|
1067
1221
|
with ctx.observe(pt, run_idx, conversation_id=run.conversation_id, output=strict_checks) as tid:
|
|
1068
1222
|
for score_name, value in strict_checks.items():
|
|
1069
1223
|
ctx.score(tid, name=score_name, value=float(value), data_type="BOOLEAN")
|
|
@@ -1112,13 +1266,8 @@ def evaluate_agentic_alert_skill(
|
|
|
1112
1266
|
gate_note = gate_failure_note(gate, runs_passed, runs_effective)
|
|
1113
1267
|
exc = AlertSkillAssertionError(
|
|
1114
1268
|
f"Alert skill assertion failed. {gate_note} strict_pass={ev.strict_pass}. "
|
|
1115
|
-
f"
|
|
1116
|
-
f"
|
|
1117
|
-
f"filters_correct={ev.filters_correct}, metric_correct={ev.metric_correct}, "
|
|
1118
|
-
f"recipients_correct={ev.recipients_correct}, "
|
|
1119
|
-
f"attributes_correct={ev.attributes_correct}, "
|
|
1120
|
-
f"granularity_correct={ev.granularity_correct}. "
|
|
1121
|
-
f"Actual args: {best.actual_alert_arguments}"
|
|
1269
|
+
+ ", ".join(f"{name}={value}" for name, value in ev.checks().items())
|
|
1270
|
+
+ f". Actual args: {best.actual_alert_arguments}"
|
|
1122
1271
|
)
|
|
1123
1272
|
exc.reasoning_steps = best.reasoning_steps
|
|
1124
1273
|
exc.conversation_id = best.conversation_id
|