gooddata-eval 1.81.1.dev8__tar.gz → 1.82.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.81.1.dev8 → gooddata_eval-1.82.1.dev1}/PKG-INFO +2 -2
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/pyproject.toml +2 -2
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/forecasting.py +390 -10
- gooddata_eval-1.82.1.dev1/tests/test_agentic_forecasting_turns.py +710 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/.gitignore +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/AGENTS.md +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/CLAUDE.md +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/LICENSE.txt +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/Makefile +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/README.md +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/scripts/calibrate_catalog_metadata_judge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/scripts/calibrate_knowledge_judge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/scripts/calibrate_takeaway_judge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/scripts/verify_guardrail_refusal_criteria.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/_version.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/cli/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/cli/agentic_runner.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/cli/main.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/_output.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/_retry.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_alert_update.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_failure_message.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_filters.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_forecast_answer.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_gate.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_kda_answer.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_kda_expectation.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_metric_expectation.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_metric_workspace.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_search_expectation.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/agent_switcher.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/conversation.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/dashboard_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/document_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/general_question.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/kda_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/knowledge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/memory.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/visualization.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/agentic/what_if.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/catalog/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/catalog/evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/catalog/http_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/chat/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/chat/render.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/chat/sse_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/config.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/connection.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/dataset/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/dataset/local.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/base.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/catalog_metadata.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/knowledge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/summary.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/granularity.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/interaction.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/_env.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/observations.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/langfuse/sink.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/models.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/number_format.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/outcome.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/reporting/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/reporting/console.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/reporting/html_report.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/reporting/json_report.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/reporting/report_template.html +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/runner.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/scoring.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/summary/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/summary/http_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/timing.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/src/gooddata_eval/core/workspace.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/_fake_langfuse.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/conftest.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/catalog_metadata_calibration.json +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/dashboard_skill_sizes_switcher_in_container.json +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/knowledge_calibration.json +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/sse_visualization_stream.txt +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/fixtures/takeaway_calibration.json +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_agent_switcher.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_alert_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_alert_skill_checks.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_alert_update.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_anomaly_detection.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_conversation.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_dashboard_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_dashboard_summary.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_document_editor_takeaways.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_document_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_failure_message.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_forecasting.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_forecasting_behaviour.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_gate.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_general_question.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_guardrail.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_join_trace.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_kda_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_kda_skill_behaviour.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_kda_skill_fields.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_knowledge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_langfuse_trace.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_memory.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_metric_skill.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_metric_skill_options.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_observe_experiment.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_run_context.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_runner.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_search_tool.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_search_tool_checks.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_visualization.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_agentic_what_if.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_alert_skill_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_catalog_metadata_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_catalog_metadata_evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_catalog_metadata_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_chat_render.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_cli.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_connection.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_context_date_filter.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_deep_subset.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_eval_error_scores.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_fake_langfuse.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_from_insights.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_guardrail_criteria.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_html_report.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_interaction.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_knowledge_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_e2e_fake_server.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_env.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_experiment.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_item_scope.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_observations.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_otlp.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_sink.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_langfuse_source.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_llm_judge.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_local_loader.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_maql_normalize.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_metric_skill_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_models.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_number_format.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_outcome.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_reporting.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_runner.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_scoring.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_search_tool_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_sse_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_summary_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_summary_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_takeaway_client.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_takeaway_evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_takeaway_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_text_evaluators.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_timing.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_trace_linker.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_visualization_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tests/test_workspace.py +0 -0
- {gooddata_eval-1.81.1.dev8 → gooddata_eval-1.82.1.dev1}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gooddata-eval
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.82.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>
|
|
@@ -18,7 +18,7 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
18
18
|
Classifier: Topic :: Software Development
|
|
19
19
|
Classifier: Typing :: Typed
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
|
-
Requires-Dist: gooddata-sdk~=1.
|
|
21
|
+
Requires-Dist: gooddata-sdk~=1.82.1.dev1
|
|
22
22
|
Requires-Dist: httpx<1.0,>=0.27
|
|
23
23
|
Requires-Dist: jsonpatch<2.0,>=1.33
|
|
24
24
|
Requires-Dist: orjson<4.0.0,>=3.9.15
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# (C) 2026 GoodData Corporation
|
|
2
2
|
[project]
|
|
3
3
|
name = "gooddata-eval"
|
|
4
|
-
version = "1.
|
|
4
|
+
version = "1.82.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.11"
|
|
13
13
|
dependencies = [
|
|
14
|
-
"gooddata-sdk~=1.
|
|
14
|
+
"gooddata-sdk~=1.82.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",
|
|
@@ -28,6 +28,12 @@ The behaviour keys are opt-in, and each adds one score:
|
|
|
28
28
|
``GD_EVAL_JUDGE_MODEL`` when set, else gpt-5.2.
|
|
29
29
|
- ``check_answer: true``: the answer names a value the forecast predicted
|
|
30
30
|
(``forecast_answer_grounded``).
|
|
31
|
+
- ``turns``: the item is a conversation. The question is the first turn, and each entry is a later
|
|
32
|
+
one, ``{"message": ..., "expected": {...}}``. The last entry may be a message alone: the item's own
|
|
33
|
+
keys check it, and ``expect_forecast: false`` there means the last turn leaves no forecast on
|
|
34
|
+
screen. ``first_turn`` checks the question, and every other turn states its ``expected``
|
|
35
|
+
(``forecast_turns_correct``). An unchecked turn would take the agent's first answer, and the next
|
|
36
|
+
message would answer its question.
|
|
31
37
|
"""
|
|
32
38
|
|
|
33
39
|
from __future__ import annotations
|
|
@@ -52,6 +58,7 @@ from gooddata_eval.core.agentic._gate import (
|
|
|
52
58
|
)
|
|
53
59
|
from gooddata_eval.core.agentic._outcome import (
|
|
54
60
|
agentic_success,
|
|
61
|
+
chat_failure_exit,
|
|
55
62
|
failure_message_head,
|
|
56
63
|
label_runs,
|
|
57
64
|
log_eval_error_score,
|
|
@@ -76,6 +83,7 @@ from gooddata_eval.core.models import (
|
|
|
76
83
|
AgenticAssertionError,
|
|
77
84
|
AgenticEvalOutcome,
|
|
78
85
|
ChatResult,
|
|
86
|
+
LoopExit,
|
|
79
87
|
ReasoningStepEvent,
|
|
80
88
|
ToolCallEvent,
|
|
81
89
|
build_latency_breakdown,
|
|
@@ -101,7 +109,12 @@ _TREND_GRANULARITIES = ("MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "QUARTER", "YE
|
|
|
101
109
|
_CONTENT_KEYS = frozenset(
|
|
102
110
|
{"metric", "forecast_period", "forecast_confidence", "forecast_seasonal", "granularity", "date_dataset"}
|
|
103
111
|
)
|
|
104
|
-
_BEHAVIOUR_KEYS = frozenset(
|
|
112
|
+
_BEHAVIOUR_KEYS = frozenset(
|
|
113
|
+
{"any_of", "filters", "expect_forecast", "forbid_date_datasets", "rubric", "check_answer", "turns", "first_turn"}
|
|
114
|
+
)
|
|
115
|
+
# What the expectation of one turn of a conversation may state.
|
|
116
|
+
_TURN_KEYS = _CONTENT_KEYS | {"filters", "expect_forecast"}
|
|
117
|
+
_TURN_ENTRY_KEYS = frozenset({"message", "expected"})
|
|
105
118
|
_KNOWN_KEYS = _CONTENT_KEYS | _BEHAVIOUR_KEYS
|
|
106
119
|
# What expect_forecast: false leaves nothing to check on.
|
|
107
120
|
_FORECAST_ONLY_KEYS = _CONTENT_KEYS | {"any_of", "filters", "check_answer"}
|
|
@@ -241,6 +254,62 @@ def _validate_dataset_ids(key: str, value: object) -> None:
|
|
|
241
254
|
raise ValueError(f"{key} takes a dataset id such as order_date, got {dataset!r}")
|
|
242
255
|
|
|
243
256
|
|
|
257
|
+
def _validate_turn_expectation(spec: object, where: str) -> None:
|
|
258
|
+
if not isinstance(spec, dict) or not spec:
|
|
259
|
+
raise ValueError(f"{where} must be a non-empty object, got {spec!r}")
|
|
260
|
+
if unknown := sorted(set(spec) - _TURN_KEYS):
|
|
261
|
+
raise ValueError(f"{where} has unknown keys {unknown}; a turn may state only {sorted(_TURN_KEYS)}")
|
|
262
|
+
flag = spec.get("expect_forecast")
|
|
263
|
+
if flag is not None and not isinstance(flag, bool):
|
|
264
|
+
raise ValueError(f"{where}.expect_forecast must be true or false, got {flag!r}")
|
|
265
|
+
if flag is False and (
|
|
266
|
+
pinned := sorted(key for key in _TURN_KEYS - {"expect_forecast"} if spec.get(key) is not None)
|
|
267
|
+
):
|
|
268
|
+
raise ValueError(f"{where} expects no forecast, so it cannot pin {pinned}")
|
|
269
|
+
_validate_content(spec, where)
|
|
270
|
+
if spec.get("filters") is not None:
|
|
271
|
+
_validate_filters(spec["filters"])
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def _validate_turns(expected_output: dict) -> None:
|
|
275
|
+
turns = expected_output.get("turns")
|
|
276
|
+
if turns is None:
|
|
277
|
+
if expected_output.get("first_turn") is not None:
|
|
278
|
+
raise ValueError("first_turn checks the first turn of a conversation, so turns must be set too")
|
|
279
|
+
return
|
|
280
|
+
if not isinstance(turns, list) or not turns:
|
|
281
|
+
raise ValueError(f"turns must be a non-empty list of messages, got {turns!r}")
|
|
282
|
+
for index, entry in enumerate(turns):
|
|
283
|
+
where = f"turns[{index}]"
|
|
284
|
+
if isinstance(entry, str):
|
|
285
|
+
if not entry.strip():
|
|
286
|
+
raise ValueError(f"{where} is an empty message")
|
|
287
|
+
continue
|
|
288
|
+
if not isinstance(entry, dict):
|
|
289
|
+
raise ValueError(f"{where} must be a message or an object with message and expected, got {entry!r}")
|
|
290
|
+
if unknown := sorted(set(entry) - _TURN_ENTRY_KEYS):
|
|
291
|
+
raise ValueError(f"{where} has unknown keys {unknown}; a turn takes {sorted(_TURN_ENTRY_KEYS)}")
|
|
292
|
+
message = entry.get("message")
|
|
293
|
+
if not isinstance(message, str) or not message.strip():
|
|
294
|
+
raise ValueError(f"{where}.message must be a non-empty string, got {message!r}")
|
|
295
|
+
if entry.get("expected") is not None:
|
|
296
|
+
if index == len(turns) - 1:
|
|
297
|
+
raise ValueError(f"{where} is the last turn: the item's own keys check it, so it takes no expected")
|
|
298
|
+
_validate_turn_expectation(entry["expected"], f"{where}.expected")
|
|
299
|
+
if expected_output.get("first_turn") is not None:
|
|
300
|
+
_validate_turn_expectation(expected_output["first_turn"], "first_turn")
|
|
301
|
+
# A turn without an expectation takes the agent's first answer, which may be a question.
|
|
302
|
+
# The next message would then answer it, and the conversation would pass on a forecast
|
|
303
|
+
# that no earlier turn built.
|
|
304
|
+
if expected_output.get("first_turn") is None:
|
|
305
|
+
raise ValueError(
|
|
306
|
+
"a conversation needs first_turn: the question is a turn, and every turn but the last is checked"
|
|
307
|
+
)
|
|
308
|
+
for index, entry in enumerate(turns[:-1]):
|
|
309
|
+
if isinstance(entry, str) or entry.get("expected") is None:
|
|
310
|
+
raise ValueError(f"turns[{index}] needs expected: every turn but the last is checked")
|
|
311
|
+
|
|
312
|
+
|
|
244
313
|
def _validate_expectation(expected_output: object) -> None:
|
|
245
314
|
"""Reject an expectation the run could not score, before the first API call.
|
|
246
315
|
|
|
@@ -289,6 +358,7 @@ def _validate_expectation(expected_output: object) -> None:
|
|
|
289
358
|
rubric = expected_output.get("rubric")
|
|
290
359
|
if rubric is not None and (not isinstance(rubric, str) or not rubric.strip()):
|
|
291
360
|
raise ValueError(f"rubric must be a non-empty string, got {rubric!r}")
|
|
361
|
+
_validate_turns(expected_output)
|
|
292
362
|
|
|
293
363
|
|
|
294
364
|
def _date_attribute(viz_args: dict | None) -> tuple[str, str] | None:
|
|
@@ -482,11 +552,14 @@ def _forecast_shown(tool_call_events: list[ToolCallEvent]) -> dict[str, bool]:
|
|
|
482
552
|
``ran``: an execute_forecast call succeeded. ``unexecuted``: a chart that can carry a forecast
|
|
483
553
|
(see ``_draws_forecast``) has it enabled and no execute_forecast followed it, so the user sees
|
|
484
554
|
that chart as a forecast. A chart whose execute_forecast failed is not one: the tool refused it.
|
|
555
|
+
An execute_forecast settles the latest chart only when its ``visualization_ref`` names that chart,
|
|
556
|
+
or names none.
|
|
485
557
|
"""
|
|
486
558
|
ran = False
|
|
487
559
|
unexecuted = False
|
|
488
|
-
# Whether the latest chart has the forecast enabled and no execute_forecast
|
|
560
|
+
# Whether the latest chart has the forecast enabled and no execute_forecast for it yet, and its ref.
|
|
489
561
|
pending = False
|
|
562
|
+
pending_ref: object = None
|
|
490
563
|
for tc in tool_call_events:
|
|
491
564
|
if tc.function_name == "create_adhoc_visualization":
|
|
492
565
|
args = tc.parsed_arguments() or {}
|
|
@@ -495,10 +568,15 @@ def _forecast_shown(tool_call_events: list[ToolCallEvent]) -> dict[str, bool]:
|
|
|
495
568
|
unexecuted = unexecuted or pending
|
|
496
569
|
# A chart the tool rejected is never shown.
|
|
497
570
|
pending = not _rejected(tc) and _draws_forecast(chart)
|
|
571
|
+
created = tc.parsed_result() if tc.result else None
|
|
572
|
+
pending_ref = created.get("ref") if isinstance(created, dict) else None
|
|
498
573
|
elif tc.function_name == "execute_forecast" and tc.result:
|
|
499
574
|
result = tc.parsed_result()
|
|
500
575
|
ran = ran or (isinstance(result, dict) and result.get("success") is True)
|
|
501
|
-
|
|
576
|
+
args = tc.parsed_arguments() or {}
|
|
577
|
+
ref = args.get("visualization_ref") if isinstance(args, dict) else None
|
|
578
|
+
if ref is None or ref == pending_ref:
|
|
579
|
+
pending = False
|
|
502
580
|
return {"ran": ran, "unexecuted": unexecuted or pending}
|
|
503
581
|
|
|
504
582
|
|
|
@@ -565,7 +643,7 @@ class ForecastEvaluation:
|
|
|
565
643
|
``asserted`` records which of them the fixture actually pinned.
|
|
566
644
|
|
|
567
645
|
The behaviour checks (``filters_correct``, ``not_run``, ``date_dataset_allowed``,
|
|
568
|
-
``rubric_passed``, ``answer_grounded``) follow the same rule, by their expectation key in
|
|
646
|
+
``rubric_passed``, ``answer_grounded``, ``turns_correct``) follow the same rule, by their expectation key in
|
|
569
647
|
``asserted``. With ``expect_forecast`` False the item gates on ``turn_completed`` and
|
|
570
648
|
``not_run`` in place of the forecast checks. ``unscored`` names the checks the harness could
|
|
571
649
|
not grade (the judge gave no verdict): they read False, and ``judge_error`` says why.
|
|
@@ -591,6 +669,7 @@ class ForecastEvaluation:
|
|
|
591
669
|
date_dataset_allowed: bool = True
|
|
592
670
|
rubric_passed: bool = True
|
|
593
671
|
answer_grounded: bool = True
|
|
672
|
+
turns_correct: bool = True
|
|
594
673
|
# The any_of option the content checks are taken from; None without any_of.
|
|
595
674
|
option_index: int | None = None
|
|
596
675
|
unscored: tuple[str, ...] = ()
|
|
@@ -628,6 +707,7 @@ _BEHAVIOUR_CHECKS = (
|
|
|
628
707
|
("forbid_date_datasets", "date_dataset_allowed", "forecast_date_dataset_allowed"),
|
|
629
708
|
("rubric", "rubric_passed", "forecast_rubric"),
|
|
630
709
|
("check_answer", "answer_grounded", "forecast_answer_grounded"),
|
|
710
|
+
("turns", "turns_correct", "forecast_turns_correct"),
|
|
631
711
|
)
|
|
632
712
|
|
|
633
713
|
|
|
@@ -646,6 +726,8 @@ class ForecastRunResult:
|
|
|
646
726
|
reasoning_step_events: list[ReasoningStepEvent] = field(default_factory=list)
|
|
647
727
|
# This run's own wall time, from just before its chat call to the end of its scoring.
|
|
648
728
|
run_latency_s: float = 0.0
|
|
729
|
+
# Why a conversation stopped early, for the run's label; None for a single question.
|
|
730
|
+
exit_reason: LoopExit | None = None
|
|
649
731
|
|
|
650
732
|
|
|
651
733
|
@dataclass
|
|
@@ -765,6 +847,110 @@ def _judge(judge: LLMJudge, rubric: str, question: str, transcript: list[tuple[s
|
|
|
765
847
|
return JudgeVerdict(passed=False, reasoning="", error=f"{type(exc).__name__}: {exc}")
|
|
766
848
|
|
|
767
849
|
|
|
850
|
+
def _turn_pair(prior: list[ToolCallEvent], turn: list[ToolCallEvent]) -> tuple[dict | None, dict | None]:
|
|
851
|
+
"""The chart and the forecast of one turn of a conversation.
|
|
852
|
+
|
|
853
|
+
The forecast must run in this turn, or a turn that changed nothing would pass on an earlier
|
|
854
|
+
turn's. Its chart is the one its ``visualization_ref`` names, which may come from an earlier
|
|
855
|
+
turn: by then the conversation holds several charts, and the newest need not be the one run.
|
|
856
|
+
A turn with no chart and no forecast has neither.
|
|
857
|
+
"""
|
|
858
|
+
charts: dict[str, dict] = {}
|
|
859
|
+
for tc in prior + turn:
|
|
860
|
+
if tc.function_name != "create_adhoc_visualization" or _rejected(tc):
|
|
861
|
+
continue
|
|
862
|
+
result = tc.parsed_result() if tc.result else None
|
|
863
|
+
ref = result.get("ref") if isinstance(result, dict) else None
|
|
864
|
+
args = tc.parsed_arguments() or {}
|
|
865
|
+
viz = args.get("visualization") if isinstance(args, dict) else None
|
|
866
|
+
if isinstance(ref, str):
|
|
867
|
+
charts[ref] = viz if isinstance(viz, dict) else args if isinstance(args, dict) else {}
|
|
868
|
+
executes = [tc for tc in turn if tc.function_name == "execute_forecast" and tc.result]
|
|
869
|
+
if executes:
|
|
870
|
+
args = executes[-1].parsed_arguments() or {}
|
|
871
|
+
ref = args.get("visualization_ref") if isinstance(args, dict) else None
|
|
872
|
+
if isinstance(ref, str) and ref in charts:
|
|
873
|
+
result = executes[-1].parsed_result()
|
|
874
|
+
return charts[ref], result if isinstance(result, dict) else {}
|
|
875
|
+
viz_args, execute_result = _extract_forecast_calls(prior + turn)
|
|
876
|
+
if not executes:
|
|
877
|
+
execute_result = None
|
|
878
|
+
if not any(tc.function_name == "create_adhoc_visualization" for tc in turn):
|
|
879
|
+
viz_args = None
|
|
880
|
+
return viz_args, execute_result
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
def _last_chart_draws_forecast(events: list[ToolCallEvent]) -> bool:
|
|
884
|
+
"""Whether the last chart the tool accepted shows a forecast: it draws one, and the tool did not refuse it.
|
|
885
|
+
|
|
886
|
+
A chart whose execute_forecast answered success: false has no forecast to show, as in _forecast_shown.
|
|
887
|
+
A run counts only for the chart its ``visualization_ref`` names, or the last chart when it names none,
|
|
888
|
+
and the last run of that chart decides: a successful retry after a refusal shows the forecast again.
|
|
889
|
+
"""
|
|
890
|
+
draws = False
|
|
891
|
+
chart_draws = False
|
|
892
|
+
last_ref: object = None
|
|
893
|
+
for tc in events:
|
|
894
|
+
if tc.function_name == "create_adhoc_visualization" and not _rejected(tc):
|
|
895
|
+
args = tc.parsed_arguments() or {}
|
|
896
|
+
viz = args.get("visualization") if isinstance(args, dict) else None
|
|
897
|
+
chart_draws = _draws_forecast(viz if isinstance(viz, dict) else args if isinstance(args, dict) else {})
|
|
898
|
+
draws = chart_draws
|
|
899
|
+
result = tc.parsed_result() if tc.result else None
|
|
900
|
+
last_ref = result.get("ref") if isinstance(result, dict) else None
|
|
901
|
+
elif tc.function_name == "execute_forecast" and tc.result:
|
|
902
|
+
result = tc.parsed_result()
|
|
903
|
+
args = tc.parsed_arguments() or {}
|
|
904
|
+
ref = args.get("visualization_ref") if isinstance(args, dict) else None
|
|
905
|
+
if not isinstance(result, dict) or (ref is not None and ref != last_ref):
|
|
906
|
+
continue
|
|
907
|
+
if result.get("success") is False:
|
|
908
|
+
draws = False
|
|
909
|
+
elif result.get("success") is True:
|
|
910
|
+
draws = chart_draws
|
|
911
|
+
return draws
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
def _no_forecast_shown(prior: list[ToolCallEvent], turn: list[ToolCallEvent]) -> tuple[bool, dict[str, bool]]:
|
|
915
|
+
"""Whether a turn ran no forecast and left the user a chart that draws none.
|
|
916
|
+
|
|
917
|
+
"Remove the forecast" is met by a new chart without one, not by words alone: the forecast chart
|
|
918
|
+
of an earlier turn is still the one on screen.
|
|
919
|
+
"""
|
|
920
|
+
turn_shown = _forecast_shown(turn)
|
|
921
|
+
shown = _last_chart_draws_forecast(prior + turn)
|
|
922
|
+
none_shown = not turn_shown["ran"] and not turn_shown["unexecuted"] and not shown
|
|
923
|
+
return none_shown, {
|
|
924
|
+
"forecast_ran": turn_shown["ran"],
|
|
925
|
+
"forecast_chart_unexecuted": turn_shown["unexecuted"],
|
|
926
|
+
"last_chart_draws_forecast": shown,
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
def _turn_check(
|
|
931
|
+
spec: dict, prior: list[ToolCallEvent], turn: list[ToolCallEvent], completed: bool
|
|
932
|
+
) -> tuple[bool, dict[str, Any]]:
|
|
933
|
+
"""Whether one checked turn of a conversation did what its expectation states, and what failed."""
|
|
934
|
+
if spec.get("expect_forecast") is False:
|
|
935
|
+
none_shown, detail = _no_forecast_shown(prior, turn)
|
|
936
|
+
# A refusal or a question shows no forecast either; the turn asks for a chart without one.
|
|
937
|
+
chart = any(tc.function_name == "create_adhoc_visualization" and not _rejected(tc) for tc in turn)
|
|
938
|
+
return completed and chart and none_shown, {**detail, "answered": completed, "chart_created": chart}
|
|
939
|
+
viz_args, execute_result = _turn_pair(prior, turn)
|
|
940
|
+
checks = {
|
|
941
|
+
"answered": completed,
|
|
942
|
+
"executed": execute_result is not None,
|
|
943
|
+
"success": isinstance(execute_result, dict) and execute_result.get("success") is True,
|
|
944
|
+
"forecast_enabled": _forecast_config(viz_args).get("forecast_enabled") is True,
|
|
945
|
+
}
|
|
946
|
+
content = _content_checks(viz_args, spec, _date_attribute(viz_args))
|
|
947
|
+
checks.update({_ASSERTED_FIELD[key]: content.checks[_ASSERTED_FIELD[key]] for key in content.asserted})
|
|
948
|
+
if spec.get("filters") is not None:
|
|
949
|
+
checks["filters_correct"] = _filters_met(spec["filters"], viz_args)
|
|
950
|
+
failed = [name for name, ok in checks.items() if not ok]
|
|
951
|
+
return not failed, {"failed": failed, "actual_forecast_config": _forecast_config(viz_args)}
|
|
952
|
+
|
|
953
|
+
|
|
768
954
|
def _evaluate_run(
|
|
769
955
|
viz_args: dict | None,
|
|
770
956
|
execute_result: dict | None,
|
|
@@ -777,8 +963,14 @@ def _evaluate_run(
|
|
|
777
963
|
question: str = "",
|
|
778
964
|
transcript: list[tuple[str, str]] | None = None,
|
|
779
965
|
judge: LLMJudge | None = None,
|
|
966
|
+
final_turn_events: list[ToolCallEvent] | None = None,
|
|
967
|
+
turn_results: list[dict[str, Any]] | None = None,
|
|
780
968
|
) -> ForecastEvaluation:
|
|
781
|
-
"""Score one run. ``events`` are every tool call of the run, ``answer`` the text of its last turn.
|
|
969
|
+
"""Score one run. ``events`` are every tool call of the run, ``answer`` the text of its last turn.
|
|
970
|
+
|
|
971
|
+
A conversation (an item with ``turns``) passes ``final_turn_events``, the tool calls of its last
|
|
972
|
+
turn, and ``turn_results``, the checks of its earlier turns. A single question passes neither.
|
|
973
|
+
"""
|
|
782
974
|
events = events or []
|
|
783
975
|
triggered = execute_result is not None or viz_args is not None
|
|
784
976
|
executed = execute_result is not None
|
|
@@ -798,7 +990,12 @@ def _evaluate_run(
|
|
|
798
990
|
|
|
799
991
|
expect_forecast = expected_output.get("expect_forecast") is not False
|
|
800
992
|
not_run = True
|
|
801
|
-
if not expect_forecast:
|
|
993
|
+
if not expect_forecast and final_turn_events is not None:
|
|
994
|
+
asserted.append("expect_forecast")
|
|
995
|
+
none_shown, shown_detail = _no_forecast_shown(events[: len(events) - len(final_turn_events)], final_turn_events)
|
|
996
|
+
not_run = turn_completed and none_shown
|
|
997
|
+
detail["forecast_not_run"] = {**shown_detail, "answered": turn_completed}
|
|
998
|
+
elif not expect_forecast:
|
|
802
999
|
asserted.append("expect_forecast")
|
|
803
1000
|
shown = _forecast_shown(events)
|
|
804
1001
|
# A caller that passes no events still passes the scored pair.
|
|
@@ -855,6 +1052,15 @@ def _evaluate_run(
|
|
|
855
1052
|
asserted.append("check_answer")
|
|
856
1053
|
answer_grounded, detail["forecast_answer_grounded"] = check_answer_grounded(execute_result, answer)
|
|
857
1054
|
|
|
1055
|
+
turns_correct = True
|
|
1056
|
+
if turn_results:
|
|
1057
|
+
asserted.append("turns")
|
|
1058
|
+
turns_correct = all(result["ok"] for result in turn_results)
|
|
1059
|
+
detail["forecast_turns_correct"] = {
|
|
1060
|
+
"first_failed_turn": next((r["turn"] for r in turn_results if not r["ok"]), None),
|
|
1061
|
+
"turns": turn_results,
|
|
1062
|
+
}
|
|
1063
|
+
|
|
858
1064
|
return ForecastEvaluation(
|
|
859
1065
|
triggered=triggered,
|
|
860
1066
|
executed=executed,
|
|
@@ -871,6 +1077,7 @@ def _evaluate_run(
|
|
|
871
1077
|
date_dataset_allowed=date_dataset_allowed,
|
|
872
1078
|
rubric_passed=rubric_passed,
|
|
873
1079
|
answer_grounded=answer_grounded,
|
|
1080
|
+
turns_correct=turns_correct,
|
|
874
1081
|
option_index=option_index if expected_output.get("any_of") is not None else None,
|
|
875
1082
|
unscored=tuple(unscored),
|
|
876
1083
|
judge_error=judge_error,
|
|
@@ -878,6 +1085,37 @@ def _evaluate_run(
|
|
|
878
1085
|
)
|
|
879
1086
|
|
|
880
1087
|
|
|
1088
|
+
@dataclass(frozen=True)
|
|
1089
|
+
class _PlannedTurn:
|
|
1090
|
+
"""One user turn of a conversation item: its message, what is checked after it, and how it is run."""
|
|
1091
|
+
|
|
1092
|
+
message: str
|
|
1093
|
+
# The expectation checked right after this turn. None for the last turn, which the item's own
|
|
1094
|
+
# keys check; validation gives every other turn one.
|
|
1095
|
+
expected: dict | None
|
|
1096
|
+
# Whether the turn waits for a forecast: the simulated user answers its questions until one runs.
|
|
1097
|
+
waits: bool
|
|
1098
|
+
# The fields the simulated user answers this turn's questions from.
|
|
1099
|
+
hints: dict
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
def _conversation_plan(question: str, expected_output: dict) -> list[_PlannedTurn]:
|
|
1103
|
+
"""The turns of a conversation item: the question with ``first_turn``, then each of ``turns``."""
|
|
1104
|
+
entries: list[dict] = [{"message": question, "expected": expected_output.get("first_turn")}]
|
|
1105
|
+
entries += [{"message": entry} if isinstance(entry, str) else entry for entry in expected_output["turns"]]
|
|
1106
|
+
plan: list[_PlannedTurn] = []
|
|
1107
|
+
for index, entry in enumerate(entries):
|
|
1108
|
+
if index == len(entries) - 1:
|
|
1109
|
+
waits = expected_output.get("expect_forecast") is not False
|
|
1110
|
+
plan.append(_PlannedTurn(entry["message"], None, waits, _content_specs(expected_output)[0]))
|
|
1111
|
+
continue
|
|
1112
|
+
expected = entry.get("expected")
|
|
1113
|
+
waits = expected is not None and expected.get("expect_forecast") is not False
|
|
1114
|
+
hints = {key: value for key, value in (expected or {}).items() if key in _CONTENT_KEYS}
|
|
1115
|
+
plan.append(_PlannedTurn(entry["message"], expected, waits, hints))
|
|
1116
|
+
return plan
|
|
1117
|
+
|
|
1118
|
+
|
|
881
1119
|
def run_agentic_forecasting(
|
|
882
1120
|
host: str,
|
|
883
1121
|
token: str,
|
|
@@ -901,6 +1139,12 @@ def run_agentic_forecasting(
|
|
|
901
1139
|
An item with ``expect_forecast: false`` ends at the agent's first answer instead: a
|
|
902
1140
|
simulated reply would only push it towards a forecast.
|
|
903
1141
|
|
|
1142
|
+
An item with ``turns`` is a conversation and runs in ``_run_turns`` instead. Each turn sends its
|
|
1143
|
+
message. A turn that expects a forecast takes up to ``max_iterations - 1`` simulated replies to
|
|
1144
|
+
reach one, as a single question does; any other turn takes the agent's first answer, so a turn
|
|
1145
|
+
that asks for a forecast needs an expectation. The last turn is scored by the item's own keys.
|
|
1146
|
+
Turns are numbered from 1, the question.
|
|
1147
|
+
|
|
904
1148
|
Raises:
|
|
905
1149
|
ImportError, OSError: The item has a rubric and the LLM judge cannot be built.
|
|
906
1150
|
"""
|
|
@@ -1026,10 +1270,145 @@ def run_agentic_forecasting(
|
|
|
1026
1270
|
run_latency_s=time.monotonic() - run_started,
|
|
1027
1271
|
)
|
|
1028
1272
|
|
|
1273
|
+
def _run_turns(conv_id: str) -> ForecastRunResult:
|
|
1274
|
+
plan = _conversation_plan(question, expected_output)
|
|
1275
|
+
reasoning_steps: list[str] = []
|
|
1276
|
+
response_id: str | None = None
|
|
1277
|
+
all_tool_call_events: list[ToolCallEvent] = []
|
|
1278
|
+
all_reasoning_step_events: list[ReasoningStepEvent] = []
|
|
1279
|
+
turn_offset = 0.0
|
|
1280
|
+
tool_index_offset = 0
|
|
1281
|
+
reasoning_index_offset = 0
|
|
1282
|
+
transcript: list[tuple[str, str]] = []
|
|
1283
|
+
# The tool calls and the completion of each turn that ran, in order.
|
|
1284
|
+
turn_events: list[list[ToolCallEvent]] = []
|
|
1285
|
+
turn_completed: list[bool] = []
|
|
1286
|
+
answer = ""
|
|
1287
|
+
disambiguated = False
|
|
1288
|
+
turn_wall_clock_sec: float | None = None
|
|
1289
|
+
exit_reason: LoopExit | None = None
|
|
1290
|
+
replies_per_turn = max(max_iterations - 1, 0)
|
|
1291
|
+
|
|
1292
|
+
def _accumulate(result: ChatResult) -> None:
|
|
1293
|
+
nonlocal turn_offset, tool_index_offset, reasoning_index_offset
|
|
1294
|
+
turn_offset, tool_index_offset, reasoning_index_offset = shift_and_index_events(
|
|
1295
|
+
result,
|
|
1296
|
+
turn_offset=turn_offset,
|
|
1297
|
+
tool_index_offset=tool_index_offset,
|
|
1298
|
+
reasoning_index_offset=reasoning_index_offset,
|
|
1299
|
+
)
|
|
1300
|
+
all_tool_call_events.extend(result.tool_call_events or [])
|
|
1301
|
+
all_reasoning_step_events.extend(result.reasoning_step_events or [])
|
|
1302
|
+
|
|
1303
|
+
run_started = time.monotonic()
|
|
1304
|
+
for turn in plan:
|
|
1305
|
+
events: list[ToolCallEvent] = []
|
|
1306
|
+
current = turn.message
|
|
1307
|
+
completed = False
|
|
1308
|
+
stopped = False
|
|
1309
|
+
for reply in range(replies_per_turn + 1):
|
|
1310
|
+
transcript.append(("User", current))
|
|
1311
|
+
answer = ""
|
|
1312
|
+
try:
|
|
1313
|
+
chat_result = client.send_message(conv_id, current)
|
|
1314
|
+
except Exception as exc: # noqa: BLE001 -- end this run, not the whole item
|
|
1315
|
+
_log.warning("Forecast send_message failed for conversation %s: %s", conv_id, exc)
|
|
1316
|
+
partial = getattr(exc, "partial_result", None)
|
|
1317
|
+
if partial is not None:
|
|
1318
|
+
reasoning_steps.extend(partial.reasoning_steps or [])
|
|
1319
|
+
response_id = partial.response_id or response_id
|
|
1320
|
+
_accumulate(partial)
|
|
1321
|
+
events.extend(partial.tool_call_events or [])
|
|
1322
|
+
completed = False
|
|
1323
|
+
stopped = True
|
|
1324
|
+
exit_reason = chat_failure_exit(exc)
|
|
1325
|
+
break
|
|
1326
|
+
reasoning_steps.extend(chat_result.reasoning_steps or [])
|
|
1327
|
+
response_id = chat_result.response_id or response_id
|
|
1328
|
+
_accumulate(chat_result)
|
|
1329
|
+
events.extend(chat_result.tool_call_events or [])
|
|
1330
|
+
answer = render_answer_text(chat_result)
|
|
1331
|
+
if answer:
|
|
1332
|
+
transcript.append(("Assistant", answer))
|
|
1333
|
+
# A reply that is a chart without prose is an answer too.
|
|
1334
|
+
shows_chart = bool(_charts(chat_result.tool_call_events or []))
|
|
1335
|
+
completed = chat_result.stream_ended and (bool(answer) or shows_chart)
|
|
1336
|
+
turn_wall_clock_sec = chat_result.turn_wall_clock_sec
|
|
1337
|
+
forecast_ran = any(tc.function_name == "execute_forecast" and tc.result for tc in events)
|
|
1338
|
+
# A reply cut off before the stream ended is not one to answer: the turn ends incomplete.
|
|
1339
|
+
if (
|
|
1340
|
+
forecast_ran
|
|
1341
|
+
or not turn.waits
|
|
1342
|
+
or not answer
|
|
1343
|
+
or not chat_result.stream_ended
|
|
1344
|
+
or reply == replies_per_turn
|
|
1345
|
+
):
|
|
1346
|
+
break
|
|
1347
|
+
try:
|
|
1348
|
+
current = generate_simulated_forecast_response(answer, turn.hints)
|
|
1349
|
+
disambiguated = True
|
|
1350
|
+
except Exception as exc: # noqa: BLE001 -- harness-side fault; end only this run
|
|
1351
|
+
_log.warning("Simulated forecast user reply failed for conversation %s: %s", conv_id, exc)
|
|
1352
|
+
stopped = True
|
|
1353
|
+
exit_reason = LoopExit.SIMULATED_USER_FAILED
|
|
1354
|
+
break
|
|
1355
|
+
turn_events.append(events)
|
|
1356
|
+
turn_completed.append(completed)
|
|
1357
|
+
# A later turn builds on this one, so a turn that broke off ends the conversation.
|
|
1358
|
+
if stopped or not completed:
|
|
1359
|
+
break
|
|
1360
|
+
|
|
1361
|
+
reached_last = len(turn_events) == len(plan)
|
|
1362
|
+
final_events = turn_events[-1] if reached_last else []
|
|
1363
|
+
prior = [tc for events in turn_events[:-1] for tc in events] if reached_last else all_tool_call_events
|
|
1364
|
+
if reached_last:
|
|
1365
|
+
viz_args, execute_result = _turn_pair(prior, final_events)
|
|
1366
|
+
else:
|
|
1367
|
+
viz_args, execute_result = _extract_forecast_calls(all_tool_call_events)[0], None
|
|
1368
|
+
turn_results: list[dict[str, Any]] = []
|
|
1369
|
+
for index, turn in enumerate(plan[:-1]):
|
|
1370
|
+
if index < len(turn_events):
|
|
1371
|
+
before = [tc for events in turn_events[:index] for tc in events]
|
|
1372
|
+
spec = turn.expected or {}
|
|
1373
|
+
ok, turn_detail = _turn_check(spec, before, turn_events[index], turn_completed[index])
|
|
1374
|
+
else:
|
|
1375
|
+
ok, turn_detail = False, {"reached": False}
|
|
1376
|
+
turn_results.append({"turn": index + 1, "message": turn.message, "ok": ok, **turn_detail})
|
|
1377
|
+
|
|
1378
|
+
return ForecastRunResult(
|
|
1379
|
+
conversation_id=conv_id,
|
|
1380
|
+
evaluation=_evaluate_run(
|
|
1381
|
+
viz_args,
|
|
1382
|
+
execute_result,
|
|
1383
|
+
expected_output,
|
|
1384
|
+
reached_last and turn_completed[-1],
|
|
1385
|
+
disambiguated,
|
|
1386
|
+
events=all_tool_call_events,
|
|
1387
|
+
answer=answer if reached_last else "",
|
|
1388
|
+
question=question,
|
|
1389
|
+
transcript=transcript,
|
|
1390
|
+
judge=judge,
|
|
1391
|
+
final_turn_events=final_events,
|
|
1392
|
+
turn_results=turn_results or None,
|
|
1393
|
+
),
|
|
1394
|
+
actual_visualization=viz_args,
|
|
1395
|
+
actual_execute_result=execute_result,
|
|
1396
|
+
turn_wall_clock_sec=turn_wall_clock_sec,
|
|
1397
|
+
reasoning_steps=reasoning_steps,
|
|
1398
|
+
response_id=response_id,
|
|
1399
|
+
tool_call_events=all_tool_call_events,
|
|
1400
|
+
reasoning_step_events=all_reasoning_step_events,
|
|
1401
|
+
run_latency_s=time.monotonic() - run_started,
|
|
1402
|
+
exit_reason=exit_reason,
|
|
1403
|
+
)
|
|
1404
|
+
|
|
1405
|
+
# A conversation item runs turn by turn; a single question runs the clarification loop.
|
|
1406
|
+
run = _run_turns if expected_output.get("turns") is not None else _run_once
|
|
1407
|
+
|
|
1029
1408
|
try:
|
|
1030
1409
|
conv_id_0 = initial_conversation_id if initial_conversation_id is not None else client.create_conversation()
|
|
1031
1410
|
try:
|
|
1032
|
-
run_results.append(
|
|
1411
|
+
run_results.append(run(conv_id_0))
|
|
1033
1412
|
finally:
|
|
1034
1413
|
if initial_conversation_id is None: # only delete conversations we created
|
|
1035
1414
|
client.delete_conversation(conv_id_0)
|
|
@@ -1037,7 +1416,7 @@ def run_agentic_forecasting(
|
|
|
1037
1416
|
for _ in range(1, k):
|
|
1038
1417
|
conv_id = client.create_conversation()
|
|
1039
1418
|
try:
|
|
1040
|
-
run_results.append(
|
|
1419
|
+
run_results.append(run(conv_id))
|
|
1041
1420
|
finally:
|
|
1042
1421
|
client.delete_conversation(conv_id)
|
|
1043
1422
|
finally:
|
|
@@ -1100,8 +1479,9 @@ def _detail(best: ForecastRunResult) -> dict[str, Any]:
|
|
|
1100
1479
|
# Which checks the fixture pinned. Without it a run where nothing was
|
|
1101
1480
|
# asserted is indistinguishable in the report from one where everything matched.
|
|
1102
1481
|
"asserted": ev.asserted,
|
|
1103
|
-
#
|
|
1104
|
-
|
|
1482
|
+
# A single question that expects no forecast ends before any simulated reply, so it reports none;
|
|
1483
|
+
# a conversation can reply in an earlier turn.
|
|
1484
|
+
**({"disambiguated": ev.disambiguated} if ev.expect_forecast or ev.disambiguated else {}),
|
|
1105
1485
|
**({"any_of_option": ev.option_index} if ev.option_index is not None else {}),
|
|
1106
1486
|
**({"behaviour_detail": ev.behaviour_detail} if ev.behaviour_detail else {}),
|
|
1107
1487
|
**({"judge_error": ev.judge_error} if ev.judge_error else {}),
|