gooddata-eval 1.80.0__tar.gz → 1.80.1.dev1__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.0 → gooddata_eval-1.80.1.dev1}/PKG-INFO +2 -2
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/pyproject.toml +2 -2
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_clarification.py +3 -2
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_failed_runs.py +15 -5
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/dashboard_skill.py +139 -31
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/models.py +6 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/reporting/html_report.py +4 -1
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_dashboard_skill.py +192 -2
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_guardrail.py +52 -1
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_html_report.py +3 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/.gitignore +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/AGENTS.md +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/CLAUDE.md +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/LICENSE.txt +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/Makefile +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/README.md +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/scripts/calibrate_takeaway_judge.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/scripts/verify_guardrail_refusal_criteria.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/_version.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/cli/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/cli/agentic_runner.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/cli/main.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/_output.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/_retry.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_gate.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/conversation.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/document_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/forecasting.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/general_question.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/kda_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/visualization.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/what_if.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/chat/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/chat/render.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/chat/sse_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/config.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/connection.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/dataset/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/dataset/local.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/base.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/summary.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/granularity.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/interaction.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/_env.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/observations.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/langfuse/sink.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/number_format.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/reporting/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/reporting/console.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/reporting/json_report.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/reporting/report_template.html +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/runner.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/scoring.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/summary/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/summary/http_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/timing.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/workspace.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/__init__.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/_fake_langfuse.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/conftest.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/fixtures/sse_visualization_stream.txt +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/fixtures/takeaway_calibration.json +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_alert_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_anomaly_detection.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_conversation.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_dashboard_summary.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_document_editor_takeaways.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_document_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_forecasting.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_gate.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_general_question.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_join_trace.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_kda_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_langfuse_trace.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_metric_skill.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_observe_experiment.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_run_context.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_runner.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_search_tool.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_visualization.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_agentic_what_if.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_alert_skill_evaluator.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_chat_render.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_cli.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_connection.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_deep_subset.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_fake_langfuse.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_from_insights.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_guardrail_criteria.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_interaction.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_e2e_fake_server.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_env.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_experiment.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_item_scope.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_observations.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_otlp.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_sink.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_langfuse_source.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_llm_judge.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_local_loader.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_maql_normalize.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_metric_skill_evaluator.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_models.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_number_format.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_reporting.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_runner.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_scoring.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_search_tool_evaluator.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_sse_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_summary_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_summary_evaluator.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_takeaway_client.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_takeaway_evaluate.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_takeaway_evaluator.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_text_evaluators.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_timing.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_trace_linker.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_visualization_evaluator.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tests/test_workspace.py +0 -0
- {gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gooddata-eval
|
|
3
|
-
Version: 1.80.
|
|
3
|
+
Version: 1.80.1.dev1
|
|
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.80.
|
|
20
|
+
Requires-Dist: gooddata-sdk~=1.80.1.dev1
|
|
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.80.
|
|
4
|
+
version = "1.80.1.dev1"
|
|
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.80.
|
|
14
|
+
"gooddata-sdk~=1.80.1.dev1",
|
|
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.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_clarification.py
RENAMED
|
@@ -370,7 +370,8 @@ class ClarifyingAnswers(BaseModel):
|
|
|
370
370
|
return "\n\n".join(f"**{text}**\n\n{answer}" for _, text, answer in sorted(sections, key=lambda s: s[0]))
|
|
371
371
|
|
|
372
372
|
|
|
373
|
-
def
|
|
373
|
+
def all_questions(chat_result: ChatResult) -> list[dict]:
|
|
374
|
+
"""Every question of every ``clarifyingQuestions`` part the reply carried, in order, whatever item it belongs to."""
|
|
374
375
|
parts = [p for p in chat_result.unhandled_parts or [] if p.get("type") == "clarifyingQuestions"]
|
|
375
376
|
return [q for p in parts for q in p.get("questions") or []]
|
|
376
377
|
|
|
@@ -502,7 +503,7 @@ def after_answers_mismatches(
|
|
|
502
503
|
if skipped_questions_not_reasked:
|
|
503
504
|
for question in skipped:
|
|
504
505
|
asked_again = any(
|
|
505
|
-
_same_question(later, question) for _, reply, _ in replies_after for later in
|
|
506
|
+
_same_question(later, question) for _, reply, _ in replies_after for later in all_questions(reply)
|
|
506
507
|
)
|
|
507
508
|
if asked_again:
|
|
508
509
|
out.append(f"asked the skipped question {question['text']!r} again")
|
{gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/_failed_runs.py
RENAMED
|
@@ -9,10 +9,15 @@ are not lost -- every kind keeps its ``run_results`` list -- they simply never l
|
|
|
9
9
|
evaluator. This turns that list into the same records the single-shot path writes.
|
|
10
10
|
|
|
11
11
|
Keys mirror ``core.runner._failed_run_record`` so one consumer can read ``failed_runs`` from
|
|
12
|
-
either path without branching on test kind. ``tool_call_count``/``tool_names``
|
|
13
|
-
addition: the agentic kinds capture tool calls per run, and an agent that produced a
|
|
14
|
-
answer having made no tool call at all answered from the model's own knowledge rather
|
|
15
|
-
from the workspace -- a distinction no other recorded field exposes.
|
|
12
|
+
either path without branching on test kind. ``tool_call_count``/``tool_names``/``tool_calls``
|
|
13
|
+
are the addition: the agentic kinds capture tool calls per run, and an agent that produced a
|
|
14
|
+
final answer having made no tool call at all answered from the model's own knowledge rather
|
|
15
|
+
than from the workspace -- a distinction no other recorded field exposes.
|
|
16
|
+
|
|
17
|
+
``tool_calls`` holds each call's arguments and result, in the shape of ``build_tool_calls``.
|
|
18
|
+
It is recorded for every kind whose run result keeps ``tool_call_events``, including the
|
|
19
|
+
kinds whose ``detail`` has no ``tool_calls``. A run result without that list, such as a
|
|
20
|
+
document takeaway run, records an empty list.
|
|
16
21
|
"""
|
|
17
22
|
|
|
18
23
|
from __future__ import annotations
|
|
@@ -20,6 +25,8 @@ from __future__ import annotations
|
|
|
20
25
|
from collections.abc import Callable, Sequence
|
|
21
26
|
from typing import Any
|
|
22
27
|
|
|
28
|
+
from gooddata_eval.core.models import build_tool_calls
|
|
29
|
+
|
|
23
30
|
|
|
24
31
|
def build_failed_runs(
|
|
25
32
|
run_results: Sequence[Any],
|
|
@@ -33,7 +40,9 @@ def build_failed_runs(
|
|
|
33
40
|
kinds: guardrail reads ``run.passed`` while visualization reads
|
|
34
41
|
``run.eval_result.strict_pass``, and each kind's diagnostic dict is its own. Everything
|
|
35
42
|
read here directly goes through ``getattr`` with a default, so a kind whose run result
|
|
36
|
-
lacks a field (no response id, no tool capture) records a null instead of raising.
|
|
43
|
+
lacks a field (no response id, no tool capture) records a null instead of raising. The
|
|
44
|
+
events inside ``tool_call_events`` are the exception: ``build_tool_calls`` reads them as
|
|
45
|
+
``ToolCallEvent``s, so a run that has the list must hold real events in it.
|
|
37
46
|
|
|
38
47
|
A run the judge could not grade is recorded like any other non-passing run, with its
|
|
39
48
|
``error`` set. That matches ``core/runner.py``, which also records ungraded runs; the
|
|
@@ -57,6 +66,7 @@ def build_failed_runs(
|
|
|
57
66
|
"reasoning_steps": reasoning_steps,
|
|
58
67
|
"tool_call_count": len(tool_calls),
|
|
59
68
|
"tool_names": [getattr(e, "function_name", None) for e in tool_calls],
|
|
69
|
+
"tool_calls": build_tool_calls(tool_calls),
|
|
60
70
|
}
|
|
61
71
|
)
|
|
62
72
|
return records
|
{gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/agentic/dashboard_skill.py
RENAMED
|
@@ -10,6 +10,8 @@ from typing import Any
|
|
|
10
10
|
|
|
11
11
|
import jsonpatch
|
|
12
12
|
|
|
13
|
+
from gooddata_eval.core.agentic._clarification import all_questions
|
|
14
|
+
from gooddata_eval.core.agentic._conversation_context import CONFIRMATION_REPLY, asks_in_text, classify_reply, clip
|
|
13
15
|
from gooddata_eval.core.agentic._failed_runs import build_failed_runs
|
|
14
16
|
from gooddata_eval.core.agentic._gate import (
|
|
15
17
|
DEFAULT_GATE,
|
|
@@ -54,9 +56,10 @@ _DEFAULT_K = 1
|
|
|
54
56
|
# the loop ends there rather than replying into silence. Fewer than metric_skill's seven
|
|
55
57
|
# because those rounds do carry new content, its reply being generated per turn by an LLM.
|
|
56
58
|
#
|
|
57
|
-
# Only creation ever reaches the later rounds.
|
|
58
|
-
#
|
|
59
|
-
#
|
|
59
|
+
# Only creation ever reaches the later rounds. The creation reply names charts and a date range
|
|
60
|
+
# and answers nothing a rename or a resize could have asked, so an edit that asks back is
|
|
61
|
+
# answered once with its fixture's `clarification_reply`, and stops there when it has none or
|
|
62
|
+
# asks again. An edit that only asks to go ahead is told yes, which spends no reply.
|
|
60
63
|
#
|
|
61
64
|
# The cost of the slack is that four turns at ChatClient's 300s read timeout exceed the 720s
|
|
62
65
|
# per-test timeout gdc-nas derives for a k=1 dataset, so a run that stalls on every turn is cut
|
|
@@ -1067,9 +1070,14 @@ def build_simulated_reply(expected_output: dict) -> str:
|
|
|
1067
1070
|
"""Build the reply the simulated user sends when the agent asks back instead of drafting.
|
|
1068
1071
|
|
|
1069
1072
|
Deterministic and LLM-free: the only things the agent still needs are the charts and the
|
|
1070
|
-
date range, and
|
|
1071
|
-
attributable to the agent rather than to a simulated user that
|
|
1072
|
-
each run.
|
|
1073
|
+
date range, and the expectation states both whenever the case checks them. A fixed reply
|
|
1074
|
+
also keeps a failure attributable to the agent rather than to a simulated user that
|
|
1075
|
+
phrased things differently each run.
|
|
1076
|
+
|
|
1077
|
+
The date range is said only when the case states one, ``null`` included. A case without
|
|
1078
|
+
the key does not look at the date filter, so naming a period would be the reply asserting
|
|
1079
|
+
something the case never did -- and "all time" can contradict the date filters of the
|
|
1080
|
+
existing charts the case expects to be reused.
|
|
1073
1081
|
"""
|
|
1074
1082
|
visualizations = expected_output.get("visualizations") or []
|
|
1075
1083
|
existing = [str(v.get("title", "")) for v in visualizations if v.get("id") is not None]
|
|
@@ -1095,11 +1103,16 @@ def build_simulated_reply(expected_output: dict) -> str:
|
|
|
1095
1103
|
quoted = " and ".join(f'"{c}"' for c in charts)
|
|
1096
1104
|
placements.append(f"{quoted} on {on_tab}" if charts else on_tab)
|
|
1097
1105
|
tabs = f"Use these tabs: {'; '.join(placements)}. " if placements else ""
|
|
1106
|
+
date = (
|
|
1107
|
+
f"Date range: {_date_range_text(expected_output.get('date_range'))}. "
|
|
1108
|
+
if _has_date_range(expected_output)
|
|
1109
|
+
else ""
|
|
1110
|
+
)
|
|
1098
1111
|
|
|
1099
1112
|
return (
|
|
1100
1113
|
f"Please use these charts: {', and '.join(segments)}. "
|
|
1101
1114
|
f"{tabs}"
|
|
1102
|
-
f"
|
|
1115
|
+
f"{date}"
|
|
1103
1116
|
f"Anything else is up to you. Please create the dashboard now."
|
|
1104
1117
|
)
|
|
1105
1118
|
|
|
@@ -1243,6 +1256,16 @@ def _validate_expectation(expected_output: dict) -> None:
|
|
|
1243
1256
|
for pattern in must_not_match:
|
|
1244
1257
|
_compile_pattern(pattern)
|
|
1245
1258
|
|
|
1259
|
+
if "clarification_reply" in expected_output:
|
|
1260
|
+
reply = expected_output["clarification_reply"]
|
|
1261
|
+
if not isinstance(reply, str) or not reply.strip():
|
|
1262
|
+
raise ValueError(f"clarification_reply must be a non-empty reply, got {reply!r}")
|
|
1263
|
+
if not _is_edit(expected_output):
|
|
1264
|
+
raise ValueError(
|
|
1265
|
+
"clarification_reply is for an edit case; a creation case is answered with the reply "
|
|
1266
|
+
"built from its charts and date range"
|
|
1267
|
+
)
|
|
1268
|
+
|
|
1246
1269
|
forbidden = _forbidden_visualizations(expected_output)
|
|
1247
1270
|
if not isinstance(forbidden, list):
|
|
1248
1271
|
raise ValueError(f"must_not_contain must be a list of chart expectations, got {forbidden!r}")
|
|
@@ -2002,6 +2025,47 @@ def evaluate_dashboard_response(
|
|
|
2002
2025
|
)
|
|
2003
2026
|
|
|
2004
2027
|
|
|
2028
|
+
# Long enough for a question with its options, short enough to keep the assertion message readable.
|
|
2029
|
+
_QUOTED_QUESTION_CHARS = 300
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
def _asked_question(chat_result: ChatResult, response_text: str) -> str:
|
|
2033
|
+
"""What the agent asked: the ``clarifyingQuestions`` part's questions when it sent one, else its text.
|
|
2034
|
+
|
|
2035
|
+
The structured part is what ``classify_reply`` reads as the question, and prose sent beside it
|
|
2036
|
+
("I need more details.") would quote the lead-in rather than what was asked.
|
|
2037
|
+
"""
|
|
2038
|
+
questions = [str(q.get("text") or "").strip() for q in all_questions(chat_result)]
|
|
2039
|
+
return " ".join(q for q in questions if q) or response_text
|
|
2040
|
+
|
|
2041
|
+
|
|
2042
|
+
def _quote(text: str) -> str:
|
|
2043
|
+
"""The agent's words cut to a readable length and quoted, or a marker when it said nothing."""
|
|
2044
|
+
clipped = clip(text, _QUOTED_QUESTION_CHARS)
|
|
2045
|
+
return repr(clipped) if clipped else "(no text)"
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
def _unacted_edit_note(response_text: str) -> str:
|
|
2049
|
+
"""Say what an edit run stopped on when the agent neither patched nor asked.
|
|
2050
|
+
|
|
2051
|
+
Not scored, like ``_unanswered_edit_note``: it tells a reply that gave up apart from one that asked.
|
|
2052
|
+
"""
|
|
2053
|
+
return f"the agent replied on an edit without a patch or a question, so the run stopped: {_quote(response_text)}"
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
def _unanswered_edit_note(question: str, *, replied: bool, has_reply: bool) -> str:
|
|
2057
|
+
"""Say which question an edit run stopped on, so triage can tell a fixture gap from the agent.
|
|
2058
|
+
|
|
2059
|
+
Not scored: the run already fails on the missing patch, and this only says why it never got one.
|
|
2060
|
+
"""
|
|
2061
|
+
quoted = _quote(question)
|
|
2062
|
+
if replied:
|
|
2063
|
+
return f"the agent asked again after the case's clarification_reply, and the run stopped: {quoted}"
|
|
2064
|
+
if has_reply:
|
|
2065
|
+
return f"the turn budget ran out before the case's clarification_reply could be sent: {quoted}"
|
|
2066
|
+
return f"the agent asked back on an edit and the case has no clarification_reply, so the run stopped: {quoted}"
|
|
2067
|
+
|
|
2068
|
+
|
|
2005
2069
|
def _execute_single_dashboard_run(
|
|
2006
2070
|
client: ChatClient,
|
|
2007
2071
|
conversation_id: str,
|
|
@@ -2024,6 +2088,11 @@ def _execute_single_dashboard_run(
|
|
|
2024
2088
|
turns = 0
|
|
2025
2089
|
steps = 0
|
|
2026
2090
|
current_question = question
|
|
2091
|
+
# Validated to be on an edit case only, and a non-empty string when present.
|
|
2092
|
+
clarification_reply: str | None = expected_output.get("clarification_reply")
|
|
2093
|
+
reply_sent = False
|
|
2094
|
+
# Why an edit stopped without a patch, appended to the evaluation as an unscored note.
|
|
2095
|
+
edit_note: str | None = None
|
|
2027
2096
|
reasoning_steps: list[str] = []
|
|
2028
2097
|
response_id: str | None = None
|
|
2029
2098
|
all_tool_call_events: list[ToolCallEvent] = []
|
|
@@ -2033,9 +2102,7 @@ def _execute_single_dashboard_run(
|
|
|
2033
2102
|
tool_index_offset = 0
|
|
2034
2103
|
reasoning_index_offset = 0
|
|
2035
2104
|
# Defaults to BUDGET_EXHAUSTED: every other exit assigns explicitly, so a loop that
|
|
2036
|
-
# simply runs out of range()
|
|
2037
|
-
# is the same shape of outcome -- the agent answered, just not with the dashboard tool)
|
|
2038
|
-
# is labelled correctly with no trailing else.
|
|
2105
|
+
# simply runs out of range() is labelled correctly with no trailing else.
|
|
2039
2106
|
exit_reason = LoopExit.BUDGET_EXHAUSTED
|
|
2040
2107
|
|
|
2041
2108
|
run_started = time.monotonic()
|
|
@@ -2121,36 +2188,77 @@ def _execute_single_dashboard_run(
|
|
|
2121
2188
|
# restates the charts and the date range and asks again for the dashboard, which is
|
|
2122
2189
|
# pressure to build the very thing the case says must not be built -- so a correct
|
|
2123
2190
|
# agent would be talked out of the right answer by the harness.
|
|
2191
|
+
exit_reason = LoopExit.STOPPED_EARLY
|
|
2124
2192
|
break
|
|
2193
|
+
reply_kind = classify_reply(chat_result, response_text)
|
|
2194
|
+
if is_edit and reply_kind == "confirmation" and asks_in_text(chat_result, response_text):
|
|
2195
|
+
# "Which widget should I resize? Please confirm." asks something a yes does not answer.
|
|
2196
|
+
reply_kind = "question"
|
|
2197
|
+
if is_edit:
|
|
2198
|
+
# The creation reply names charts and a date range, which answers nothing a rename
|
|
2199
|
+
# or a resize could have asked, and nothing here can guess what an edit question
|
|
2200
|
+
# needs. Only the fixture's own reply is sent, only to a turn that asked (as
|
|
2201
|
+
# document_skill gates it), and only once: a second question is one its author did
|
|
2202
|
+
# not foresee, so the run stops and says what was asked, which tells a fixture that
|
|
2203
|
+
# needs a reply apart from an agent that did the wrong thing. A turn that asked
|
|
2204
|
+
# nothing -- a rejected patch reported back, say -- is not nudged into a retry. A turn
|
|
2205
|
+
# that only asks to go ahead is told yes, as conversation.py does; that spends no reply,
|
|
2206
|
+
# and the iteration cap still bounds it.
|
|
2207
|
+
# Checked before the iteration cap: these stops are the harness having nothing to
|
|
2208
|
+
# send, not the budget running out, and each still says what went unanswered.
|
|
2209
|
+
if reply_kind == "no_action":
|
|
2210
|
+
edit_note = _unacted_edit_note(response_text)
|
|
2211
|
+
exit_reason = LoopExit.STOPPED_EARLY
|
|
2212
|
+
break
|
|
2213
|
+
if reply_kind == "question" and (clarification_reply is None or reply_sent):
|
|
2214
|
+
edit_note = _unanswered_edit_note(
|
|
2215
|
+
_asked_question(chat_result, response_text),
|
|
2216
|
+
replied=reply_sent,
|
|
2217
|
+
has_reply=clarification_reply is not None,
|
|
2218
|
+
)
|
|
2219
|
+
exit_reason = LoopExit.STOPPED_EARLY
|
|
2220
|
+
break
|
|
2125
2221
|
if iteration >= max_iterations - 1:
|
|
2222
|
+
if is_edit and reply_kind == "question":
|
|
2223
|
+
# A question here still had its reply to send; a confirmation needs no note.
|
|
2224
|
+
edit_note = _unanswered_edit_note(
|
|
2225
|
+
_asked_question(chat_result, response_text), replied=False, has_reply=True
|
|
2226
|
+
)
|
|
2126
2227
|
break
|
|
2228
|
+
if is_edit and reply_kind == "confirmation":
|
|
2229
|
+
current_question = CONFIRMATION_REPLY
|
|
2230
|
+
answering_with = "a confirmation"
|
|
2231
|
+
elif is_edit and clarification_reply is not None:
|
|
2232
|
+
reply_sent = True
|
|
2233
|
+
current_question = clarification_reply
|
|
2234
|
+
answering_with = "the case's clarification_reply"
|
|
2235
|
+
else:
|
|
2236
|
+
current_question = build_simulated_reply(expected_output)
|
|
2237
|
+
answering_with = "the expected charts and date range"
|
|
2127
2238
|
log_timer(
|
|
2128
2239
|
f"[timer] dashboard_skill {conversation_id} GoodData turn {turns} complete after "
|
|
2129
|
-
f"{agent_elapsed:.2f}s; answering with
|
|
2240
|
+
f"{agent_elapsed:.2f}s; answering with {answering_with}"
|
|
2130
2241
|
)
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2242
|
+
|
|
2243
|
+
evaluation = evaluate_dashboard_response(
|
|
2244
|
+
tool_result,
|
|
2245
|
+
dashboard_part,
|
|
2246
|
+
expected_output,
|
|
2247
|
+
_skill_activated(all_tool_call_events, _required_skill(expected_output)),
|
|
2248
|
+
patch_part=patch_part,
|
|
2249
|
+
answer_text=answer_text,
|
|
2250
|
+
# Any call, not just a successful one -- see DashboardEvaluation. BOTH tools,
|
|
2251
|
+
# not the one this case selected: a refusal is a creation shape, so `tool` is
|
|
2252
|
+
# `draft_dashboard`, and an agent that routed to the editor and had a
|
|
2253
|
+
# `patch_dashboard` call rejected would otherwise leave this false and pass.
|
|
2254
|
+
producing_tool_called=any(tc.function_name in (_DRAFT_TOOL, _PATCH_TOOL) for tc in all_tool_call_events),
|
|
2255
|
+
)
|
|
2256
|
+
if edit_note is not None:
|
|
2257
|
+
evaluation.notes.append(edit_note)
|
|
2138
2258
|
|
|
2139
2259
|
return DashboardRunResult(
|
|
2140
2260
|
conversation_id=conversation_id,
|
|
2141
|
-
evaluation=
|
|
2142
|
-
tool_result,
|
|
2143
|
-
dashboard_part,
|
|
2144
|
-
expected_output,
|
|
2145
|
-
_skill_activated(all_tool_call_events, _required_skill(expected_output)),
|
|
2146
|
-
patch_part=patch_part,
|
|
2147
|
-
answer_text=answer_text,
|
|
2148
|
-
# Any call, not just a successful one -- see DashboardEvaluation. BOTH tools,
|
|
2149
|
-
# not the one this case selected: a refusal is a creation shape, so `tool` is
|
|
2150
|
-
# `draft_dashboard`, and an agent that routed to the editor and had a
|
|
2151
|
-
# `patch_dashboard` call rejected would otherwise leave this false and pass.
|
|
2152
|
-
producing_tool_called=any(tc.function_name in (_DRAFT_TOOL, _PATCH_TOOL) for tc in all_tool_call_events),
|
|
2153
|
-
),
|
|
2261
|
+
evaluation=evaluation,
|
|
2154
2262
|
tool_result=tool_result,
|
|
2155
2263
|
dashboard_part=dashboard_part,
|
|
2156
2264
|
patch_part=patch_part,
|
|
@@ -40,6 +40,12 @@ class LoopExit(str, Enum):
|
|
|
40
40
|
"""The loop hit ``max_iterations`` without the agent producing its output. Says nothing
|
|
41
41
|
about whether the agent was on track; it may have been one turn away."""
|
|
42
42
|
|
|
43
|
+
STOPPED_EARLY = "stopped_early"
|
|
44
|
+
"""The agent replied and the harness had nothing to send back, so the loop stopped with
|
|
45
|
+
turns left: a question the case has no reply for, a second question after the case's
|
|
46
|
+
reply was spent, a reply that neither asked nor acted, or a refusal case answered in one
|
|
47
|
+
turn, where any follow-up would press the agent to build what it must not."""
|
|
48
|
+
|
|
43
49
|
SIMULATED_USER_FAILED = "simulated_user_failed"
|
|
44
50
|
"""The harness's own simulated-user model failed to produce a follow-up. A harness-side
|
|
45
51
|
fault, not an agent one -- reporting should treat it as an error, not a scored failure."""
|
{gooddata_eval-1.80.0 → gooddata_eval-1.80.1.dev1}/src/gooddata_eval/core/reporting/html_report.py
RENAMED
|
@@ -39,11 +39,14 @@ _REDACTED_DETAIL_FIELDS = frozenset({"transcript", "tool_calls"})
|
|
|
39
39
|
# item's top level left the identical content exposed one level deeper -- the top-level
|
|
40
40
|
# `reasoning` dropped while the same text survived verbatim in `failed_runs`.
|
|
41
41
|
#
|
|
42
|
+
# The run's own `tool_calls` goes for the reason `detail.tool_calls` goes: its arguments
|
|
43
|
+
# and results carry semantic-layer internals and real query rows.
|
|
44
|
+
#
|
|
42
45
|
# Kept on purpose, matching what the top level keeps: `reasoning_step_count` (a count, like
|
|
43
46
|
# `detail.turns`), `tool_call_count`/`tool_names` (which tool ran, never its arguments or
|
|
44
47
|
# its result -- the same line `latency_breakdown` draws), and the run's verdict, error and
|
|
45
48
|
# timings, which are facts about the run rather than about our infrastructure.
|
|
46
|
-
_REDACTED_RUN_FIELDS = frozenset({"conversation_id", "response_id", "reasoning_steps"})
|
|
49
|
+
_REDACTED_RUN_FIELDS = frozenset({"conversation_id", "response_id", "reasoning_steps", "tool_calls"})
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
def _redact_detail(detail: dict) -> dict:
|
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
from unittest.mock import MagicMock, patch
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
|
+
from gooddata_eval.core.agentic._conversation_context import CONFIRMATION_REPLY
|
|
7
8
|
from gooddata_eval.core.agentic.dashboard_skill import (
|
|
8
9
|
DashboardEvaluation,
|
|
9
10
|
DashboardSkillAssertionError,
|
|
@@ -718,8 +719,8 @@ class TestEditing:
|
|
|
718
719
|
|
|
719
720
|
def test_an_edit_that_asks_back_stops_rather_than_sending_the_creation_reply(self):
|
|
720
721
|
"""The creation reply names charts and a date range, which answers nothing a rename or
|
|
721
|
-
a resize could have asked.
|
|
722
|
-
|
|
722
|
+
a resize could have asked. Without a reply of its own the run stops, and says what the
|
|
723
|
+
agent asked so triage sees the case needs one."""
|
|
723
724
|
client = MagicMock()
|
|
724
725
|
client.send_message.return_value = _chat_result(
|
|
725
726
|
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
@@ -729,6 +730,180 @@ class TestEditing:
|
|
|
729
730
|
assert client.send_message.call_count == 1
|
|
730
731
|
assert summary.best.total_turns == 1
|
|
731
732
|
assert not summary.pass_at_k
|
|
733
|
+
# Three turns were left: the run stopped because nothing could answer, not on the budget.
|
|
734
|
+
assert summary.best.exit_reason is LoopExit.STOPPED_EARLY
|
|
735
|
+
assert summary.best.evaluation.notes == [
|
|
736
|
+
"the agent asked back on an edit and the case has no clarification_reply, so the run stopped: "
|
|
737
|
+
"'Which widget did you mean?'"
|
|
738
|
+
]
|
|
739
|
+
|
|
740
|
+
def test_an_edit_that_asks_back_is_answered_with_its_clarification_reply(self) -> None:
|
|
741
|
+
reply = "Rename the Order status chart. Apply it now, no need to confirm."
|
|
742
|
+
client = MagicMock()
|
|
743
|
+
client.send_message.side_effect = [
|
|
744
|
+
_chat_result(
|
|
745
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
746
|
+
text="Which widget did you mean?",
|
|
747
|
+
),
|
|
748
|
+
_chat_result(
|
|
749
|
+
tool_calls=[_tool_call("patch_dashboard", _patch_result())],
|
|
750
|
+
parts=[_edit_base_part(), _patch_part(TestPreservedFilters._RENAME, visualizations=[_ORDER_STATUS])],
|
|
751
|
+
),
|
|
752
|
+
]
|
|
753
|
+
summary = _run_with(client, {**_DE01_EXPECTED, "clarification_reply": reply}, max_iterations=None)
|
|
754
|
+
assert [call.args[1] for call in client.send_message.call_args_list] == [
|
|
755
|
+
"Could you create a dashboard?",
|
|
756
|
+
reply,
|
|
757
|
+
]
|
|
758
|
+
assert summary.pass_at_k
|
|
759
|
+
assert summary.best.total_turns == 2
|
|
760
|
+
assert summary.best.evaluation.notes == []
|
|
761
|
+
|
|
762
|
+
def test_the_clarification_reply_is_sent_once_and_a_second_question_is_quoted(self) -> None:
|
|
763
|
+
"""A second question is one the fixture's author did not foresee. Repeating the same
|
|
764
|
+
reply would not answer it, so the run stops and names it."""
|
|
765
|
+
reply = "Add both at the end of the section. Apply it now, no need to confirm."
|
|
766
|
+
client = MagicMock()
|
|
767
|
+
client.send_message.side_effect = [
|
|
768
|
+
_chat_result(
|
|
769
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
770
|
+
text="Where should I place them?",
|
|
771
|
+
),
|
|
772
|
+
_chat_result(text="Should the new chart be full width?"),
|
|
773
|
+
]
|
|
774
|
+
summary = _run_with(client, {**_DE01_EXPECTED, "clarification_reply": reply}, max_iterations=None)
|
|
775
|
+
assert client.send_message.call_count == 2
|
|
776
|
+
assert not summary.pass_at_k
|
|
777
|
+
assert summary.best.exit_reason is LoopExit.STOPPED_EARLY
|
|
778
|
+
assert summary.best.evaluation.notes == [
|
|
779
|
+
"the agent asked again after the case's clarification_reply, and the run stopped: "
|
|
780
|
+
"'Should the new chart be full width?'"
|
|
781
|
+
]
|
|
782
|
+
|
|
783
|
+
def test_an_edit_turn_that_asks_nothing_is_not_sent_the_clarification_reply(self) -> None:
|
|
784
|
+
"""A turn that reports a rejected patch asked nothing; sending the reply would nudge a retry."""
|
|
785
|
+
client = MagicMock()
|
|
786
|
+
client.send_message.return_value = _chat_result(
|
|
787
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
788
|
+
text="I could not apply the change to the dashboard.",
|
|
789
|
+
)
|
|
790
|
+
summary = _run_with(client, {**_DE01_EXPECTED, "clarification_reply": "Apply it now."}, max_iterations=None)
|
|
791
|
+
assert client.send_message.call_count == 1
|
|
792
|
+
assert not summary.pass_at_k
|
|
793
|
+
assert summary.best.exit_reason is LoopExit.STOPPED_EARLY
|
|
794
|
+
assert summary.best.evaluation.notes == [
|
|
795
|
+
"the agent replied on an edit without a patch or a question, so the run stopped: "
|
|
796
|
+
"'I could not apply the change to the dashboard.'"
|
|
797
|
+
]
|
|
798
|
+
|
|
799
|
+
def test_an_edit_that_asks_to_go_ahead_is_told_yes_without_spending_its_reply(self) -> None:
|
|
800
|
+
"""A confirmation asks nothing the fixture has to answer: "Yes, go ahead." settles it, and the
|
|
801
|
+
clarification_reply stays for a real question."""
|
|
802
|
+
reply = "Add both at the end of the section. Apply it now, no need to confirm."
|
|
803
|
+
client = MagicMock()
|
|
804
|
+
client.send_message.side_effect = [
|
|
805
|
+
_chat_result(
|
|
806
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
807
|
+
text="I will rename the chart. Shall I apply this?",
|
|
808
|
+
),
|
|
809
|
+
_chat_result(text="Where should I place them?"),
|
|
810
|
+
_chat_result(
|
|
811
|
+
tool_calls=[_tool_call("patch_dashboard", _patch_result())],
|
|
812
|
+
parts=[_edit_base_part(), _patch_part(TestPreservedFilters._RENAME, visualizations=[_ORDER_STATUS])],
|
|
813
|
+
),
|
|
814
|
+
]
|
|
815
|
+
summary = _run_with(client, {**_DE01_EXPECTED, "clarification_reply": reply}, max_iterations=None)
|
|
816
|
+
assert [call.args[1] for call in client.send_message.call_args_list] == [
|
|
817
|
+
"Could you create a dashboard?",
|
|
818
|
+
CONFIRMATION_REPLY,
|
|
819
|
+
reply,
|
|
820
|
+
]
|
|
821
|
+
assert summary.pass_at_k
|
|
822
|
+
assert summary.best.evaluation.notes == []
|
|
823
|
+
|
|
824
|
+
def test_a_question_asked_beside_a_confirmation_is_sent_the_clarification_reply(self) -> None:
|
|
825
|
+
"""A real question followed by "Please confirm" is still a question, so the fixture's reply answers it."""
|
|
826
|
+
reply = "Resize the Order status chart. Apply it now, no need to confirm."
|
|
827
|
+
client = MagicMock()
|
|
828
|
+
client.send_message.side_effect = [
|
|
829
|
+
_chat_result(
|
|
830
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
831
|
+
text="Which widget should I resize? Please confirm.",
|
|
832
|
+
),
|
|
833
|
+
_chat_result(
|
|
834
|
+
tool_calls=[_tool_call("patch_dashboard", _patch_result())],
|
|
835
|
+
parts=[_edit_base_part(), _patch_part(TestPreservedFilters._RENAME, visualizations=[_ORDER_STATUS])],
|
|
836
|
+
),
|
|
837
|
+
]
|
|
838
|
+
summary = _run_with(client, {**_DE01_EXPECTED, "clarification_reply": reply}, max_iterations=None)
|
|
839
|
+
assert [call.args[1] for call in client.send_message.call_args_list] == [
|
|
840
|
+
"Could you create a dashboard?",
|
|
841
|
+
reply,
|
|
842
|
+
]
|
|
843
|
+
assert summary.pass_at_k
|
|
844
|
+
|
|
845
|
+
def test_a_cap_reached_before_the_clarification_reply_is_sent_still_quotes_the_question(self) -> None:
|
|
846
|
+
"""With one turn there is no room for the reply: the budget ended the run, and the note says so."""
|
|
847
|
+
client = MagicMock()
|
|
848
|
+
client.send_message.return_value = _chat_result(
|
|
849
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
850
|
+
text="Where should I place them?",
|
|
851
|
+
)
|
|
852
|
+
summary = _run_with(client, {**_DE01_EXPECTED, "clarification_reply": "At the end."}, max_iterations=1)
|
|
853
|
+
assert client.send_message.call_count == 1
|
|
854
|
+
assert summary.best.exit_reason is LoopExit.BUDGET_EXHAUSTED
|
|
855
|
+
assert summary.best.evaluation.notes == [
|
|
856
|
+
"the turn budget ran out before the case's clarification_reply could be sent: 'Where should I place them?'"
|
|
857
|
+
]
|
|
858
|
+
|
|
859
|
+
def test_a_structured_question_is_quoted_rather_than_the_text_beside_it(self) -> None:
|
|
860
|
+
client = MagicMock()
|
|
861
|
+
client.send_message.return_value = _chat_result(
|
|
862
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
863
|
+
parts=[
|
|
864
|
+
{
|
|
865
|
+
"type": "clarifyingQuestions",
|
|
866
|
+
"questions": [{"text": "Which widget?", "control": {"options": []}}],
|
|
867
|
+
}
|
|
868
|
+
],
|
|
869
|
+
text="I need more details.",
|
|
870
|
+
)
|
|
871
|
+
summary = _run_with(client, _DE01_EXPECTED, max_iterations=None)
|
|
872
|
+
assert summary.best.evaluation.notes == [
|
|
873
|
+
"the agent asked back on an edit and the case has no clarification_reply, so the run stopped: "
|
|
874
|
+
"'Which widget?'"
|
|
875
|
+
]
|
|
876
|
+
|
|
877
|
+
def test_a_long_unanswered_question_is_cut_in_the_note(self) -> None:
|
|
878
|
+
client = MagicMock()
|
|
879
|
+
client.send_message.return_value = _chat_result(
|
|
880
|
+
tool_calls=[_tool_call("set_skills", {"skills_to_activate": ["dashboard_editor"]})],
|
|
881
|
+
text="Which option? " + "Option " * 100,
|
|
882
|
+
)
|
|
883
|
+
note = _run_with(client, _DE01_EXPECTED, max_iterations=None).best.evaluation.notes[0]
|
|
884
|
+
assert note.endswith("…'")
|
|
885
|
+
assert len(note) < 450
|
|
886
|
+
|
|
887
|
+
@pytest.mark.parametrize(
|
|
888
|
+
("reply", "message"),
|
|
889
|
+
[
|
|
890
|
+
("", "clarification_reply must be a non-empty reply"),
|
|
891
|
+
(" ", "clarification_reply must be a non-empty reply"),
|
|
892
|
+
(["Add it at the end."], "clarification_reply must be a non-empty reply"),
|
|
893
|
+
],
|
|
894
|
+
)
|
|
895
|
+
def test_an_unusable_clarification_reply_is_rejected_up_front(self, reply: object, message: str) -> None:
|
|
896
|
+
client = MagicMock()
|
|
897
|
+
with pytest.raises(ValueError, match=message):
|
|
898
|
+
_run_with(client, {**_DE01_EXPECTED, "clarification_reply": reply})
|
|
899
|
+
client.send_message.assert_not_called()
|
|
900
|
+
|
|
901
|
+
def test_a_creation_case_cannot_carry_a_clarification_reply(self) -> None:
|
|
902
|
+
"""A creation case is answered with the reply built from its charts and date range."""
|
|
903
|
+
client = MagicMock()
|
|
904
|
+
with pytest.raises(ValueError, match="clarification_reply is for an edit case"):
|
|
905
|
+
_run_with(client, {**_DC05_EXPECTED, "clarification_reply": "Use these charts."})
|
|
906
|
+
client.send_message.assert_not_called()
|
|
732
907
|
|
|
733
908
|
def test_a_creation_case_still_gets_its_clarifying_round(self):
|
|
734
909
|
"""The same cap that an edit never reaches is still spent on creation."""
|
|
@@ -937,6 +1112,19 @@ class TestSimulatedReply:
|
|
|
937
1112
|
"Anything else is up to you. Please create the dashboard now."
|
|
938
1113
|
)
|
|
939
1114
|
|
|
1115
|
+
def test_a_case_without_a_date_range_says_no_period(self) -> None:
|
|
1116
|
+
"""The case does not look at the date filter, so the reply must not pick one -- "all time"
|
|
1117
|
+
could contradict the date filter of an existing chart the case expects to be reused."""
|
|
1118
|
+
expected = {k: v for k, v in _DC03_EXPECTED.items() if k != "date_range"}
|
|
1119
|
+
assert build_simulated_reply(expected) == (
|
|
1120
|
+
'Please use these charts: Activity by Hour, and a new chart titled "Net Orders by Customer Age". '
|
|
1121
|
+
"Anything else is up to you. Please create the dashboard now."
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
def test_a_null_date_range_still_asks_for_all_time(self) -> None:
|
|
1125
|
+
"""Null is a stated range: the case requires all time and checks it."""
|
|
1126
|
+
assert "Date range: all time. " in build_simulated_reply({**_DC03_EXPECTED, "date_range": None})
|
|
1127
|
+
|
|
940
1128
|
def test_an_authored_chart_alone_reads_naturally(self):
|
|
941
1129
|
expected = {"visualizations": [{"id": None, "title": "Net Orders by Customer Age"}], "date_range": None}
|
|
942
1130
|
assert 'Please use these charts: a new chart titled "Net Orders by Customer Age".' in build_simulated_reply(
|
|
@@ -2902,3 +3090,5 @@ class TestRefusalCases:
|
|
|
2902
3090
|
summary = _run_with(client, self._NO_DATA)
|
|
2903
3091
|
assert client.send_message.call_count == 1
|
|
2904
3092
|
assert summary.best.evaluation.strict_pass
|
|
3093
|
+
# Turns were left: the harness chose not to reply, so the budget did not end it.
|
|
3094
|
+
assert summary.best.exit_reason is LoopExit.STOPPED_EARLY
|