gooddata-eval 1.81.1.dev4__tar.gz → 1.81.1.dev5__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.dev4/README.md → gooddata_eval-1.81.1.dev5/PKG-INFO +72 -0
- gooddata_eval-1.81.1.dev4/PKG-INFO → gooddata_eval-1.81.1.dev5/README.md +42 -30
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/pyproject.toml +2 -2
- gooddata_eval-1.81.1.dev5/src/gooddata_eval/core/agentic/_kda_answer.py +155 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_kda_expectation.py +136 -15
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/document_skill.py +21 -6
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/kda_skill.py +241 -23
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_document_skill.py +37 -0
- gooddata_eval-1.81.1.dev5/tests/test_agentic_kda_skill_behaviour.py +782 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_kda_skill_fields.py +2 -2
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/.gitignore +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/AGENTS.md +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/CLAUDE.md +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/LICENSE.txt +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/Makefile +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/scripts/calibrate_catalog_metadata_judge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/scripts/calibrate_knowledge_judge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/scripts/calibrate_takeaway_judge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/scripts/verify_guardrail_refusal_criteria.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/_version.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/cli/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/cli/agentic_runner.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/cli/main.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/_output.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/_retry.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_alert_update.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_failure_message.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_filters.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_gate.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_metric_expectation.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_metric_workspace.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_search_expectation.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/agent_switcher.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/conversation.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/dashboard_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/forecasting.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/general_question.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/knowledge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/memory.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/visualization.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/agentic/what_if.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/catalog/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/catalog/evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/catalog/http_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/chat/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/chat/render.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/chat/sse_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/config.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/connection.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/dataset/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/dataset/local.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/base.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/catalog_metadata.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/knowledge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/summary.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/granularity.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/interaction.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/_env.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/observations.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/langfuse/sink.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/models.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/number_format.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/outcome.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/reporting/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/reporting/console.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/reporting/html_report.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/reporting/json_report.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/reporting/report_template.html +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/runner.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/scoring.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/summary/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/summary/http_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/timing.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/src/gooddata_eval/core/workspace.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/__init__.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/_fake_langfuse.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/conftest.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/fixtures/catalog_metadata_calibration.json +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/fixtures/knowledge_calibration.json +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/fixtures/sse_visualization_stream.txt +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/fixtures/takeaway_calibration.json +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_agent_switcher.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_alert_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_alert_skill_checks.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_alert_update.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_anomaly_detection.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_conversation.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_dashboard_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_dashboard_summary.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_document_editor_takeaways.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_failure_message.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_forecasting.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_gate.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_general_question.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_guardrail.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_join_trace.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_kda_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_knowledge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_langfuse_trace.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_memory.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_metric_skill.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_metric_skill_options.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_observe_experiment.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_run_context.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_runner.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_search_tool.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_search_tool_checks.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_visualization.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_agentic_what_if.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_alert_skill_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_catalog_metadata_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_catalog_metadata_evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_catalog_metadata_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_chat_render.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_cli.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_connection.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_context_date_filter.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_deep_subset.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_eval_error_scores.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_fake_langfuse.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_from_insights.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_guardrail_criteria.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_html_report.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_interaction.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_knowledge_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_e2e_fake_server.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_env.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_experiment.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_item_scope.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_observations.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_otlp.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_sink.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_langfuse_source.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_llm_judge.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_local_loader.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_maql_normalize.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_metric_skill_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_models.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_number_format.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_outcome.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_reporting.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_runner.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_scoring.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_search_tool_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_sse_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_summary_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_summary_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_takeaway_client.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_takeaway_evaluate.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_takeaway_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_text_evaluators.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_timing.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_trace_linker.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_visualization_evaluator.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tests/test_workspace.py +0 -0
- {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev5}/tox.ini +0 -0
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: gooddata-eval
|
|
3
|
+
Version: 1.81.1.dev5
|
|
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.81.1.dev5
|
|
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
|
|
@@ -1192,6 +1222,48 @@ fail `kda_filters_correct`; omitted ones are no filters. The six names are `KDA_
|
|
|
1192
1222
|
create publishes none of them. A failing run reports the expected and the actual value of each
|
|
1193
1223
|
field it failed.
|
|
1194
1224
|
|
|
1225
|
+
A `ranking_filter` in `Filters` is compared on `using`, `attribute` (`label/` and `attribute/` are the
|
|
1226
|
+
same), `top` or `bottom`, and `strict_limit_of_rows` (unset reads as false). It needs `using`, `attribute`
|
|
1227
|
+
and one of `top`, `bottom` as a positive integer, as the execute tool does, and any other key is rejected.
|
|
1228
|
+
|
|
1229
|
+
### `agentic_kda_skill` behaviour checks
|
|
1230
|
+
|
|
1231
|
+
Each key below is opt-in and adds one score, which gates `strict_pass` like the others:
|
|
1232
|
+
|
|
1233
|
+
| Key | Score | Passes when |
|
|
1234
|
+
|---|---|---|
|
|
1235
|
+
| `"expect_no_create": true` | `kda_not_created` | the agent answered and no create or execute call succeeded (a create the tool rejected is allowed). The item is then not scored on `kda_triggered`, `kda_executed` or `kda_success`, and gets no simulated reply. It cannot be combined with `check_fields`, `check_answer`, `check_suggestions` or `expect_clarification` |
|
|
1236
|
+
| `"expect_clarification": false` | `kda_first_turn` | the turn that asked for the analysis (the last scripted one) created it |
|
|
1237
|
+
| `"expect_clarification": true` | `kda_clarified` | the first turn asks a question and creates no analysis |
|
|
1238
|
+
| `"rubric": "<criteria>"` | `kda_rubric` | an LLM judge reads the whole conversation and finds every criterion met |
|
|
1239
|
+
| `"check_answer": true` | `kda_answer_grounded` | an analysis ran, and the answer of the turn that ran it names one of its `significant_drivers` |
|
|
1240
|
+
| `"check_suggestions": true` | `kda_suggestions` | an analysis ran, and when its answer names a driver, the first suggested action of that turn names one of those drivers |
|
|
1241
|
+
|
|
1242
|
+
`"user_replies": ["...", ...]` sends scripted messages after the question, one per turn, in the
|
|
1243
|
+
same conversation, whatever the agent did. The analysis is scored from the last scripted turn on;
|
|
1244
|
+
the simulated user takes over after it. `max_iterations` counts from the last scripted turn, as it counts
|
|
1245
|
+
from the question of an item without replies: with the default 4, three simulated replies can follow.
|
|
1246
|
+
With `"expect_clarification": true`, the first turn is the one that must ask, and the replies answer
|
|
1247
|
+
that question. A clarification asked on a later turn cannot be expressed.
|
|
1248
|
+
|
|
1249
|
+
A driver counts as named when its value appears as a whole word, plural allowed. Date values and
|
|
1250
|
+
values shorter than three characters are skipped, and `10,769` matches `10769`.
|
|
1251
|
+
|
|
1252
|
+
A judge that gives no verdict, or a conversation whose suggestions cannot be read, leaves that check
|
|
1253
|
+
unscored: it reads False, is not listed as failed and is not published as a score. The run is labelled ERROR when every other check
|
|
1254
|
+
passed and the chat did not fail; otherwise it is a FAIL on the checks that were graded. The six
|
|
1255
|
+
names are `KDA_BEHAVIOUR_SCORES`; an item publishes only those of the keys it sets.
|
|
1256
|
+
|
|
1257
|
+
```json
|
|
1258
|
+
{
|
|
1259
|
+
"question": "Why is it so high?",
|
|
1260
|
+
"expected_output": {
|
|
1261
|
+
"expect_no_create": true,
|
|
1262
|
+
"rubric": "Describes the step-up the chart shows and proposes breakdowns that exist in the workspace. Runs no key driver analysis."
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1195
1267
|
### Items asked in a dashboard context (`user_context`)
|
|
1196
1268
|
|
|
1197
1269
|
An item can be asked the way a user asks from an open dashboard or an attached widget.
|
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: gooddata-eval
|
|
3
|
-
Version: 1.81.1.dev4
|
|
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.81.1.dev4
|
|
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
|
-
|
|
31
1
|
# gooddata-eval
|
|
32
2
|
|
|
33
3
|
CLI to evaluate the GoodData AI agent against a dataset of natural-language
|
|
@@ -1222,6 +1192,48 @@ fail `kda_filters_correct`; omitted ones are no filters. The six names are `KDA_
|
|
|
1222
1192
|
create publishes none of them. A failing run reports the expected and the actual value of each
|
|
1223
1193
|
field it failed.
|
|
1224
1194
|
|
|
1195
|
+
A `ranking_filter` in `Filters` is compared on `using`, `attribute` (`label/` and `attribute/` are the
|
|
1196
|
+
same), `top` or `bottom`, and `strict_limit_of_rows` (unset reads as false). It needs `using`, `attribute`
|
|
1197
|
+
and one of `top`, `bottom` as a positive integer, as the execute tool does, and any other key is rejected.
|
|
1198
|
+
|
|
1199
|
+
### `agentic_kda_skill` behaviour checks
|
|
1200
|
+
|
|
1201
|
+
Each key below is opt-in and adds one score, which gates `strict_pass` like the others:
|
|
1202
|
+
|
|
1203
|
+
| Key | Score | Passes when |
|
|
1204
|
+
|---|---|---|
|
|
1205
|
+
| `"expect_no_create": true` | `kda_not_created` | the agent answered and no create or execute call succeeded (a create the tool rejected is allowed). The item is then not scored on `kda_triggered`, `kda_executed` or `kda_success`, and gets no simulated reply. It cannot be combined with `check_fields`, `check_answer`, `check_suggestions` or `expect_clarification` |
|
|
1206
|
+
| `"expect_clarification": false` | `kda_first_turn` | the turn that asked for the analysis (the last scripted one) created it |
|
|
1207
|
+
| `"expect_clarification": true` | `kda_clarified` | the first turn asks a question and creates no analysis |
|
|
1208
|
+
| `"rubric": "<criteria>"` | `kda_rubric` | an LLM judge reads the whole conversation and finds every criterion met |
|
|
1209
|
+
| `"check_answer": true` | `kda_answer_grounded` | an analysis ran, and the answer of the turn that ran it names one of its `significant_drivers` |
|
|
1210
|
+
| `"check_suggestions": true` | `kda_suggestions` | an analysis ran, and when its answer names a driver, the first suggested action of that turn names one of those drivers |
|
|
1211
|
+
|
|
1212
|
+
`"user_replies": ["...", ...]` sends scripted messages after the question, one per turn, in the
|
|
1213
|
+
same conversation, whatever the agent did. The analysis is scored from the last scripted turn on;
|
|
1214
|
+
the simulated user takes over after it. `max_iterations` counts from the last scripted turn, as it counts
|
|
1215
|
+
from the question of an item without replies: with the default 4, three simulated replies can follow.
|
|
1216
|
+
With `"expect_clarification": true`, the first turn is the one that must ask, and the replies answer
|
|
1217
|
+
that question. A clarification asked on a later turn cannot be expressed.
|
|
1218
|
+
|
|
1219
|
+
A driver counts as named when its value appears as a whole word, plural allowed. Date values and
|
|
1220
|
+
values shorter than three characters are skipped, and `10,769` matches `10769`.
|
|
1221
|
+
|
|
1222
|
+
A judge that gives no verdict, or a conversation whose suggestions cannot be read, leaves that check
|
|
1223
|
+
unscored: it reads False, is not listed as failed and is not published as a score. The run is labelled ERROR when every other check
|
|
1224
|
+
passed and the chat did not fail; otherwise it is a FAIL on the checks that were graded. The six
|
|
1225
|
+
names are `KDA_BEHAVIOUR_SCORES`; an item publishes only those of the keys it sets.
|
|
1226
|
+
|
|
1227
|
+
```json
|
|
1228
|
+
{
|
|
1229
|
+
"question": "Why is it so high?",
|
|
1230
|
+
"expected_output": {
|
|
1231
|
+
"expect_no_create": true,
|
|
1232
|
+
"rubric": "Describes the step-up the chart shows and proposes breakdowns that exist in the workspace. Runs no key driver analysis."
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
```
|
|
1236
|
+
|
|
1225
1237
|
### Items asked in a dashboard context (`user_context`)
|
|
1226
1238
|
|
|
1227
1239
|
An item can be asked the way a user asks from an open dashboard or an attached widget.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# (C) 2026 GoodData Corporation
|
|
2
2
|
[project]
|
|
3
3
|
name = "gooddata-eval"
|
|
4
|
-
version = "1.81.1.
|
|
4
|
+
version = "1.81.1.dev5"
|
|
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.81.1.
|
|
14
|
+
"gooddata-sdk~=1.81.1.dev5",
|
|
15
15
|
"httpx>=0.27,<1.0",
|
|
16
16
|
"jsonpatch>=1.33,<2.0",
|
|
17
17
|
"orjson>=3.9.15,<4.0.0",
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# (C) 2026 GoodData Corporation. All rights reserved.
|
|
2
|
+
"""Whether a KDA answer, and the suggestions after it, name the drivers the analysis returned.
|
|
3
|
+
|
|
4
|
+
The execute tool returns ``data.significant_drivers``: one row per attribute value, with its own
|
|
5
|
+
``delta`` between the periods. The answer is read as text, so a driver counts as named when its
|
|
6
|
+
value appears as a whole word, plural allowed. Two kinds of value are skipped: a date, which the
|
|
7
|
+
answer writes as "July 19" where the driver says "2025-07-19", and a value shorter than three
|
|
8
|
+
characters, which matches ordinary words ("A", "No", "1").
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import re
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
# How many of the largest drivers a failed check reports.
|
|
17
|
+
_TOP_DRIVERS = 5
|
|
18
|
+
_MIN_VALUE_CHARS = 3
|
|
19
|
+
_DATE_VALUE = re.compile(
|
|
20
|
+
r"^\d{4}-\d{1,2}(-\d{1,2})?([ T]\d{1,2}(:\d{2}){0,2}(\.\d+)?(Z|[+-]\d{2}(:?\d{2})?)?)?$", re.IGNORECASE
|
|
21
|
+
)
|
|
22
|
+
# "10,769" is the same number as "10769". A plain space is not a separator: "2024 100 stores" is two numbers.
|
|
23
|
+
_THOUSANDS = re.compile(r"(?<=\d)[, ](?=\d{3}(?!\d))")
|
|
24
|
+
_NUMBER = re.compile(r"\d+(\.\d+)?")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _normalized(text: str) -> str:
|
|
28
|
+
return " ".join(_THOUSANDS.sub("", text).casefold().split())
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _value_text(value: Any) -> str | None:
|
|
32
|
+
if isinstance(value, bool) or value is None:
|
|
33
|
+
return None
|
|
34
|
+
if isinstance(value, float) and value.is_integer():
|
|
35
|
+
value = int(value)
|
|
36
|
+
raw = str(value).strip()
|
|
37
|
+
if _DATE_VALUE.match(raw):
|
|
38
|
+
return None
|
|
39
|
+
text = _normalized(raw)
|
|
40
|
+
return text if len(text) >= _MIN_VALUE_CHARS else None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _drivers(execute_result: Any) -> list[dict[str, Any]]:
|
|
44
|
+
data = execute_result.get("data") if isinstance(execute_result, dict) else None
|
|
45
|
+
drivers = data.get("significant_drivers") if isinstance(data, dict) else None
|
|
46
|
+
return [d for d in drivers if isinstance(d, dict)] if isinstance(drivers, list) else []
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _delta(driver: dict[str, Any]) -> float:
|
|
50
|
+
delta = driver.get("delta")
|
|
51
|
+
if isinstance(delta, bool) or not isinstance(delta, int | float):
|
|
52
|
+
return 0.0
|
|
53
|
+
return abs(float(delta))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _ran(execute_result: Any) -> bool:
|
|
57
|
+
return isinstance(execute_result, dict) and execute_result.get("success") is True
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def driver_values(execute_result: Any, limit: int | None = None) -> list[str]:
|
|
61
|
+
"""The driver values an answer can name, largest change first, without repeats."""
|
|
62
|
+
ranked = sorted(_drivers(execute_result), key=_delta, reverse=True)
|
|
63
|
+
values = list(dict.fromkeys(v for v in (_value_text(d.get("value")) for d in ranked) if v))
|
|
64
|
+
return values if limit is None else values[:limit]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _value_pattern(value: str) -> str:
|
|
68
|
+
"""A whole number never matches inside a decimal; a word matches its plural, "y" also as "ies"."""
|
|
69
|
+
if _NUMBER.fullmatch(value):
|
|
70
|
+
return rf"(?<![\w.]){re.escape(value)}(?!\w|[.,]\d)"
|
|
71
|
+
if len(value) > 1 and value.endswith("y") and value[-2] not in "aeiou":
|
|
72
|
+
return rf"(?<!\w){re.escape(value[:-1])}(?:y|ies)(?!\w)"
|
|
73
|
+
return rf"(?<!\w){re.escape(value)}(?:e?s)?(?!\w)"
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def named_values(text: str, values: list[str]) -> list[str]:
|
|
77
|
+
"""The values that appear in ``text`` as whole words, singular or plural."""
|
|
78
|
+
haystack = _normalized(text)
|
|
79
|
+
return [v for v in values if re.search(_value_pattern(v), haystack)]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def check_answer_grounded(execute_result: Any, answer: str) -> tuple[bool, dict[str, Any]]:
|
|
83
|
+
"""Whether the answer names a driver the analysis returned.
|
|
84
|
+
|
|
85
|
+
Any driver counts, not only the largest: a question about regions is answered with the region
|
|
86
|
+
drivers, which need not be the largest ones. An analysis that ran and returned no driver to
|
|
87
|
+
name passes; a run with no analysis does not.
|
|
88
|
+
"""
|
|
89
|
+
if not _ran(execute_result):
|
|
90
|
+
return False, {"reason": "no analysis ran"}
|
|
91
|
+
values = driver_values(execute_result)
|
|
92
|
+
if not values:
|
|
93
|
+
return True, {"top_drivers": []}
|
|
94
|
+
named = named_values(answer, values)
|
|
95
|
+
return bool(named), {"top_drivers": values[:_TOP_DRIVERS], "named": named}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def suggested_actions(suggestions: Any) -> list[dict[str, Any]]:
|
|
99
|
+
"""The suggested actions, [] when there are none.
|
|
100
|
+
|
|
101
|
+
Raises:
|
|
102
|
+
ValueError: The suggestions have a shape this check cannot read.
|
|
103
|
+
"""
|
|
104
|
+
if suggestions is None:
|
|
105
|
+
return []
|
|
106
|
+
actions = suggestions.get("actions") if isinstance(suggestions, dict) else suggestions
|
|
107
|
+
if actions is None:
|
|
108
|
+
return []
|
|
109
|
+
if not isinstance(actions, list) or not all(isinstance(a, dict) for a in actions):
|
|
110
|
+
raise ValueError(f"unreadable suggestion actions {actions!r}")
|
|
111
|
+
return actions
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def check_suggestions_name_driver(execute_result: Any, answer: str, suggestions: Any) -> tuple[bool, dict[str, Any]]:
|
|
115
|
+
"""Whether the first suggested action names a driver the answer named.
|
|
116
|
+
|
|
117
|
+
True when there are no actions, or the answer names no driver: the rule binds only an answer
|
|
118
|
+
that highlights drivers by name. False when no analysis ran.
|
|
119
|
+
|
|
120
|
+
Raises:
|
|
121
|
+
ValueError: The suggestions have a shape this check cannot read.
|
|
122
|
+
"""
|
|
123
|
+
actions = suggested_actions(suggestions)
|
|
124
|
+
if not _ran(execute_result):
|
|
125
|
+
return False, {"reason": "no analysis ran"}
|
|
126
|
+
if not actions:
|
|
127
|
+
return True, {"first_action": None}
|
|
128
|
+
first = actions[0]
|
|
129
|
+
in_answer = named_values(answer, driver_values(execute_result))
|
|
130
|
+
if not in_answer:
|
|
131
|
+
return True, {"first_action": first, "drivers_in_answer": []}
|
|
132
|
+
action_text = f"{first.get('query') or ''} {first.get('label') or ''}"
|
|
133
|
+
named = named_values(action_text, in_answer)
|
|
134
|
+
return bool(named), {"first_action": first, "drivers_in_answer": in_answer, "named": named}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def suggestions_from_turn(items: list[dict[str, Any]], turn: int) -> Any:
|
|
138
|
+
"""The suggestions of the last turn from user turn ``turn`` (0-based) on, None when that turn has none.
|
|
139
|
+
|
|
140
|
+
A later user message starts a new turn: the suggestions of an earlier turn are not the last turn's.
|
|
141
|
+
"""
|
|
142
|
+
users = 0
|
|
143
|
+
latest: Any = None
|
|
144
|
+
for item in items:
|
|
145
|
+
role = item.get("role") if isinstance(item, dict) else None
|
|
146
|
+
if role == "user":
|
|
147
|
+
users += 1
|
|
148
|
+
latest = None
|
|
149
|
+
continue
|
|
150
|
+
if role != "assistant" or users <= turn:
|
|
151
|
+
continue
|
|
152
|
+
content = item.get("content")
|
|
153
|
+
if isinstance(content, dict) and content.get("suggestions") is not None:
|
|
154
|
+
latest = content["suggestions"]
|
|
155
|
+
return latest
|
|
@@ -8,6 +8,18 @@ the key, nothing here runs and the item is scored on completion only.
|
|
|
8
8
|
``any_of`` lists complete alternatives. Each option replaces some fields of the item, and a run
|
|
9
9
|
passes when one option matches every field. The summary goes with the date attribute, so an
|
|
10
10
|
option that changes one usually states both.
|
|
11
|
+
|
|
12
|
+
The behaviour keys are opt-in as well, and each adds one score:
|
|
13
|
+
|
|
14
|
+
- ``expect_no_create: true``: no analysis may be created or run (``kda_not_created``).
|
|
15
|
+
- ``expect_clarification: false``: the turn that asks for the analysis runs it (``kda_first_turn``).
|
|
16
|
+
``true``: the first turn asks a question and runs nothing (``kda_clarified``).
|
|
17
|
+
- ``user_replies``: scripted messages sent after the question, in the same conversation. The
|
|
18
|
+
analysis of the last scripted turn, or of a later one, is the one scored.
|
|
19
|
+
- ``rubric``: an LLM judge grades the conversation against it (``kda_rubric``).
|
|
20
|
+
- ``check_answer: true``: the answer names a driver the analysis returned (``kda_answer_grounded``).
|
|
21
|
+
- ``check_suggestions: true``: when the answer names a driver, the first suggested action names one
|
|
22
|
+
too (``kda_suggestions``).
|
|
11
23
|
"""
|
|
12
24
|
|
|
13
25
|
from __future__ import annotations
|
|
@@ -33,7 +45,19 @@ _FIELD_KEYS = {
|
|
|
33
45
|
"summary": "Summary",
|
|
34
46
|
}
|
|
35
47
|
_OPTION_KEYS = frozenset(_FIELD_KEYS.values())
|
|
36
|
-
|
|
48
|
+
_BEHAVIOUR_KEYS = frozenset(
|
|
49
|
+
{"expect_no_create", "expect_clarification", "user_replies", "rubric", "check_answer", "check_suggestions"}
|
|
50
|
+
)
|
|
51
|
+
_ITEM_KEYS = _OPTION_KEYS | {"check_fields", "any_of"} | _BEHAVIOUR_KEYS
|
|
52
|
+
# The scores the behaviour keys add, each published only by an item that sets its key.
|
|
53
|
+
KDA_BEHAVIOUR_SCORES = (
|
|
54
|
+
"kda_not_created",
|
|
55
|
+
"kda_first_turn",
|
|
56
|
+
"kda_clarified",
|
|
57
|
+
"kda_rubric",
|
|
58
|
+
"kda_answer_grounded",
|
|
59
|
+
"kda_suggestions",
|
|
60
|
+
)
|
|
37
61
|
_SUMMARY_VALUES = ("analyzed_value", "reference_value", "change")
|
|
38
62
|
_SUMMARY_KEYS = frozenset({*_SUMMARY_VALUES, "absolute_tolerance"})
|
|
39
63
|
_DEFAULT_TOLERANCE = 0.01
|
|
@@ -43,8 +67,12 @@ _MEASURE_TYPES = ("metric", "fact", "attribute")
|
|
|
43
67
|
_AGGREGATIONS = ("SUM", "AVG", "MIN", "MAX", "MEDIAN", "COUNT")
|
|
44
68
|
_FILTER_STATES = ("include", "exclude")
|
|
45
69
|
# Spelled like the item's other keys, these would leave the checks off without a word.
|
|
46
|
-
_OPT_IN_KEYS = ("check_fields", "any_of")
|
|
70
|
+
_OPT_IN_KEYS = ("check_fields", "any_of", *sorted(_BEHAVIOUR_KEYS))
|
|
47
71
|
_DATE_FILTER = "date_filter"
|
|
72
|
+
_RANKING_FILTER = "ranking_filter"
|
|
73
|
+
_RANKING_SIDES = ("top", "bottom")
|
|
74
|
+
# The keys of the tool's ranking filter. The tool echoes the optional ones as null.
|
|
75
|
+
_RANKING_KEYS = frozenset({"type", "using", "attribute", *_RANKING_SIDES, "strict_limit_of_rows"})
|
|
48
76
|
# The agent's tools take an attribute by its label or its attribute id. Both ids are equal in the
|
|
49
77
|
# eval workspaces, so a filter is matched on the id alone.
|
|
50
78
|
_TYPE_PREFIXES = ("label/", "attribute/")
|
|
@@ -66,9 +94,18 @@ class KdaFieldOption:
|
|
|
66
94
|
|
|
67
95
|
@dataclass(frozen=True)
|
|
68
96
|
class KdaExpectation:
|
|
69
|
-
"""The item's
|
|
97
|
+
"""The item's checks. ``options`` is empty when the item does not opt into the field checks.
|
|
98
|
+
|
|
99
|
+
``expect_clarification`` is None when the item does not set it.
|
|
100
|
+
"""
|
|
70
101
|
|
|
71
102
|
options: tuple[KdaFieldOption, ...] = ()
|
|
103
|
+
expect_no_create: bool = False
|
|
104
|
+
expect_clarification: bool | None = None
|
|
105
|
+
user_replies: tuple[str, ...] = ()
|
|
106
|
+
rubric: str | None = None
|
|
107
|
+
check_answer: bool = False
|
|
108
|
+
check_suggestions: bool = False
|
|
72
109
|
|
|
73
110
|
@property
|
|
74
111
|
def check_fields(self) -> bool:
|
|
@@ -141,6 +178,25 @@ def _check_attribute_filter(entry: dict[str, Any]) -> None:
|
|
|
141
178
|
raise ValueError(f"attribute_filter {next(iter(state))} must be a non-empty list of strings, got {entry!r}")
|
|
142
179
|
|
|
143
180
|
|
|
181
|
+
def _check_ranking_filter(entry: dict[str, Any]) -> None:
|
|
182
|
+
if unknown := set(entry) - _RANKING_KEYS:
|
|
183
|
+
raise ValueError(f"ranking_filter has unknown keys {sorted(unknown)}, got {entry!r}")
|
|
184
|
+
using, attribute = entry.get("using"), entry.get("attribute")
|
|
185
|
+
if not isinstance(using, str) or not using.strip():
|
|
186
|
+
raise ValueError(f"ranking_filter needs a non-empty using, got {entry!r}")
|
|
187
|
+
if not isinstance(attribute, str) or not attribute.strip():
|
|
188
|
+
raise ValueError(f"ranking_filter needs a non-empty attribute, got {entry!r}")
|
|
189
|
+
counts = [entry.get(side) for side in _RANKING_SIDES if entry.get(side) is not None]
|
|
190
|
+
if len(counts) != 1 or not _is_count(counts[0]):
|
|
191
|
+
raise ValueError(f"ranking_filter needs exactly one of top, bottom as a positive integer, got {entry!r}")
|
|
192
|
+
if not isinstance(entry.get("strict_limit_of_rows"), bool | None):
|
|
193
|
+
raise ValueError(f"ranking_filter strict_limit_of_rows must be true, false or null, got {entry!r}")
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def _is_count(value: Any) -> bool:
|
|
197
|
+
return isinstance(value, int) and not isinstance(value, bool) and value > 0
|
|
198
|
+
|
|
199
|
+
|
|
144
200
|
def _filters(value: Any) -> tuple[Any, ...]:
|
|
145
201
|
if not isinstance(value, list):
|
|
146
202
|
raise ValueError(f"Filters must be a list, [] for none, got {value!r}")
|
|
@@ -151,6 +207,8 @@ def _filters(value: Any) -> tuple[Any, ...]:
|
|
|
151
207
|
raise ValueError("Filters must not hold a date_filter: date filters are not checked, the periods are")
|
|
152
208
|
if entry.get("type") == "attribute_filter":
|
|
153
209
|
_check_attribute_filter(entry)
|
|
210
|
+
if entry.get("type") == _RANKING_FILTER:
|
|
211
|
+
_check_ranking_filter(entry)
|
|
154
212
|
return tuple(_filter_key(entry) for entry in value)
|
|
155
213
|
|
|
156
214
|
|
|
@@ -197,26 +255,22 @@ def _reject_respelt_keys(expected: dict[str, Any]) -> None:
|
|
|
197
255
|
raise ValueError(f"write {canonical!r}, not {key!r}")
|
|
198
256
|
|
|
199
257
|
|
|
200
|
-
def
|
|
201
|
-
"""
|
|
202
|
-
if
|
|
203
|
-
|
|
204
|
-
if not isinstance(expected, dict) or "check_fields" not in expected:
|
|
205
|
-
if isinstance(expected, dict) and "any_of" in expected:
|
|
258
|
+
def _field_options(expected: dict[str, Any]) -> tuple[KdaFieldOption, ...]:
|
|
259
|
+
"""The field checks of an item, empty when it does not set ``check_fields: true``."""
|
|
260
|
+
if "check_fields" not in expected:
|
|
261
|
+
if "any_of" in expected:
|
|
206
262
|
raise ValueError("any_of is read only with check_fields: true")
|
|
207
|
-
return
|
|
263
|
+
return ()
|
|
208
264
|
flag = expected["check_fields"]
|
|
209
265
|
if not isinstance(flag, bool):
|
|
210
266
|
raise ValueError(f"check_fields must be true or false, got {flag!r}")
|
|
211
267
|
if not flag:
|
|
212
268
|
if "any_of" in expected:
|
|
213
269
|
raise ValueError("any_of is read only with check_fields: true")
|
|
214
|
-
return
|
|
215
|
-
if unknown := set(expected) - _ITEM_KEYS:
|
|
216
|
-
raise ValueError(f"expected_output has unknown keys {sorted(unknown)}")
|
|
270
|
+
return ()
|
|
217
271
|
base = {key: value for key, value in expected.items() if key in _OPTION_KEYS}
|
|
218
272
|
if "any_of" not in expected:
|
|
219
|
-
return
|
|
273
|
+
return (_option(base, "expected_output"),)
|
|
220
274
|
options = expected["any_of"]
|
|
221
275
|
if not isinstance(options, list) or len(options) < 2 or not all(isinstance(o, dict) and o for o in options):
|
|
222
276
|
raise ValueError(f"any_of must list at least two non-empty objects, got {options!r}")
|
|
@@ -227,7 +281,64 @@ def parse_kda_expectation(expected: Any) -> KdaExpectation:
|
|
|
227
281
|
f"any_of[{index}] has keys {sorted(unknown)}; an option may state only {sorted(_OPTION_KEYS)}"
|
|
228
282
|
)
|
|
229
283
|
parsed.append(_option({**base, **option}, f"any_of[{index}]"))
|
|
230
|
-
return
|
|
284
|
+
return tuple(parsed)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def _flag(expected: dict[str, Any], key: str) -> bool | None:
|
|
288
|
+
if key not in expected:
|
|
289
|
+
return None
|
|
290
|
+
value = expected[key]
|
|
291
|
+
if not isinstance(value, bool):
|
|
292
|
+
raise ValueError(f"{key} must be true or false, got {value!r}")
|
|
293
|
+
return value
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
def _user_replies(value: Any) -> tuple[str, ...]:
|
|
297
|
+
if not isinstance(value, list) or not value or not all(isinstance(v, str) and v.strip() for v in value):
|
|
298
|
+
raise ValueError(f"user_replies must be a non-empty list of non-empty strings, got {value!r}")
|
|
299
|
+
return tuple(v.strip() for v in value)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def parse_kda_expectation(expected: Any) -> KdaExpectation:
|
|
303
|
+
"""Read the item's checks, raising ValueError on a malformed one before any request is sent."""
|
|
304
|
+
if not isinstance(expected, dict):
|
|
305
|
+
return KdaExpectation()
|
|
306
|
+
_reject_respelt_keys(expected)
|
|
307
|
+
options = _field_options(expected)
|
|
308
|
+
# An item that opts into no check may carry other keys; one that opts in is read whole.
|
|
309
|
+
if (options or _BEHAVIOUR_KEYS & set(expected)) and (unknown := set(expected) - _ITEM_KEYS):
|
|
310
|
+
raise ValueError(f"expected_output has unknown keys {sorted(unknown)}")
|
|
311
|
+
no_create = _flag(expected, "expect_no_create") or False
|
|
312
|
+
clarification = _flag(expected, "expect_clarification")
|
|
313
|
+
check_answer = _flag(expected, "check_answer") or False
|
|
314
|
+
check_suggestions = _flag(expected, "check_suggestions") or False
|
|
315
|
+
rubric = expected.get("rubric")
|
|
316
|
+
if "rubric" in expected and (not isinstance(rubric, str) or not rubric.strip()):
|
|
317
|
+
raise ValueError(f"rubric must be a non-empty string, got {rubric!r}")
|
|
318
|
+
replies = _user_replies(expected["user_replies"]) if "user_replies" in expected else ()
|
|
319
|
+
if no_create:
|
|
320
|
+
# Each of these needs an analysis that ran, which the item says must not happen.
|
|
321
|
+
clashes = [
|
|
322
|
+
key
|
|
323
|
+
for key, on in (
|
|
324
|
+
("check_fields", bool(options)),
|
|
325
|
+
("check_answer", check_answer),
|
|
326
|
+
("check_suggestions", check_suggestions),
|
|
327
|
+
("expect_clarification", clarification is not None),
|
|
328
|
+
)
|
|
329
|
+
if on
|
|
330
|
+
]
|
|
331
|
+
if clashes:
|
|
332
|
+
raise ValueError(f"expect_no_create cannot be combined with {', '.join(clashes)}")
|
|
333
|
+
return KdaExpectation(
|
|
334
|
+
options=options,
|
|
335
|
+
expect_no_create=no_create,
|
|
336
|
+
expect_clarification=clarification,
|
|
337
|
+
user_replies=replies,
|
|
338
|
+
rubric=rubric.strip() if isinstance(rubric, str) else None,
|
|
339
|
+
check_answer=check_answer,
|
|
340
|
+
check_suggestions=check_suggestions,
|
|
341
|
+
)
|
|
231
342
|
|
|
232
343
|
|
|
233
344
|
def _bare_id(using: Any) -> Any:
|
|
@@ -253,6 +364,16 @@ def _filter_key(entry: dict[str, Any]) -> Any:
|
|
|
253
364
|
tuple(sorted(state.get("include") or [])),
|
|
254
365
|
tuple(sorted(state.get("exclude") or [])),
|
|
255
366
|
)
|
|
367
|
+
if entry.get("type") == _RANKING_FILTER and isinstance(entry.get("using"), str):
|
|
368
|
+
# The tool echoes optional keys as null (strict_limit_of_rows), and names the attribute either way.
|
|
369
|
+
return (
|
|
370
|
+
_RANKING_FILTER,
|
|
371
|
+
entry["using"].strip(),
|
|
372
|
+
_bare_id(entry.get("attribute")),
|
|
373
|
+
*(json.dumps(entry.get(side), default=str) for side in _RANKING_SIDES),
|
|
374
|
+
# Unset reads as false: the tool echoes null when the agent did not ask for a strict limit.
|
|
375
|
+
bool(entry.get("strict_limit_of_rows")),
|
|
376
|
+
)
|
|
256
377
|
return json.dumps(entry, sort_keys=True, default=str)
|
|
257
378
|
|
|
258
379
|
|
|
@@ -60,6 +60,7 @@ _DEFAULT_MAX_ITERATIONS = 4
|
|
|
60
60
|
|
|
61
61
|
_DRAFT_TOOL = "draft_document"
|
|
62
62
|
_BUILDER_SKILL = "document_builder"
|
|
63
|
+
_EDITOR_SKILL = "document_editor"
|
|
63
64
|
_PART_TYPE = "document"
|
|
64
65
|
_SET_SKILLS_TOOL = "set_skills"
|
|
65
66
|
# The Report names gen-ai sent before Publisher's Document names. Any of them on the wire means
|
|
@@ -389,6 +390,11 @@ def _rework(expected_output: dict) -> dict | None:
|
|
|
389
390
|
return rework if isinstance(rework, dict) else None
|
|
390
391
|
|
|
391
392
|
|
|
393
|
+
def _required_skill(expected_output: dict) -> str:
|
|
394
|
+
"""The skill the run must have activated: the editor edits the open document, the builder drafts a new one."""
|
|
395
|
+
return _EDITOR_SKILL if _rework(expected_output) is not None else _BUILDER_SKILL
|
|
396
|
+
|
|
397
|
+
|
|
392
398
|
def _validate_rework(rework: Any) -> None:
|
|
393
399
|
"""Reject a ``rework`` expectation the run could not score meaningfully.
|
|
394
400
|
|
|
@@ -1567,7 +1573,7 @@ def _execute_single_document_run(
|
|
|
1567
1573
|
tool_result,
|
|
1568
1574
|
graded_part,
|
|
1569
1575
|
expected_output,
|
|
1570
|
-
skill_activated=_skill_activated(all_tool_call_events,
|
|
1576
|
+
skill_activated=_skill_activated(all_tool_call_events, _required_skill(expected_output)),
|
|
1571
1577
|
legacy_names=legacy_wire_names(all_parts, all_tool_call_events),
|
|
1572
1578
|
exempt_takeaways=exempt,
|
|
1573
1579
|
)
|
|
@@ -1922,11 +1928,20 @@ def evaluate_agentic_document_skill(
|
|
|
1922
1928
|
if not best.evaluation.wire_names_current:
|
|
1923
1929
|
skill_note = " gen-ai still sends the Report names, so it predates the Document rename."
|
|
1924
1930
|
elif not best.evaluation.skill_activated:
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
)
|
|
1931
|
+
# Both document skills register under the same flags, so the other one being active
|
|
1932
|
+
# rules the flags out and leaves a routing failure.
|
|
1933
|
+
required_skill = _required_skill(expected_output)
|
|
1934
|
+
other_skill = _BUILDER_SKILL if required_skill == _EDITOR_SKILL else _EDITOR_SKILL
|
|
1935
|
+
if _skill_activated(best.tool_call_events, other_skill):
|
|
1936
|
+
skill_note = (
|
|
1937
|
+
f" It activated {other_skill} instead of {required_skill}: a routing failure, not the flags."
|
|
1938
|
+
)
|
|
1939
|
+
else:
|
|
1940
|
+
skill_note = (
|
|
1941
|
+
f" set_skills never activated {required_skill}: either the copilot routed elsewhere, or the"
|
|
1942
|
+
" skill is not registered. It registers only with enableGenAiReportBuilderSkill and the"
|
|
1943
|
+
" org's enableBusinessBriefingReportsApp both on."
|
|
1944
|
+
)
|
|
1930
1945
|
exc = DocumentSkillAssertionError(
|
|
1931
1946
|
f"Document skill assertion failed. {gate_note}{skill_note} "
|
|
1932
1947
|
f"Checks: {best.evaluation.strict_checks}. "
|