gooddata-eval 1.81.1.dev4__tar.gz → 1.81.1.dev6__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.
Files changed (201) hide show
  1. gooddata_eval-1.81.1.dev4/README.md → gooddata_eval-1.81.1.dev6/PKG-INFO +72 -0
  2. gooddata_eval-1.81.1.dev4/PKG-INFO → gooddata_eval-1.81.1.dev6/README.md +42 -30
  3. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/pyproject.toml +2 -2
  4. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/cli/agentic_runner.py +3 -1
  5. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_conversation_context.py +226 -0
  6. gooddata_eval-1.81.1.dev6/src/gooddata_eval/core/agentic/_kda_answer.py +155 -0
  7. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_kda_expectation.py +136 -15
  8. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/dashboard_skill.py +96 -6
  9. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/document_skill.py +21 -6
  10. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/forecasting.py +158 -7
  11. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/kda_skill.py +241 -23
  12. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_dashboard_skill.py +719 -2
  13. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_document_skill.py +37 -0
  14. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_forecasting.py +341 -0
  15. gooddata_eval-1.81.1.dev6/tests/test_agentic_kda_skill_behaviour.py +782 -0
  16. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_kda_skill_fields.py +2 -2
  17. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_runner.py +24 -0
  18. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/.gitignore +0 -0
  19. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/AGENTS.md +0 -0
  20. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/CLAUDE.md +0 -0
  21. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/LICENSE.txt +0 -0
  22. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/Makefile +0 -0
  23. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/scripts/calibrate_catalog_metadata_judge.py +0 -0
  24. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/scripts/calibrate_knowledge_judge.py +0 -0
  25. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/scripts/calibrate_takeaway_judge.py +0 -0
  26. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/scripts/verify_guardrail_refusal_criteria.py +0 -0
  27. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/__init__.py +0 -0
  28. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/_version.py +0 -0
  29. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/cli/__init__.py +0 -0
  30. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/cli/main.py +0 -0
  31. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/__init__.py +0 -0
  32. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/_output.py +0 -0
  33. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/_retry.py +0 -0
  34. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/__init__.py +0 -0
  35. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_alert_update.py +0 -0
  36. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
  37. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
  38. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
  39. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
  40. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_failure_message.py +0 -0
  41. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_filters.py +0 -0
  42. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_gate.py +0 -0
  43. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
  44. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_metric_expectation.py +0 -0
  45. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_metric_workspace.py +0 -0
  46. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
  47. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_search_expectation.py +0 -0
  48. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
  49. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/agent_switcher.py +0 -0
  50. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
  51. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
  52. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/conversation.py +0 -0
  53. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
  54. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/general_question.py +0 -0
  55. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
  56. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/knowledge.py +0 -0
  57. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/memory.py +0 -0
  58. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
  59. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
  60. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
  61. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/visualization.py +0 -0
  62. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/what_if.py +0 -0
  63. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/catalog/__init__.py +0 -0
  64. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/catalog/evaluate.py +0 -0
  65. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/catalog/http_client.py +0 -0
  66. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/chat/__init__.py +0 -0
  67. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/chat/render.py +0 -0
  68. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/chat/sse_client.py +0 -0
  69. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/config.py +0 -0
  70. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/connection.py +0 -0
  71. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/__init__.py +0 -0
  72. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
  73. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
  74. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/local.py +0 -0
  75. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
  76. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
  77. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
  78. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
  79. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
  80. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
  81. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
  82. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
  83. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/base.py +0 -0
  84. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/catalog_metadata.py +0 -0
  85. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
  86. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
  87. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/knowledge.py +0 -0
  88. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
  89. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
  90. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/summary.py +0 -0
  91. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
  92. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
  93. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/granularity.py +0 -0
  94. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/interaction.py +0 -0
  95. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
  96. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/_env.py +0 -0
  97. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/client.py +0 -0
  98. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
  99. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
  100. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/observations.py +0 -0
  101. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
  102. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/sink.py +0 -0
  103. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/models.py +0 -0
  104. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/number_format.py +0 -0
  105. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/outcome.py +0 -0
  106. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/__init__.py +0 -0
  107. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/console.py +0 -0
  108. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/html_report.py +0 -0
  109. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/json_report.py +0 -0
  110. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/report_template.html +0 -0
  111. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/runner.py +0 -0
  112. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/scoring.py +0 -0
  113. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/summary/__init__.py +0 -0
  114. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/summary/http_client.py +0 -0
  115. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
  116. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
  117. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
  118. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/timing.py +0 -0
  119. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/workspace.py +0 -0
  120. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/__init__.py +0 -0
  121. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/_fake_langfuse.py +0 -0
  122. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/conftest.py +0 -0
  123. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/fixtures/catalog_metadata_calibration.json +0 -0
  124. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/fixtures/knowledge_calibration.json +0 -0
  125. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
  126. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
  127. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/fixtures/sse_visualization_stream.txt +0 -0
  128. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/fixtures/takeaway_calibration.json +0 -0
  129. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_agent_switcher.py +0 -0
  130. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_alert_skill.py +0 -0
  131. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_alert_skill_checks.py +0 -0
  132. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_alert_update.py +0 -0
  133. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_anomaly_detection.py +0 -0
  134. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_conversation.py +0 -0
  135. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_dashboard_summary.py +0 -0
  136. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_document_editor_takeaways.py +0 -0
  137. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_failure_message.py +0 -0
  138. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_gate.py +0 -0
  139. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_general_question.py +0 -0
  140. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_guardrail.py +0 -0
  141. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_join_trace.py +0 -0
  142. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_kda_skill.py +0 -0
  143. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_knowledge.py +0 -0
  144. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_langfuse_trace.py +0 -0
  145. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_memory.py +0 -0
  146. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_metric_skill.py +0 -0
  147. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_metric_skill_options.py +0 -0
  148. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_observe_experiment.py +0 -0
  149. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_run_context.py +0 -0
  150. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_search_tool.py +0 -0
  151. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_search_tool_checks.py +0 -0
  152. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_visualization.py +0 -0
  153. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_what_if.py +0 -0
  154. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_alert_skill_evaluator.py +0 -0
  155. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_catalog_metadata_client.py +0 -0
  156. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_catalog_metadata_evaluate.py +0 -0
  157. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_catalog_metadata_evaluator.py +0 -0
  158. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_chat_render.py +0 -0
  159. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_cli.py +0 -0
  160. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_connection.py +0 -0
  161. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_context_date_filter.py +0 -0
  162. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_deep_subset.py +0 -0
  163. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_eval_error_scores.py +0 -0
  164. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_fake_langfuse.py +0 -0
  165. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_from_insights.py +0 -0
  166. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_guardrail_criteria.py +0 -0
  167. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_html_report.py +0 -0
  168. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_interaction.py +0 -0
  169. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_knowledge_evaluator.py +0 -0
  170. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_client.py +0 -0
  171. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_e2e_fake_server.py +0 -0
  172. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_env.py +0 -0
  173. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_experiment.py +0 -0
  174. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_item_scope.py +0 -0
  175. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_observations.py +0 -0
  176. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_otlp.py +0 -0
  177. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_sink.py +0 -0
  178. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_source.py +0 -0
  179. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_llm_judge.py +0 -0
  180. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_local_loader.py +0 -0
  181. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_maql_normalize.py +0 -0
  182. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_metric_skill_evaluator.py +0 -0
  183. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_models.py +0 -0
  184. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_number_format.py +0 -0
  185. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_outcome.py +0 -0
  186. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_reporting.py +0 -0
  187. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_runner.py +0 -0
  188. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_scoring.py +0 -0
  189. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_search_tool_evaluator.py +0 -0
  190. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_sse_client.py +0 -0
  191. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_summary_client.py +0 -0
  192. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_summary_evaluator.py +0 -0
  193. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_takeaway_client.py +0 -0
  194. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_takeaway_evaluate.py +0 -0
  195. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_takeaway_evaluator.py +0 -0
  196. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_text_evaluators.py +0 -0
  197. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_timing.py +0 -0
  198. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_trace_linker.py +0 -0
  199. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_visualization_evaluator.py +0 -0
  200. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tests/test_workspace.py +0 -0
  201. {gooddata_eval-1.81.1.dev4 → gooddata_eval-1.81.1.dev6}/tox.ini +0 -0
