gooddata-eval 1.80.1.dev1__tar.gz → 1.80.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.80.1.dev1 → gooddata_eval-1.80.1.dev3}/AGENTS.md +1 -0
- gooddata_eval-1.80.1.dev1/README.md → gooddata_eval-1.80.1.dev3/PKG-INFO +71 -0
- gooddata_eval-1.80.1.dev1/PKG-INFO → gooddata_eval-1.80.1.dev3/README.md +41 -29
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/pyproject.toml +5 -4
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/cli/agentic_runner.py +16 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/cli/main.py +2 -2
- gooddata_eval-1.80.1.dev3/src/gooddata_eval/core/agentic/_failed_runs.py +106 -0
- gooddata_eval-1.80.1.dev3/src/gooddata_eval/core/agentic/_failure_message.py +198 -0
- gooddata_eval-1.80.1.dev3/src/gooddata_eval/core/agentic/_filters.py +50 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_gate.py +10 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_langfuse.py +3 -3
- gooddata_eval-1.80.1.dev3/src/gooddata_eval/core/agentic/_outcome.py +318 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_trace_linker.py +5 -4
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/alert_skill.py +30 -5
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/anomaly_detection.py +40 -15
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/conversation.py +9 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/dashboard_skill.py +265 -72
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/document_skill.py +332 -27
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/general_question.py +30 -7
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/guardrail.py +30 -7
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/kda_skill.py +38 -6
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/metric_skill.py +41 -5
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/visualization.py +133 -14
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/what_if.py +42 -17
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/chat/sse_client.py +39 -12
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/dataset/from_insights.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/_llm_judge.py +4 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/visualization.py +197 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/client.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/observations.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/otlp.py +3 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/sink.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/models.py +31 -5
- gooddata_eval-1.80.1.dev3/src/gooddata_eval/core/outcome.py +159 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/reporting/html_report.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/reporting/json_report.py +3 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/runner.py +13 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/_fake_langfuse.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_alert_skill.py +19 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_anomaly_detection.py +14 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_conversation.py +27 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_dashboard_skill.py +414 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_document_skill.py +650 -23
- gooddata_eval-1.80.1.dev3/tests/test_agentic_failure_message.py +522 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_gate.py +16 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_general_question.py +2 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_join_trace.py +4 -4
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_kda_skill.py +28 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_langfuse_trace.py +17 -23
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_metric_skill.py +79 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_observe_experiment.py +14 -2
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_runner.py +37 -5
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_visualization.py +33 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_what_if.py +14 -1
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_cli.py +2 -2
- gooddata_eval-1.80.1.dev3/tests/test_context_date_filter.py +547 -0
- gooddata_eval-1.80.1.dev3/tests/test_eval_error_scores.py +162 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_client.py +3 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_experiment.py +21 -21
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_observations.py +16 -16
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_otlp.py +8 -8
- gooddata_eval-1.80.1.dev3/tests/test_outcome.py +539 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_reporting.py +4 -4
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_runner.py +5 -5
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_sse_client.py +67 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_trace_linker.py +3 -3
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tox.ini +1 -1
- gooddata_eval-1.80.1.dev1/src/gooddata_eval/core/agentic/_failed_runs.py +0 -72
- gooddata_eval-1.80.1.dev1/src/gooddata_eval/core/agentic/_outcome.py +0 -123
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/.gitignore +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/CLAUDE.md +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/LICENSE.txt +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/Makefile +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/scripts/calibrate_takeaway_judge.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/scripts/verify_guardrail_refusal_criteria.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/_version.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/cli/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/_output.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/_retry.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/forecasting.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/chat/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/chat/render.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/config.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/connection.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/dataset/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/dataset/local.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/base.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/summary.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/granularity.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/interaction.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/_env.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/number_format.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/reporting/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/reporting/console.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/reporting/report_template.html +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/scoring.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/summary/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/summary/http_client.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/timing.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/core/workspace.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/__init__.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/conftest.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/fixtures/sse_visualization_stream.txt +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/fixtures/takeaway_calibration.json +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_dashboard_summary.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_document_editor_takeaways.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_forecasting.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_guardrail.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_run_context.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_agentic_search_tool.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_alert_skill_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_chat_render.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_connection.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_deep_subset.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_fake_langfuse.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_from_insights.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_guardrail_criteria.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_html_report.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_interaction.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_e2e_fake_server.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_env.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_item_scope.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_sink.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_langfuse_source.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_llm_judge.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_local_loader.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_maql_normalize.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_metric_skill_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_models.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_number_format.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_scoring.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_search_tool_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_summary_client.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_summary_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_takeaway_client.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_takeaway_evaluate.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_takeaway_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_text_evaluators.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_timing.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_visualization_evaluator.py +0 -0
- {gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/tests/test_workspace.py +0 -0
|
@@ -34,6 +34,7 @@ experiment. The newest and most actively developed package in the repo.
|
|
|
34
34
|
| `core/reporting/` | console and JSON output rendering |
|
|
35
35
|
| `core/scoring.py`, `core/runner.py` | scoring and orchestration |
|
|
36
36
|
| `core/models.py` | `DatasetItem`, `ChatResult`, `ItemReport` and friends |
|
|
37
|
+
| `core/outcome.py` | `Outcome` (PASS / FAIL / ERROR): the one fail-closed rule that labels a failing run ERROR when the harness failed (simulated user, judge), plus the item label and the recorded-only shadow verdict. Labels decide no verdict; the agentic kinds reach it through `core/agentic/_outcome.py`'s `label_runs` |
|
|
37
38
|
|
|
38
39
|
**Depends on**: `gooddata-sdk`, `httpx`, `pydantic`, `orjson`, `rich`. The LLM-judge
|
|
39
40
|
evaluator is an optional extra (`llm-judge`, pulling `openai>=1.45,<2.0`); every `openai`
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: gooddata-eval
|
|
3
|
+
Version: 1.80.1.dev3
|
|
4
|
+
Summary: Evaluate the GoodData AI agent against your own questions and models.
|
|
5
|
+
Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
|
|
6
|
+
Author-email: GoodData <support@gooddata.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE.txt
|
|
9
|
+
Keywords: ai,analytics,cli,evaluation,gooddata,llm
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering
|
|
18
|
+
Classifier: Topic :: Software Development
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: gooddata-sdk~=1.80.1.dev3
|
|
22
|
+
Requires-Dist: httpx<1.0,>=0.27
|
|
23
|
+
Requires-Dist: jsonpatch<2.0,>=1.33
|
|
24
|
+
Requires-Dist: orjson<4.0.0,>=3.9.15
|
|
25
|
+
Requires-Dist: pydantic<3.0,>=2.6
|
|
26
|
+
Requires-Dist: rich<15.0,>=13.0
|
|
27
|
+
Provides-Extra: llm-judge
|
|
28
|
+
Requires-Dist: openai<2.0,>=1.45; extra == 'llm-judge'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
1
31
|
# gooddata-eval
|
|
2
32
|
|
|
3
33
|
CLI to evaluate the GoodData AI agent against a dataset of natural-language
|
|
@@ -752,6 +782,9 @@ Item-level keys, all optional except the candidates:
|
|
|
752
782
|
`{"metric/net_sales": {"divide_by": 1000000, "decimals": 1, "suffix": "M"}}`.
|
|
753
783
|
- `requires_visualization_part` — the chart must come back as a part of the answer, not only as
|
|
754
784
|
the arguments of the chart tool call.
|
|
785
|
+
- `date_filter_from_context` — `true` or `{"dataset": "<date dataset>"}`: a candidate without a
|
|
786
|
+
date filter also accepts the chart carrying a date filter of the dashboard in the item's
|
|
787
|
+
`user_context`. See *Date filter carried over from the dashboard* below.
|
|
755
788
|
|
|
756
789
|
Switches on a candidate chart:
|
|
757
790
|
|
|
@@ -902,6 +935,44 @@ In a Langfuse dataset, put it in the item `metadata` (or in the `input` object)
|
|
|
902
935
|
`null` value in `input` falls back to `metadata`. The value used must be an object or `null`;
|
|
903
936
|
anything else fails the dataset load.
|
|
904
937
|
|
|
938
|
+
#### Date filter carried over from the dashboard
|
|
939
|
+
|
|
940
|
+
A user who asks for a new chart from an open dashboard without naming a period may get the
|
|
941
|
+
dashboard's date filter on the chart, and the product accepts that as well as a chart with no
|
|
942
|
+
date filter. An item says so with `date_filter_from_context`:
|
|
943
|
+
|
|
944
|
+
```json
|
|
945
|
+
"expected_output": {
|
|
946
|
+
"visualization": {"type": "headline_chart", "query": {"fields": {"m": {"using": "metric/gross_margin_pct"}}}, "metrics": ["m"]},
|
|
947
|
+
"date_filter_from_context": {"dataset": "dataset/transaction_date"}
|
|
948
|
+
}
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
Each candidate without a date filter then also counts once more per date filter in
|
|
952
|
+
`user_context.view.dashboard.filters`, with that filter added. Both sides resolve against the
|
|
953
|
+
same day, so a relative and an absolute period that cover the same days match. The date dataset
|
|
954
|
+
of the added filter is, in order: the `dataset` the key states; the one the dashboard filter
|
|
955
|
+
names in `using` (a bare id such as `order_date` reads as `dataset/order_date`); for the
|
|
956
|
+
dashboard's common date filter, which names none, the one the chart's only date filter uses.
|
|
957
|
+
`true` therefore accepts any date dataset for the common date filter. The key's `dataset` must
|
|
958
|
+
be a bare id or a `dataset/` URI; anything else, such as `label/region` or a misspelled
|
|
959
|
+
`datset/order_date`, is an error. A dashboard filter whose `using` is not a date dataset adds
|
|
960
|
+
no candidate.
|
|
961
|
+
|
|
962
|
+
A candidate that states a date filter is not extended: a question that names a period is scored
|
|
963
|
+
on that period only. A chart with two date filters matches no added candidate. Ranking and
|
|
964
|
+
attribute filters are unaffected.
|
|
965
|
+
|
|
966
|
+
When the chart matches an added candidate, the run detail carries
|
|
967
|
+
`filter_date_context: {"inherited": true, "dataset": ...}` and a failure summary shows
|
|
968
|
+
`date : True (matches the dashboard date filter in user_context)`. The expected output reported
|
|
969
|
+
is still the candidate the item states; `expected_filters` shows the dashboard filter it was
|
|
970
|
+
scored with. A stated candidate that matched the date wins over an added one it ties with. Without the key an item is
|
|
971
|
+
scored exactly as before, so an item that must reject the dashboard's period ("all time")
|
|
972
|
+
simply leaves it out. The key on an item whose `user_context` has no dashboard date filter is
|
|
973
|
+
an error, raised before any request. Applies to `visualization`, `vis_agentic` and
|
|
974
|
+
`agentic_visualization` items; `agentic_conversation` turns do not read it.
|
|
975
|
+
|
|
905
976
|
`agentic_conversation` items take the item's `user_context` as the context of the first
|
|
906
977
|
turn. A turn in `expected_output.turns` can set its own `user_context`, which applies
|
|
907
978
|
from that turn on until another turn changes it, as the attached context does in the UI:
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: gooddata-eval
|
|
3
|
-
Version: 1.80.1.dev1
|
|
4
|
-
Summary: Evaluate the GoodData AI agent against your own questions and models.
|
|
5
|
-
Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
|
|
6
|
-
Author-email: GoodData <support@gooddata.com>
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
License-File: LICENSE.txt
|
|
9
|
-
Keywords: ai,analytics,cli,evaluation,gooddata,llm
|
|
10
|
-
Classifier: Development Status :: 4 - Beta
|
|
11
|
-
Classifier: Environment :: Console
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Classifier: Topic :: Scientific/Engineering
|
|
17
|
-
Classifier: Topic :: Software Development
|
|
18
|
-
Classifier: Typing :: Typed
|
|
19
|
-
Requires-Python: >=3.10
|
|
20
|
-
Requires-Dist: gooddata-sdk~=1.80.1.dev1
|
|
21
|
-
Requires-Dist: httpx<1.0,>=0.27
|
|
22
|
-
Requires-Dist: jsonpatch<2.0,>=1.33
|
|
23
|
-
Requires-Dist: orjson<4.0.0,>=3.9.15
|
|
24
|
-
Requires-Dist: pydantic<3.0,>=2.6
|
|
25
|
-
Requires-Dist: rich<15.0,>=13.0
|
|
26
|
-
Provides-Extra: llm-judge
|
|
27
|
-
Requires-Dist: openai<2.0,>=1.45; extra == 'llm-judge'
|
|
28
|
-
Description-Content-Type: text/markdown
|
|
29
|
-
|
|
30
1
|
# gooddata-eval
|
|
31
2
|
|
|
32
3
|
CLI to evaluate the GoodData AI agent against a dataset of natural-language
|
|
@@ -781,6 +752,9 @@ Item-level keys, all optional except the candidates:
|
|
|
781
752
|
`{"metric/net_sales": {"divide_by": 1000000, "decimals": 1, "suffix": "M"}}`.
|
|
782
753
|
- `requires_visualization_part` — the chart must come back as a part of the answer, not only as
|
|
783
754
|
the arguments of the chart tool call.
|
|
755
|
+
- `date_filter_from_context` — `true` or `{"dataset": "<date dataset>"}`: a candidate without a
|
|
756
|
+
date filter also accepts the chart carrying a date filter of the dashboard in the item's
|
|
757
|
+
`user_context`. See *Date filter carried over from the dashboard* below.
|
|
784
758
|
|
|
785
759
|
Switches on a candidate chart:
|
|
786
760
|
|
|
@@ -931,6 +905,44 @@ In a Langfuse dataset, put it in the item `metadata` (or in the `input` object)
|
|
|
931
905
|
`null` value in `input` falls back to `metadata`. The value used must be an object or `null`;
|
|
932
906
|
anything else fails the dataset load.
|
|
933
907
|
|
|
908
|
+
#### Date filter carried over from the dashboard
|
|
909
|
+
|
|
910
|
+
A user who asks for a new chart from an open dashboard without naming a period may get the
|
|
911
|
+
dashboard's date filter on the chart, and the product accepts that as well as a chart with no
|
|
912
|
+
date filter. An item says so with `date_filter_from_context`:
|
|
913
|
+
|
|
914
|
+
```json
|
|
915
|
+
"expected_output": {
|
|
916
|
+
"visualization": {"type": "headline_chart", "query": {"fields": {"m": {"using": "metric/gross_margin_pct"}}}, "metrics": ["m"]},
|
|
917
|
+
"date_filter_from_context": {"dataset": "dataset/transaction_date"}
|
|
918
|
+
}
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
Each candidate without a date filter then also counts once more per date filter in
|
|
922
|
+
`user_context.view.dashboard.filters`, with that filter added. Both sides resolve against the
|
|
923
|
+
same day, so a relative and an absolute period that cover the same days match. The date dataset
|
|
924
|
+
of the added filter is, in order: the `dataset` the key states; the one the dashboard filter
|
|
925
|
+
names in `using` (a bare id such as `order_date` reads as `dataset/order_date`); for the
|
|
926
|
+
dashboard's common date filter, which names none, the one the chart's only date filter uses.
|
|
927
|
+
`true` therefore accepts any date dataset for the common date filter. The key's `dataset` must
|
|
928
|
+
be a bare id or a `dataset/` URI; anything else, such as `label/region` or a misspelled
|
|
929
|
+
`datset/order_date`, is an error. A dashboard filter whose `using` is not a date dataset adds
|
|
930
|
+
no candidate.
|
|
931
|
+
|
|
932
|
+
A candidate that states a date filter is not extended: a question that names a period is scored
|
|
933
|
+
on that period only. A chart with two date filters matches no added candidate. Ranking and
|
|
934
|
+
attribute filters are unaffected.
|
|
935
|
+
|
|
936
|
+
When the chart matches an added candidate, the run detail carries
|
|
937
|
+
`filter_date_context: {"inherited": true, "dataset": ...}` and a failure summary shows
|
|
938
|
+
`date : True (matches the dashboard date filter in user_context)`. The expected output reported
|
|
939
|
+
is still the candidate the item states; `expected_filters` shows the dashboard filter it was
|
|
940
|
+
scored with. A stated candidate that matched the date wins over an added one it ties with. Without the key an item is
|
|
941
|
+
scored exactly as before, so an item that must reject the dashboard's period ("all time")
|
|
942
|
+
simply leaves it out. The key on an item whose `user_context` has no dashboard date filter is
|
|
943
|
+
an error, raised before any request. Applies to `visualization`, `vis_agentic` and
|
|
944
|
+
`agentic_visualization` items; `agentic_conversation` turns do not read it.
|
|
945
|
+
|
|
934
946
|
`agentic_conversation` items take the item's `user_context` as the context of the first
|
|
935
947
|
turn. A turn in `expected_output.turns` can set its own `user_context`, which applies
|
|
936
948
|
from that turn on until another turn changes it, as the attached context does in the UI:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# (C) 2026 GoodData Corporation
|
|
2
2
|
[project]
|
|
3
3
|
name = "gooddata-eval"
|
|
4
|
-
version = "1.80.1.
|
|
4
|
+
version = "1.80.1.dev3"
|
|
5
5
|
description = "Evaluate the GoodData AI agent against your own questions and models."
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = "MIT"
|
|
@@ -9,9 +9,9 @@ authors = [
|
|
|
9
9
|
{name = "GoodData", email = "support@gooddata.com"}
|
|
10
10
|
]
|
|
11
11
|
keywords = ["gooddata", "ai", "evaluation", "llm", "analytics", "cli"]
|
|
12
|
-
requires-python = ">=3.
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
13
|
dependencies = [
|
|
14
|
-
"gooddata-sdk~=1.80.1.
|
|
14
|
+
"gooddata-sdk~=1.80.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",
|
|
@@ -21,10 +21,11 @@ dependencies = [
|
|
|
21
21
|
classifiers = [
|
|
22
22
|
"Development Status :: 4 - Beta",
|
|
23
23
|
"Environment :: Console",
|
|
24
|
-
"Programming Language :: Python :: 3.10",
|
|
25
24
|
"Programming Language :: Python :: 3.11",
|
|
26
25
|
"Programming Language :: Python :: 3.12",
|
|
27
26
|
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Programming Language :: Python :: 3.14",
|
|
28
|
+
"Programming Language :: Python :: 3.15",
|
|
28
29
|
"Topic :: Scientific/Engineering",
|
|
29
30
|
"Topic :: Software Development",
|
|
30
31
|
"Typing :: Typed",
|
{gooddata_eval-1.80.1.dev1 → gooddata_eval-1.80.1.dev3}/src/gooddata_eval/cli/agentic_runner.py
RENAMED
|
@@ -6,7 +6,7 @@ from __future__ import annotations
|
|
|
6
6
|
import sys
|
|
7
7
|
import time
|
|
8
8
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
9
|
-
from datetime import
|
|
9
|
+
from datetime import UTC, datetime
|
|
10
10
|
from typing import Any, TypedDict
|
|
11
11
|
|
|
12
12
|
from gooddata_eval.core.agentic._gate import DEFAULT_GATE, EvalGate, normalize_gate
|
|
@@ -404,6 +404,16 @@ def _apply_run_counts(item_report: ItemReport, source: Any) -> None:
|
|
|
404
404
|
item_report.runs_ungraded = unscored
|
|
405
405
|
|
|
406
406
|
|
|
407
|
+
def _apply_labels(item_report: ItemReport, source: Any) -> None:
|
|
408
|
+
"""Copy the item's harness label and shadow verdict off an outcome or a failure, if set."""
|
|
409
|
+
harness_error = getattr(source, "harness_error", None)
|
|
410
|
+
if isinstance(harness_error, dict):
|
|
411
|
+
item_report.harness_error = harness_error
|
|
412
|
+
shadow = getattr(source, "shadow", None)
|
|
413
|
+
if isinstance(shadow, dict):
|
|
414
|
+
item_report.shadow = shadow
|
|
415
|
+
|
|
416
|
+
|
|
407
417
|
def _apply_failed_runs(item_report: ItemReport, source: Any) -> None:
|
|
408
418
|
"""Copy the per-run failure records off an outcome or a failure, if the kind built any.
|
|
409
419
|
|
|
@@ -496,7 +506,7 @@ def run_agentic_items(
|
|
|
496
506
|
# latency. Drained below before this function returns, so every score is written
|
|
497
507
|
# before the caller renders a report or decides an exit code.
|
|
498
508
|
linker = BackgroundTraceLinker()
|
|
499
|
-
report.started_at = datetime.now(
|
|
509
|
+
report.started_at = datetime.now(UTC)
|
|
500
510
|
_t0 = time.perf_counter()
|
|
501
511
|
|
|
502
512
|
def _process_item(index: int, item: DatasetItem) -> ItemReport:
|
|
@@ -555,6 +565,7 @@ def run_agentic_items(
|
|
|
555
565
|
_apply_best_run_latency(item_report, outcome)
|
|
556
566
|
_apply_run_counts(item_report, outcome)
|
|
557
567
|
_apply_failed_runs(item_report, outcome)
|
|
568
|
+
_apply_labels(item_report, outcome)
|
|
558
569
|
_apply_run_latencies(item_report, outcome)
|
|
559
570
|
except AssertionError as exc:
|
|
560
571
|
item_report.gate_passed = False if gated else None
|
|
@@ -567,6 +578,7 @@ def run_agentic_items(
|
|
|
567
578
|
_apply_best_run_latency(item_report, exc)
|
|
568
579
|
_apply_run_counts(item_report, exc)
|
|
569
580
|
_apply_failed_runs(item_report, exc)
|
|
581
|
+
_apply_labels(item_report, exc)
|
|
570
582
|
_apply_run_latencies(item_report, exc)
|
|
571
583
|
# Read off the counts, not off the gate: pass^K fails items where runs did pass,
|
|
572
584
|
# and reporting those as pass_at_k False would contradict the Langfuse score of
|
|
@@ -588,6 +600,7 @@ def run_agentic_items(
|
|
|
588
600
|
_apply_timings(item_report, getattr(exc, "timings", None))
|
|
589
601
|
_apply_run_counts(item_report, exc)
|
|
590
602
|
_apply_failed_runs(item_report, exc)
|
|
603
|
+
_apply_labels(item_report, exc)
|
|
591
604
|
_apply_run_latencies(item_report, exc)
|
|
592
605
|
# Every run ungraded, by definition of this error -- said explicitly rather than
|
|
593
606
|
# left to _apply_run_counts, whose source is detail["unscored_runs"] and which a
|
|
@@ -692,7 +705,7 @@ def run_agentic_items(
|
|
|
692
705
|
flush=True,
|
|
693
706
|
)
|
|
694
707
|
report.wall_clock_s = time.perf_counter() - _t0
|
|
695
|
-
report.finished_at = datetime.now(
|
|
708
|
+
report.finished_at = datetime.now(UTC)
|
|
696
709
|
|
|
697
710
|
if langfuse is not None:
|
|
698
711
|
try:
|
|
@@ -5,7 +5,7 @@ import argparse
|
|
|
5
5
|
import os
|
|
6
6
|
import sys
|
|
7
7
|
import threading
|
|
8
|
-
from datetime import
|
|
8
|
+
from datetime import UTC, datetime
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import Any, get_args
|
|
11
11
|
|
|
@@ -516,7 +516,7 @@ def _run(config: RunConfig) -> int:
|
|
|
516
516
|
_reject_power_gate_on_ungated_items(config, items)
|
|
517
517
|
_warn_if_local_dataset_cannot_link(config, agentic_items)
|
|
518
518
|
models = config.models or []
|
|
519
|
-
run_ts = datetime.now(
|
|
519
|
+
run_ts = datetime.now(UTC).strftime("%Y-%m-%d-%H-%M")
|
|
520
520
|
n_models = len(models) if models else 1
|
|
521
521
|
|
|
522
522
|
controller = WorkspaceModelController(config.host, config.token, config.workspace_id)
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# (C) 2026 GoodData Corporation. All rights reserved.
|
|
2
|
+
"""Per-run failure records for the agentic evaluators.
|
|
3
|
+
|
|
4
|
+
``core/runner.py`` records one of these for every failing run of a single-shot item. The
|
|
5
|
+
agentic kinds cannot reuse it: each of them drives its own K-loop inside the evaluator and
|
|
6
|
+
hands ``cli/agentic_runner`` a single aggregate per item, so by the time the runner sees
|
|
7
|
+
the result the individual attempts are already collapsed into ``best``. The runs themselves
|
|
8
|
+
are not lost -- every kind keeps its ``run_results`` list -- they simply never leave the
|
|
9
|
+
evaluator. This turns that list into the same records the single-shot path writes.
|
|
10
|
+
|
|
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``/``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.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from __future__ import annotations
|
|
24
|
+
|
|
25
|
+
from collections.abc import Callable, Sequence
|
|
26
|
+
from typing import Any
|
|
27
|
+
|
|
28
|
+
from gooddata_eval.core.agentic._failure_message import cap_failed_checks
|
|
29
|
+
from gooddata_eval.core.agentic._outcome import RunLabels, run_exit_reason, run_outcome
|
|
30
|
+
from gooddata_eval.core.models import build_tool_calls
|
|
31
|
+
from gooddata_eval.core.outcome import OutcomeStatus
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def build_failed_runs(
|
|
35
|
+
run_results: Sequence[Any],
|
|
36
|
+
*,
|
|
37
|
+
detail: Callable[[Any], dict],
|
|
38
|
+
labels: RunLabels | None = None,
|
|
39
|
+
passed: Callable[[Any], bool] | None = None,
|
|
40
|
+
failed_checks: Callable[[Any], list[dict]] | None = None,
|
|
41
|
+
) -> list[dict]:
|
|
42
|
+
"""One record per run that did not pass, in the order the runs happened.
|
|
43
|
+
|
|
44
|
+
A kind that labels its runs passes its ``labels`` (from ``label_runs``, in run order):
|
|
45
|
+
they say which runs did not pass and are the ``outcome`` of each record, so the records,
|
|
46
|
+
the failure message and the Langfuse ``eval_error`` marker read one set of labels. A kind
|
|
47
|
+
that does not label its runs passes ``passed`` instead, and each record's ``outcome`` is
|
|
48
|
+
worked out here from the run alone. Exactly one of the two is given.
|
|
49
|
+
|
|
50
|
+
``passed`` and ``detail`` are supplied by the caller because neither is uniform across
|
|
51
|
+
kinds: guardrail reads ``run.passed`` while visualization reads
|
|
52
|
+
``run.eval_result.strict_pass``, and each kind's diagnostic dict is its own. Everything
|
|
53
|
+
read here directly goes through ``getattr`` with a default, so a kind whose run result
|
|
54
|
+
lacks a field (no response id, no tool capture) records a null instead of raising. The
|
|
55
|
+
events inside ``tool_call_events`` are the exception: ``build_tool_calls`` reads them as
|
|
56
|
+
``ToolCallEvent``s, so a run that has the list must hold real events in it.
|
|
57
|
+
|
|
58
|
+
A run the judge could not grade is recorded like any other non-passing run, with its
|
|
59
|
+
``error`` set to the run's ``judge_error``. That matches ``core/runner.py``, which also
|
|
60
|
+
records ungraded runs; the verdict-level accounting of ungraded runs stays with the
|
|
61
|
+
caller's ``unscored_runs``.
|
|
62
|
+
|
|
63
|
+
``exit_reason`` is the run's ``LoopExit`` value, or null for a kind whose loop records
|
|
64
|
+
none, and ``outcome`` its ``core.outcome.Outcome`` record: ERROR when the harness failed
|
|
65
|
+
(its simulated user, or its judge when the judge's verdict was the one still open), FAIL
|
|
66
|
+
otherwise. ``error`` and ``outcome`` can differ: a run that failed a fixed check and whose
|
|
67
|
+
judge also broke has ``error`` set and is a FAIL. The label decides nothing; the run counts
|
|
68
|
+
as not passed either way.
|
|
69
|
+
|
|
70
|
+
``failed_checks`` is written only when the caller supplies it: a missing key means the
|
|
71
|
+
kind does not name its failing checks, while an empty list would claim the run failed
|
|
72
|
+
none. Its expected/actual values are capped in size; the run's ``detail`` keeps them whole.
|
|
73
|
+
"""
|
|
74
|
+
if (labels is None) == (passed is None):
|
|
75
|
+
raise ValueError("build_failed_runs takes exactly one of labels and passed")
|
|
76
|
+
if labels is not None and len(labels.outcomes) != len(run_results):
|
|
77
|
+
raise ValueError(f"{len(labels.outcomes)} labels for {len(run_results)} runs")
|
|
78
|
+
records: list[dict] = []
|
|
79
|
+
for run_index, run in enumerate(run_results, start=1):
|
|
80
|
+
if labels is not None:
|
|
81
|
+
outcome = labels.outcomes[run_index - 1]
|
|
82
|
+
else:
|
|
83
|
+
outcome = run_outcome(run, passed=passed is not None and passed(run))
|
|
84
|
+
if outcome.status is OutcomeStatus.PASS:
|
|
85
|
+
continue
|
|
86
|
+
tool_calls = list(getattr(run, "tool_call_events", None) or [])
|
|
87
|
+
reasoning_steps = list(getattr(run, "reasoning_steps", None) or [])
|
|
88
|
+
record: dict[str, Any] = {
|
|
89
|
+
"run_index": run_index,
|
|
90
|
+
"passed": False,
|
|
91
|
+
"error": getattr(run, "judge_error", None),
|
|
92
|
+
"detail": detail(run),
|
|
93
|
+
"conversation_id": getattr(run, "conversation_id", None),
|
|
94
|
+
"response_id": getattr(run, "response_id", None),
|
|
95
|
+
"reasoning_step_count": len(reasoning_steps),
|
|
96
|
+
"reasoning_steps": reasoning_steps,
|
|
97
|
+
"tool_call_count": len(tool_calls),
|
|
98
|
+
"tool_names": [getattr(e, "function_name", None) for e in tool_calls],
|
|
99
|
+
"tool_calls": build_tool_calls(tool_calls),
|
|
100
|
+
"exit_reason": run_exit_reason(run),
|
|
101
|
+
"outcome": outcome.as_record(),
|
|
102
|
+
}
|
|
103
|
+
if failed_checks is not None:
|
|
104
|
+
record["failed_checks"] = cap_failed_checks(failed_checks(run))
|
|
105
|
+
records.append(record)
|
|
106
|
+
return records
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# (C) 2026 GoodData Corporation
|
|
2
|
+
"""The head of an agentic kind's failure message: the gate result, then every failing run.
|
|
3
|
+
|
|
4
|
+
Each kind's assertion message describes its BEST run, which on a partial gate failure (some
|
|
5
|
+
of the K runs passed) is a passing run: every check reads True and the reason the item
|
|
6
|
+
failed is nowhere in the message. This module renders the part that is missing -- for each
|
|
7
|
+
failing run its index, why its loop stopped and the checks it failed, with expected/actual
|
|
8
|
+
where the kind knows them -- from the same ``failed_runs`` records the item reports, so the
|
|
9
|
+
message and the triage data cannot disagree about which runs failed or why.
|
|
10
|
+
|
|
11
|
+
One renderer for every kind that labels its runs, on purpose: the readers of these messages
|
|
12
|
+
(people and the triage tooling) look for one shape, whatever the capability under test.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
from collections.abc import Iterable, Mapping, Sequence
|
|
19
|
+
from dataclasses import dataclass
|
|
20
|
+
from enum import Enum
|
|
21
|
+
from typing import Any
|
|
22
|
+
|
|
23
|
+
from gooddata_eval.core.outcome import UNKNOWN_REASON, OutcomeStatus
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"FailedCheck",
|
|
27
|
+
"cap_failed_checks",
|
|
28
|
+
"failed_check_records",
|
|
29
|
+
"failed_checks_from",
|
|
30
|
+
"failing_runs_note",
|
|
31
|
+
"failure_head",
|
|
32
|
+
"judge_failed_checks",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
# A value longer than this is cut: the message is one line per run, and the whole value is in
|
|
36
|
+
# the run's detail anyway.
|
|
37
|
+
_MAX_VALUE_CHARS = 160
|
|
38
|
+
|
|
39
|
+
# The failing runs together are cut past this, at a run boundary: K runs of a kind with a dozen
|
|
40
|
+
# checks would otherwise put tens of thousands of characters into one assertion message. Every
|
|
41
|
+
# run is in ``failed_runs`` whatever the message shows.
|
|
42
|
+
_MAX_FAILING_RUNS_CHARS = 2000
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class _Unset(Enum):
|
|
46
|
+
UNSET = "unset"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
_UNSET = _Unset.UNSET
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@dataclass(frozen=True)
|
|
53
|
+
class FailedCheck:
|
|
54
|
+
"""One check a run failed, with the expected/actual pair when the kind knows it.
|
|
55
|
+
|
|
56
|
+
``part`` narrows the check when one name covers several parts, e.g. the ``date`` part of
|
|
57
|
+
``filters_correct``.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
name: str
|
|
61
|
+
expected: Any = _UNSET
|
|
62
|
+
actual: Any = _UNSET
|
|
63
|
+
part: str | None = None
|
|
64
|
+
|
|
65
|
+
def as_record(self) -> dict[str, Any]:
|
|
66
|
+
"""The JSON-ready form written into a failing run's ``failed_checks``."""
|
|
67
|
+
record: dict[str, Any] = {"name": self.name}
|
|
68
|
+
if self.part is not None:
|
|
69
|
+
record["part"] = self.part
|
|
70
|
+
if self.expected is not _UNSET:
|
|
71
|
+
record["expected"] = self.expected
|
|
72
|
+
if self.actual is not _UNSET:
|
|
73
|
+
record["actual"] = self.actual
|
|
74
|
+
return record
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def failed_check_records(checks: Iterable[FailedCheck]) -> list[dict[str, Any]]:
|
|
78
|
+
"""``checks`` as the records ``failed_runs[].failed_checks`` holds."""
|
|
79
|
+
return [check.as_record() for check in checks]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def failed_checks_from(checks: Mapping[str, bool], *, prerequisite: str | None = None) -> list[dict[str, Any]]:
|
|
83
|
+
"""The records of the checks in ``checks`` that read False, by name, in their order.
|
|
84
|
+
|
|
85
|
+
``prerequisite`` names the check every other one depends on, e.g. ``alert_created``. When it
|
|
86
|
+
failed, the others read False only because there was nothing to check, so it alone is named.
|
|
87
|
+
"""
|
|
88
|
+
if prerequisite is not None and checks.get(prerequisite) is False:
|
|
89
|
+
return failed_check_records([FailedCheck(prerequisite)])
|
|
90
|
+
return failed_check_records(FailedCheck(name) for name, ok in checks.items() if not ok)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def judge_failed_checks(name: str, *, passed: bool, judge_error: str | None, reasoning: Any) -> list[dict[str, Any]]:
|
|
94
|
+
"""The judge's verdict ``name`` on a run it failed, with its reasoning as the actual value.
|
|
95
|
+
|
|
96
|
+
Empty when the judge passed the run, or could not grade it: a run with no verdict failed no
|
|
97
|
+
judge check.
|
|
98
|
+
"""
|
|
99
|
+
if judge_error is not None or passed:
|
|
100
|
+
return []
|
|
101
|
+
return failed_check_records([FailedCheck(name, part="judge", actual=reasoning)])
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def _text(value: Any) -> str:
|
|
105
|
+
text = value if isinstance(value, str) else json.dumps(value, default=str, ensure_ascii=False, sort_keys=True)
|
|
106
|
+
return " ".join(text.split())
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _value(value: Any) -> str:
|
|
110
|
+
if value is None or value == [] or value == {} or value == "":
|
|
111
|
+
return "none"
|
|
112
|
+
text = _text(value)
|
|
113
|
+
return text if len(text) <= _MAX_VALUE_CHARS else text[: _MAX_VALUE_CHARS - 3] + "..."
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def cap_failed_checks(records: Sequence[Mapping[str, Any]]) -> list[dict[str, Any]]:
|
|
117
|
+
"""``records`` with every expected/actual value cut to what the message shows of it.
|
|
118
|
+
|
|
119
|
+
A check's values can be whole filter or bucket structures, repeated for every failing run
|
|
120
|
+
of every item; the record keeps the same ``_MAX_VALUE_CHARS`` the message does. A value
|
|
121
|
+
that fits stays as it is, JSON and all; a longer one becomes its cut text. The run's
|
|
122
|
+
``detail`` holds the full values.
|
|
123
|
+
"""
|
|
124
|
+
capped: list[dict[str, Any]] = []
|
|
125
|
+
for record in records:
|
|
126
|
+
entry = dict(record)
|
|
127
|
+
for key in ("expected", "actual"):
|
|
128
|
+
if key in entry and len(_text(entry[key])) > _MAX_VALUE_CHARS:
|
|
129
|
+
entry[key] = _value(entry[key])
|
|
130
|
+
capped.append(entry)
|
|
131
|
+
return capped
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _render_check(record: Mapping[str, Any]) -> str:
|
|
135
|
+
name = str(record.get("name", "?"))
|
|
136
|
+
parts: list[str] = []
|
|
137
|
+
if "expected" in record:
|
|
138
|
+
parts.append(f"expected {_value(record['expected'])}")
|
|
139
|
+
if "actual" in record:
|
|
140
|
+
parts.append(f"actual {_value(record['actual'])}")
|
|
141
|
+
part = record.get("part")
|
|
142
|
+
if not parts and part is None:
|
|
143
|
+
return name
|
|
144
|
+
inner = ", ".join(parts)
|
|
145
|
+
if part is not None:
|
|
146
|
+
inner = f"{part}: {inner}" if inner else str(part)
|
|
147
|
+
return f"{name}[{inner}]"
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def _render_run(record: Mapping[str, Any], runs_total: int) -> str:
|
|
151
|
+
outcome = record.get("outcome")
|
|
152
|
+
head = f"run {record.get('run_index', '?')}/{runs_total}"
|
|
153
|
+
exit_reason = record.get("exit_reason")
|
|
154
|
+
errored = isinstance(outcome, Mapping) and outcome.get("status") == OutcomeStatus.ERROR.value
|
|
155
|
+
if errored:
|
|
156
|
+
# A harness error: the reason (simulated_user_failed, judge_failed) is the diagnosis.
|
|
157
|
+
# Its checks are still listed: the simulated user is also asked after an answer that
|
|
158
|
+
# was already final, and what that answer missed is the only way to tell.
|
|
159
|
+
head += f" ERROR ({outcome.get('reason') or UNKNOWN_REASON})"
|
|
160
|
+
else:
|
|
161
|
+
head += " FAIL" + (f" (loop exit: {exit_reason})" if exit_reason else "")
|
|
162
|
+
checks = record.get("failed_checks")
|
|
163
|
+
if checks:
|
|
164
|
+
return f"{head}: {', '.join(_render_check(c) for c in checks)}"
|
|
165
|
+
if checks is not None and not errored:
|
|
166
|
+
return f"{head}: no failing check recorded"
|
|
167
|
+
return head
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def failing_runs_note(failed_runs: Sequence[Mapping[str, Any]], runs_total: int) -> str:
|
|
171
|
+
"""Every failing run, joined with ``; ``. Empty when no run failed.
|
|
172
|
+
|
|
173
|
+
Past ``_MAX_FAILING_RUNS_CHARS`` the runs left are counted instead of rendered. The first
|
|
174
|
+
run is always shown, cut to that length if it alone is longer.
|
|
175
|
+
"""
|
|
176
|
+
shown: list[str] = []
|
|
177
|
+
length = 0
|
|
178
|
+
for index, record in enumerate(failed_runs):
|
|
179
|
+
text = _render_run(record, runs_total)
|
|
180
|
+
if shown and length + len("; ") + len(text) > _MAX_FAILING_RUNS_CHARS:
|
|
181
|
+
more = len(failed_runs) - index
|
|
182
|
+
shown.append(f"{more} more failing run(s) in failed_runs")
|
|
183
|
+
break
|
|
184
|
+
if not shown and len(text) > _MAX_FAILING_RUNS_CHARS:
|
|
185
|
+
text = text[: _MAX_FAILING_RUNS_CHARS - 3] + "..."
|
|
186
|
+
shown.append(text)
|
|
187
|
+
length += len(text) + (len("; ") if len(shown) > 1 else 0)
|
|
188
|
+
return "; ".join(shown)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def failure_head(gate_note: str, failed_runs: Sequence[Mapping[str, Any]], runs_total: int) -> str:
|
|
192
|
+
"""``gate_note`` followed by the failing runs, ready to start a kind's assertion message.
|
|
193
|
+
|
|
194
|
+
Returns ``gate_note`` unchanged when there is no failing run to list, which is the whole
|
|
195
|
+
head of a kind that builds no ``failed_runs``.
|
|
196
|
+
"""
|
|
197
|
+
note = failing_runs_note(failed_runs, runs_total)
|
|
198
|
+
return f"{gate_note} Failing runs: {note}." if note else gate_note
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# (C) 2026 GoodData Corporation
|
|
2
|
+
"""Attribute filter selections and filter values, shared by the dashboard and document graders.
|
|
3
|
+
|
|
4
|
+
Both read a selection with ``selection_of``. Only the document grader compares two selections with
|
|
5
|
+
``same_selection``, ignoring the order of their values; the dashboard grader compares them as read.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def selection_of(attribute_filter: dict) -> tuple[str, list] | None:
|
|
12
|
+
"""The elements an attribute filter restricts to, or ``None`` when it restricts nothing.
|
|
13
|
+
|
|
14
|
+
An unrestricted filter is spelled as the absence of a selection, and an empty list means
|
|
15
|
+
the same thing, so both read as "all".
|
|
16
|
+
"""
|
|
17
|
+
state = attribute_filter.get("state") or {}
|
|
18
|
+
for kind in ("include", "exclude"):
|
|
19
|
+
values = state.get(kind)
|
|
20
|
+
if values:
|
|
21
|
+
return kind, list(values)
|
|
22
|
+
return None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def describe_selection(selection: tuple[str, list] | None) -> str:
|
|
26
|
+
return "all" if selection is None else f"{selection[0]} {selection[1]!r}"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def same_selection(actual: tuple[str, list] | None, expected: tuple[str, list] | None) -> bool:
|
|
30
|
+
"""Whether two selections restrict to the same elements: an include or exclude list is a set, not a sequence."""
|
|
31
|
+
if actual is None or expected is None:
|
|
32
|
+
return actual is None and expected is None
|
|
33
|
+
return actual[0] == expected[0] and same_unordered_values(expected[1], actual[1])
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def same_unordered_values(want: list, got: list) -> bool:
|
|
37
|
+
"""One-to-one match in any order, with each pair of the same type.
|
|
38
|
+
|
|
39
|
+
Not sorted: AAC allows `null` among the values, and Python cannot order it with strings.
|
|
40
|
+
Not stringified: `1` and `"1"` are different values.
|
|
41
|
+
"""
|
|
42
|
+
remaining = list(got)
|
|
43
|
+
for expected in want:
|
|
44
|
+
index = next(
|
|
45
|
+
(i for i, actual in enumerate(remaining) if type(actual) is type(expected) and actual == expected), None
|
|
46
|
+
)
|
|
47
|
+
if index is None:
|
|
48
|
+
return False
|
|
49
|
+
del remaining[index]
|
|
50
|
+
return not remaining
|