@@ -1,3 +1,33 @@
1
+ Metadata-Version: 2.5
2
+ Name: gooddata-eval
3
+ Version: 1.81.1.dev6
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.dev6
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.dev4"
4
+ version = "1.81.1.dev6"
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.dev4",
14
+ "gooddata-sdk~=1.81.1.dev6",
15
15
  "httpx>=0.27,<1.0",
16
16
  "jsonpatch>=1.33,<2.0",
17
17
  "orjson>=3.9.15,<4.0.0",
@@ -338,7 +338,9 @@ def _dispatch_agentic(
338
338
  token=token,
339
339
  workspace_id=workspace_id,
340
340
  question=item.question,
341
- expected_output=eo if isinstance(eo, dict) else {},
341
+ # Passed as stored: the evaluator rejects a non-object expectation, None included, instead
342
+ # of running it with nothing pinned.
343
+ expected_output=eo,
342
344
  k=k,
343
345
  gate=gate,
344
346
  agent_id=agent_id,
@@ -26,6 +26,7 @@ import re
26
26
  from dataclasses import dataclass
27
27
  from typing import Literal
28
28
 
29
+ from gooddata_eval.core.chat.sse_client import ADHOC_VIZ_ID
29
30
  from gooddata_eval.core.config import judge_model
30
31
  from gooddata_eval.core.evaluators._llm_judge import JudgeResponseError, LLMJudge, _message_content
31
32
  from gooddata_eval.core.models import ChatResult
@@ -77,6 +78,136 @@ _REQUEST_RE = re.compile(
77
78
  re.IGNORECASE,
78
79
  )
79
80
 
81
+ # The dashboard editor shows an existing chart and then stops until the user asks for it to be
82
+ # placed, so that turn ends by asking to go ahead with a placement, in words the approval phrases
83
+ # above do not cover. Read on a dashboard edit only (classify_edit_reply): elsewhere "Should I
84
+ # replace the filter?" is not a step any skill's flow defines.
85
+ _PLACEMENT_VERBS = r"replace|place|put|swap|add|insert|move"
86
+ _PLACEMENT_VERB_RE = re.compile(rf"\b(?:{_PLACEMENT_VERBS})\b", re.IGNORECASE)
87
+ # The verbs name filters and other widgets too ("Do you want me to add anything else?", "Should I replace
88
+ # the date filter?"), so one counts only when a chart is what it places: a pronoun or a chart noun close
89
+ # after it ("put it there", "replace Order breakdown with this chart", "replace Order breakdown with it"),
90
+ # or, once the conversation has shown a chart, any object but a lowercase "filter" (a title such as
91
+ # "Filter Usage" is a chart) or an open "anything else" ("I'll replace Order Breakdown in the same
92
+ # position"). "With it" names the chart, so "replace the date filter with it" still places one.
93
+ _CHART_NOUNS = r"charts?|visualizations?|insights?"
94
+ _PLACED_CHART_RE = re.compile(
95
+ rf"\b(?:{_PLACEMENT_VERBS})\s+(?:\S+\s+)?(?:it|them)\b"
96
+ rf"|\b(?:{_PLACEMENT_VERBS})\s+(?:\S+\s+){{0,5}}?(?:{_CHART_NOUNS})\b"
97
+ rf"|\b(?:{_PLACEMENT_VERBS})\b[^,;]*?\bwith\s+(?:it|them|(?:this|that|the)\s+(?:new\s+)?(?:{_CHART_NOUNS}))\b",
98
+ re.IGNORECASE,
99
+ )
100
+ _PLACED_ANYTHING_RE = re.compile(
101
+ rf"\b(?:{_PLACEMENT_VERBS})\b(?!\s+(?:anything|something|more|else|another)\b)"
102
+ r"(?!\s+(?:\S+\s+){0,3}?(?-i:filters?)\b)",
103
+ re.IGNORECASE,
104
+ )
105
+ _IF_YOU_WANT_ME_TO = r"\b(?:if|when|once|whether)\s+you(?:['’]d|\s+would)?\s+(?:want|like)\s+me\s+to\s+"
106
+ _PLACEMENT_ASK_RE = re.compile(
107
+ rf"(?:{_SHOULD_I}|{_WANT_ME_TO}|{_IF_YOU_WANT_ME_TO})(?:{_PLACEMENT_VERBS})\b",
108
+ re.IGNORECASE,
109
+ )
110
+ # These name no placement of their own ("Once you confirm the new title, I'll rename it"), so they
111
+ # count only in a sentence that places a chart (_PLACED_CHART_RE).
112
+ _GO_AHEAD_RE = re.compile(
113
+ r"\b(?:once|when|after|if)\s+you\s+confirm\b"
114
+ r"|\bconfirm,?\s+and\s+i(?:['’]ll|\s+will)\b"
115
+ rf"|\b(?:tell|ask)\s+me\s+to\s+(?:{_PLACEMENT_VERBS}|{_APPROVAL_VERBS})\b",
116
+ re.IGNORECASE,
117
+ )
118
+ # Beside a chart the same reply shows, an offer to place it ("I can replace Order breakdown with it",
119
+ # "Top 10 Buyers is ready to replace Order breakdown") is that same stop, put as a statement. Without a
120
+ # chart shown it is no step of the flow, so it stays a reply that did nothing.
121
+ _PLACEMENT_OFFER_RE = re.compile(
122
+ rf"\b(?:i\s+can|i\s+could|(?:is|are|am|i['’]m)\s+ready\s+to)\s+(?:{_PLACEMENT_VERBS})\b",
123
+ re.IGNORECASE,
124
+ )
125
+ # "Where should I place them?" and "Which chart should I replace?" ask for something a yes does not
126
+ # supply, so the placement verb in them is no request to go ahead.
127
+ _WH_ASK_RE = re.compile(
128
+ r"\b(?:where|which|what|how|when|who|whom|whose)\b(?:\s+\w+){0,3}?\s+(?:should|shall|may|can|do|would)\s+(?:i|you)\b",
129
+ re.IGNORECASE,
130
+ )
131
+ # What a yes does not supply either: something to confirm other than going ahead ("once you confirm
132
+ # which section"; "confirm the placement" is going ahead), a value to provide ("please specify the
133
+ # size", "let me know the section") or a numbered list of placement options. A chart's description
134
+ # ("it lets you select a buyer", "it ranks 1. Alice 2. Bob", "1. Net orders on the left axis") asks
135
+ # nothing ("please select a buyer in the filter bar" included), so a request for a place counts anywhere,
136
+ # any other request only from the first placement sentence on, and a numbered list only when two of its
137
+ # items are placements.
138
+ _CONFIRM_WHAT_RE = re.compile(
139
+ r"\bconfirm\s+(?:which|where|what|how|the\s+(?:\w+\s+)?(?:size|section|tab|width|height)s?)\b",
140
+ re.IGNORECASE,
141
+ )
142
+ _PLACE_VALUES = r"size|section|tab|width|height|position|row|column|spot"
143
+ _REQUEST_VERBS = r"select|choose|pick|specify|provide|clarify|share"
144
+ _PLACE_REQUEST_RE = re.compile(
145
+ rf"\bplease\s+(?:{_REQUEST_VERBS})\s+(?:\S+\s+){{0,2}}?(?:which|where|(?:{_PLACE_VALUES})s?)\b"
146
+ rf"|\b(?:let\s+me\s+know|tell\s+me)\s+(?:which|where|(?:what|the)\s+(?:\w+\s+)?(?:{_PLACE_VALUES})s?\b"
147
+ r"|how\s+(?:wide|tall|big|large|many)\b)",
148
+ re.IGNORECASE,
149
+ )
150
+ _EDIT_REQUEST_RE = re.compile(
151
+ rf"\bplease\s+(?:{_REQUEST_VERBS})\b|\breply\s+with\b|^\s*(?:select|choose|pick)\s+(?:one|a|an|the)\b",
152
+ re.IGNORECASE,
153
+ )
154
+ _PLACE_WORDS = (
155
+ rf"{_PLACEMENT_VERBS}|above|below|before|after|left|right|top|bottom|next\s+to|section|row|tab|instead"
156
+ r"|at\s+the\s+(?:end|start|beginning)"
157
+ )
158
+ # An item of a numbered list is a placement when it opens with a placement verb ("Replace Order breakdown"),
159
+ # places "it" ("Keep Order breakdown and add it below") or opens with where to put it ("above Orders over
160
+ # time"). The noun ("Net orders per place") is no placement. A chart's
161
+ # description can name a place in every item ("1. Net orders on the left axis"), seldom a placement.
162
+ _LIST_MARKER_RE = re.compile(r"(?:^|(?<=\s))\(?([1-9])[.)](?=\s)")
163
+ _LIST_ITEM_END_RE = re.compile(r"[\n?]|\.(?:\s|$)")
164
+ _ITEM_PLACEMENT_RE = re.compile(
165
+ rf"^\s*(?:{_PLACEMENT_VERBS})\b|\b(?:{_PLACEMENT_VERBS})\s+(?:\S+\s+)?(?:it|them)\b", re.IGNORECASE
166
+ )
167
+ _ITEM_OPENS_WITH_PLACE_RE = re.compile(
168
+ r"^\s*(?:above|below|before|after|beside|under|next\s+to|instead\s+of|in\s+place\s+of"
169
+ r"|at\s+the\s+(?:top|bottom|end|start|beginning))\b",
170
+ re.IGNORECASE,
171
+ )
172
+ # A second option offered in a sentence after the placement ask: "I can also add it next to it instead".
173
+ # The sentence must offer a placement: "The chart uses net orders instead of gross orders" describes it.
174
+ _LATER_OPTION_RE = re.compile(r"\b(?:instead|otherwise)\b|\bif\s+you(?:['’]d|\s+would)?\s+prefer\b", re.IGNORECASE)
175
+ # "Should I place it before or after Orders over time?" asks where, which a yes does not answer, and
176
+ # so does "Should I place it now, or would you like to review it first?". An "or" that hands the turn
177
+ # back without a second option ("or not?", "or let me know") is no choice. Any case counts: a
178
+ # placement sentence holds no MAQL, the formula spans are masked before this is read.
179
+ # A widget's name can hold an "or" too ("Should I replace Won or Lost Deals with it?", "the same width or
180
+ # height"), so "or" offers a choice only when a place, a placement verb or a question of its own follows it
181
+ # within two words; "alternatively" always does.
182
+ _PLACEMENT_NOT_AN_OPTION = r"not\b|(?:is|are)\s+there\b|anything\b|something\b|if\s+you\b|let\s+me\s+know\b"
183
+ _OR_CHOICE_FOLLOWS = rf"{_PLACE_WORDS}|(?:would|do)\s+you\s+(?:like|want|prefer)|(?:should|shall|can)\s+i"
184
+ _PLACEMENT_CHOICE_RE = re.compile(
185
+ rf"\bor\b(?![\s,]+(?:{_PLACEMENT_NOT_AN_OPTION}))[\s,]+(?:[\w'’-]+[\s,]+){{0,2}}?(?:{_OR_CHOICE_FOLLOWS})\b"
186
+ rf"|\balternatively\b(?![\s,]+(?:{_PLACEMENT_NOT_AN_OPTION}))",
187
+ re.IGNORECASE,
188
+ )
189
+ # "Should I place it in Sales or Finance?" names two destinations: an "or" that follows the placement's
190
+ # "in", "to" or "on" within two words ("in Sales or", "to the Sales tab or") and opens another name
191
+ # ("Finance", "the Finance tab") is a choice. A lowercase word after it is no place ("or leave it", "or
192
+ # keep it as a draft", "now or later"), and the window keeps out a widget's name further on ("in place of
193
+ # Won or Lost Deals").
194
+ _DESTINATION_CHOICE_RE = re.compile(
195
+ rf"\b(?:{_PLACEMENT_VERBS})\b[^,;]*?\b(?:in|into|to|on|onto)\s+(?:the\s+)?"
196
+ rf"[“\"'‘]?[\w'’-]+[”\"'’]?(?:\s+[“\"'‘]?[\w'’-]+[”\"'’]?)?\s+or[\s,]+(?:(?:the|a|an)\s+)?(?-i:[“\"'‘]?[A-Z])",
197
+ re.IGNORECASE,
198
+ )
199
+ # "Should I place it, and how wide should it be?" asks a second thing inside the placement sentence. A
200
+ # relative clause (", which keeps the same width") asks nothing, so the clause must open with "and" or
201
+ # "but" and hold a question verb of its own.
202
+ _SECOND_ASK_RE = re.compile(
203
+ r"\b(?:and|but)\s+(?:how|which|where|what|when)\b[^?]*\b(?:should|shall|would|do|does|can|could)\b[^?]*\?",
204
+ re.IGNORECASE,
205
+ )
206
+ _OR_WORD_RE = re.compile(r"\bor\b", re.IGNORECASE)
207
+ _LEADING_CHOICE_RE = re.compile(r"\s*(?:or|alternatively)\b", re.IGNORECASE)
208
+ # "Which **section** should I place it in?": Markdown emphasis would split the words the checks read.
209
+ _EMPHASIS_RE = re.compile(r"\*+|(?<!\w)_+|_+(?!\w)")
210
+
80
211
  _MESSAGE_CHARS = 800
81
212
  _TRANSCRIPT_MESSAGES = 40
82
213
 
@@ -122,6 +253,101 @@ def asks_in_text(chat_result: ChatResult, rendered_text: str) -> bool:
122
253
  return any(s.rstrip().endswith("?") and not _CONFIRMATION_RE.search(s) for s in sentences)
123
254
 
124
255
 
256
+ def _numbered_placements(text: str) -> int:
257
+ """How many items of the reply's first numbered list (1., 2., ...) are placements."""
258
+ markers = list(_LIST_MARKER_RE.finditer(text))
259
+ start = next((i for i, m in enumerate(markers) if m.group(1) == "1"), None)
260
+ if start is None:
261
+ return 0
262
+ items: list[str] = []
263
+ for expected, (marker, following) in enumerate(
264
+ zip(markers[start:], [*markers[start + 1 :], None], strict=False), start=1
265
+ ):
266
+ if marker.group(1) != str(expected):
267
+ break
268
+ item = text[marker.end() : following.start() if following else len(text)]
269
+ if following is None or following.group(1) != str(expected + 1):
270
+ end = _LIST_ITEM_END_RE.search(item)
271
+ item = item[: end.start()] if end else item
272
+ items.append(item)
273
+ break
274
+ items.append(item)
275
+ return sum(bool(_ITEM_PLACEMENT_RE.search(i) or _ITEM_OPENS_WITH_PLACE_RE.match(i)) for i in items)
276
+
277
+
278
+ def classify_edit_reply(chat_result: ChatResult, rendered_text: str, *, shown_earlier: bool = False) -> ReplyKind:
279
+ """Kind of a dashboard-edit reply that did not produce the patch.
280
+
281
+ ``classify_reply``, plus the editor's own confirmation step: a reply that only asks to go
282
+ ahead with placing a chart ("Should I replace Order breakdown with it?", "Once you confirm,
283
+ I'll place it", "ask me to place it when you're ready") is a confirmation, so it is told yes. So is
284
+ an offer to place it ("I can replace Order breakdown with it") once a chart has been shown: in this
285
+ reply, or anywhere in the conversation so far (``shown_earlier``), as when the editor asks again in a
286
+ turn after its preview.
287
+ Either kind of confirmation turns into a question when the reply also asks for something a yes
288
+ does not supply: another question ("Which size should it have? Once you confirm, I'll place it."),
289
+ a choice in the placement itself ("Should I put it before or after Orders over time?", "in Sales or
290
+ Finance"), a numbered list with two placement items, something to confirm other than going ahead
291
+ ("once you confirm which section"), a request for a place ("Please specify the size") or, from the
292
+ ask on, any other request.
293
+ """
294
+ if has_structured_question(chat_result):
295
+ return "question"
296
+ text = (rendered_text or "").strip()
297
+ kind = classify_reply(chat_result, text)
298
+ if chat_result.alert_proposals:
299
+ return kind
300
+ plain = _EMPHASIS_RE.sub("", _FORMULA_SPAN_RE.sub(" ", text))
301
+ sentences = [s for s in _SENTENCE_END_RE.split(plain) if s.strip()]
302
+ # ADHOC_VIZ_ID stands for a chart the reply did not show, so it makes no offer.
303
+ created = chat_result.created_visualizations
304
+ shown = [viz for viz in (created.objects if created else []) if viz.id != ADHOC_VIZ_ID]
305
+ offers = bool(shown) or shown_earlier
306
+ placing = [
307
+ bool(_PLACEMENT_ASK_RE.search(s) or _GO_AHEAD_RE.search(s) or (offers and _PLACEMENT_OFFER_RE.search(s)))
308
+ and bool(_PLACED_CHART_RE.search(s) or (offers and _PLACED_ANYTHING_RE.search(s)))
309
+ and not _WH_ASK_RE.search(s)
310
+ for s in sentences
311
+ ]
312
+ if not any(placing):
313
+ return "question" if kind == "confirmation" and asks_in_text(chat_result, text) else kind
314
+ # A shown chart's title is a name, so an "or" inside one ("Orders or Returns") is no choice. Only a
315
+ # title of three words or more with an "or" in it is masked, and only as whole words: a title like
316
+ # "a" or "or" would otherwise eat into the sentence around it.
317
+ shown_titles = [
318
+ re.escape(title)
319
+ for viz in shown
320
+ if (title := (viz.title or "").strip()) and len(title.split()) >= 3 and _OR_WORD_RE.search(title)
321
+ ]
322
+ title_re = re.compile(rf"(?<!\w)(?:{'|'.join(shown_titles)})(?!\w)", re.IGNORECASE) if shown_titles else None
323
+ first = placing.index(True)
324
+ # The second option can come as a sentence of its own after the ask: "Should I replace it? Alternatively, ...".
325
+ masked = [title_re.sub(" ", s) if title_re else s for s in sentences]
326
+ if any(
327
+ _PLACEMENT_CHOICE_RE.search(s) or (is_placing and _DESTINATION_CHOICE_RE.search(s))
328
+ for i, (s, is_placing) in enumerate(zip(masked, placing, strict=True))
329
+ if is_placing or (i > first and _LEADING_CHOICE_RE.match(s))
330
+ ):
331
+ return "question"
332
+ # A request for a place counts wherever it stands ("Please specify the section. Should I place it?").
333
+ if any(_CONFIRM_WHAT_RE.search(s) or _PLACE_REQUEST_RE.search(s) for s in sentences):
334
+ return "question"
335
+ if any(_EDIT_REQUEST_RE.search(s) for s in sentences[first:]):
336
+ return "question"
337
+ # Any sentence after the ask counts, an offer too: "Should I replace it? Otherwise, I can add it as a new row."
338
+ if any(_LATER_OPTION_RE.search(s) and _PLACEMENT_VERB_RE.search(s) for s in sentences[first + 1 :]):
339
+ return "question"
340
+ if _numbered_placements(plain) >= 2:
341
+ return "question"
342
+ asks_more = any(
343
+ s.rstrip().endswith("?")
344
+ and not _CONFIRMATION_RE.search(s)
345
+ and (not is_placing or bool(_SECOND_ASK_RE.search(s)))
346
+ for s, is_placing in zip(sentences, placing, strict=True)
347
+ )
348
+ return "question" if asks_more else "confirmation"
349
+
350
+
125
351
  @dataclass
126
352
  class TranscriptEntry:
127
353
  role: Literal["user", "assistant"]
@@ -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