gooddata-eval 1.81.1.dev5__tar.gz → 1.81.1.dev7__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 (205) hide show
  1. gooddata_eval-1.81.1.dev5/README.md → gooddata_eval-1.81.1.dev7/PKG-INFO +85 -0
  2. gooddata_eval-1.81.1.dev5/PKG-INFO → gooddata_eval-1.81.1.dev7/README.md +55 -30
  3. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/pyproject.toml +2 -2
  4. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/cli/agentic_runner.py +3 -1
  5. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_conversation_context.py +226 -0
  6. gooddata_eval-1.81.1.dev7/src/gooddata_eval/core/agentic/_forecast_answer.py +280 -0
  7. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_langfuse.py +3 -3
  8. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/dashboard_skill.py +414 -16
  9. gooddata_eval-1.81.1.dev7/src/gooddata_eval/core/agentic/forecasting.py +1276 -0
  10. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/item_scope.py +2 -2
  11. gooddata_eval-1.81.1.dev7/tests/fixtures/dashboard_skill_sizes_switcher_in_container.json +297 -0
  12. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_dashboard_skill.py +1305 -2
  13. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_forecasting.py +341 -0
  14. gooddata_eval-1.81.1.dev7/tests/test_agentic_forecasting_behaviour.py +968 -0
  15. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_runner.py +24 -0
  16. gooddata_eval-1.81.1.dev5/src/gooddata_eval/core/agentic/forecasting.py +0 -641
  17. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/.gitignore +0 -0
  18. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/AGENTS.md +0 -0
  19. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/CLAUDE.md +0 -0
  20. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/LICENSE.txt +0 -0
  21. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/Makefile +0 -0
  22. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/scripts/calibrate_catalog_metadata_judge.py +0 -0
  23. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/scripts/calibrate_knowledge_judge.py +0 -0
  24. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/scripts/calibrate_takeaway_judge.py +0 -0
  25. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/scripts/verify_guardrail_refusal_criteria.py +0 -0
  26. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/__init__.py +0 -0
  27. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/_version.py +0 -0
  28. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/cli/__init__.py +0 -0
  29. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/cli/main.py +0 -0
  30. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/__init__.py +0 -0
  31. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/_output.py +0 -0
  32. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/_retry.py +0 -0
  33. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/__init__.py +0 -0
  34. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_alert_update.py +0 -0
  35. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
  36. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
  37. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
  38. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
  39. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_failure_message.py +0 -0
  40. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_filters.py +0 -0
  41. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_gate.py +0 -0
  42. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_kda_answer.py +0 -0
  43. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_kda_expectation.py +0 -0
  44. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_metric_expectation.py +0 -0
  45. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_metric_workspace.py +0 -0
  46. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
  47. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_search_expectation.py +0 -0
  48. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
  49. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/agent_switcher.py +0 -0
  50. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
  51. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
  52. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/conversation.py +0 -0
  53. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
  54. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/document_skill.py +0 -0
  55. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/general_question.py +0 -0
  56. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
  57. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/kda_skill.py +0 -0
  58. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/knowledge.py +0 -0
  59. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/memory.py +0 -0
  60. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
  61. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
  62. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
  63. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/visualization.py +0 -0
  64. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/agentic/what_if.py +0 -0
  65. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/catalog/__init__.py +0 -0
  66. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/catalog/evaluate.py +0 -0
  67. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/catalog/http_client.py +0 -0
  68. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/chat/__init__.py +0 -0
  69. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/chat/render.py +0 -0
  70. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/chat/sse_client.py +0 -0
  71. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/config.py +0 -0
  72. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/connection.py +0 -0
  73. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/dataset/__init__.py +0 -0
  74. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
  75. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
  76. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/dataset/local.py +0 -0
  77. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
  78. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
  79. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
  80. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
  81. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
  82. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
  83. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
  84. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
  85. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/base.py +0 -0
  86. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/catalog_metadata.py +0 -0
  87. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
  88. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
  89. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/knowledge.py +0 -0
  90. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
  91. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
  92. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/summary.py +0 -0
  93. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
  94. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
  95. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/granularity.py +0 -0
  96. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/interaction.py +0 -0
  97. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
  98. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/_env.py +0 -0
  99. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/client.py +0 -0
  100. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
  101. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/observations.py +0 -0
  102. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
  103. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/langfuse/sink.py +0 -0
  104. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/models.py +0 -0
  105. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/number_format.py +0 -0
  106. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/outcome.py +0 -0
  107. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/reporting/__init__.py +0 -0
  108. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/reporting/console.py +0 -0
  109. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/reporting/html_report.py +0 -0
  110. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/reporting/json_report.py +0 -0
  111. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/reporting/report_template.html +0 -0
  112. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/runner.py +0 -0
  113. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/scoring.py +0 -0
  114. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/summary/__init__.py +0 -0
  115. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/summary/http_client.py +0 -0
  116. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
  117. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
  118. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
  119. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/timing.py +0 -0
  120. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/src/gooddata_eval/core/workspace.py +0 -0
  121. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/__init__.py +0 -0
  122. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/_fake_langfuse.py +0 -0
  123. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/conftest.py +0 -0
  124. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/fixtures/catalog_metadata_calibration.json +0 -0
  125. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/fixtures/knowledge_calibration.json +0 -0
  126. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
  127. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
  128. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/fixtures/sse_visualization_stream.txt +0 -0
  129. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/fixtures/takeaway_calibration.json +0 -0
  130. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_agent_switcher.py +0 -0
  131. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_alert_skill.py +0 -0
  132. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_alert_skill_checks.py +0 -0
  133. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_alert_update.py +0 -0
  134. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_anomaly_detection.py +0 -0
  135. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_conversation.py +0 -0
  136. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_dashboard_summary.py +0 -0
  137. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_document_editor_takeaways.py +0 -0
  138. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_document_skill.py +0 -0
  139. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_failure_message.py +0 -0
  140. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_gate.py +0 -0
  141. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_general_question.py +0 -0
  142. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_guardrail.py +0 -0
  143. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_join_trace.py +0 -0
  144. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_kda_skill.py +0 -0
  145. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_kda_skill_behaviour.py +0 -0
  146. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_kda_skill_fields.py +0 -0
  147. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_knowledge.py +0 -0
  148. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_langfuse_trace.py +0 -0
  149. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_memory.py +0 -0
  150. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_metric_skill.py +0 -0
  151. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_metric_skill_options.py +0 -0
  152. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_observe_experiment.py +0 -0
  153. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_run_context.py +0 -0
  154. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_search_tool.py +0 -0
  155. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_search_tool_checks.py +0 -0
  156. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_visualization.py +0 -0
  157. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_agentic_what_if.py +0 -0
  158. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_alert_skill_evaluator.py +0 -0
  159. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_catalog_metadata_client.py +0 -0
  160. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_catalog_metadata_evaluate.py +0 -0
  161. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_catalog_metadata_evaluator.py +0 -0
  162. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_chat_render.py +0 -0
  163. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_cli.py +0 -0
  164. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_connection.py +0 -0
  165. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_context_date_filter.py +0 -0
  166. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_deep_subset.py +0 -0
  167. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_eval_error_scores.py +0 -0
  168. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_fake_langfuse.py +0 -0
  169. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_from_insights.py +0 -0
  170. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_guardrail_criteria.py +0 -0
  171. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_html_report.py +0 -0
  172. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_interaction.py +0 -0
  173. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_knowledge_evaluator.py +0 -0
  174. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_client.py +0 -0
  175. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_e2e_fake_server.py +0 -0
  176. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_env.py +0 -0
  177. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_experiment.py +0 -0
  178. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_item_scope.py +0 -0
  179. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_observations.py +0 -0
  180. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_otlp.py +0 -0
  181. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_sink.py +0 -0
  182. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_langfuse_source.py +0 -0
  183. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_llm_judge.py +0 -0
  184. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_local_loader.py +0 -0
  185. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_maql_normalize.py +0 -0
  186. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_metric_skill_evaluator.py +0 -0
  187. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_models.py +0 -0
  188. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_number_format.py +0 -0
  189. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_outcome.py +0 -0
  190. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_reporting.py +0 -0
  191. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_runner.py +0 -0
  192. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_scoring.py +0 -0
  193. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_search_tool_evaluator.py +0 -0
  194. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_sse_client.py +0 -0
  195. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_summary_client.py +0 -0
  196. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_summary_evaluator.py +0 -0
  197. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_takeaway_client.py +0 -0
  198. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_takeaway_evaluate.py +0 -0
  199. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_takeaway_evaluator.py +0 -0
  200. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_text_evaluators.py +0 -0
  201. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_timing.py +0 -0
  202. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_trace_linker.py +0 -0
  203. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_visualization_evaluator.py +0 -0
  204. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tests/test_workspace.py +0 -0
  205. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev7}/tox.ini +0 -0
@@ -1,3 +1,33 @@
1
+ Metadata-Version: 2.5
2
+ Name: gooddata-eval
3
+ Version: 1.81.1.dev7
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.dev7
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
@@ -1234,6 +1264,61 @@ names are `KDA_BEHAVIOUR_SCORES`; an item publishes only those of the keys it se
1234
1264
  }
1235
1265
  ```
1236
1266
 
1267
+ ### `agentic_dashboard_skill` opt-in checks
1268
+
1269
+ A dashboard item is scored on the charts it finds and, on an edit, on the patch applying to the
1270
+ saved dashboard. These keys add a check each, published only when the item states the key:
1271
+
1272
+ | Key | Score | Passes when |
1273
+ |---|---|---|
1274
+ | `empty_values` on `date_range`, `date_filters`, or a date entry of `filter_bar` or `tab_filters` | the check of that key | the filter's handling of rows with no date matches. A filter that leaves the key out reads as gen-ai's default: `include` for all time, `exclude` for a range |
1275
+ | `parameters` | `dashboard_parameters_correct` | each named tab, or the flat dashboard, holds exactly the listed parameters, compared on the keys an entry states; a tab the item does not name holds none |
1276
+ | `sizes` | `dashboard_sizes_correct` | each named widget has the stated `columns` / `rows`, at least `min_columns` / `min_rows`, or `grows` from the dashboard before the change: no dimension shrinks, and `rows` or `columns` increases, or with `size` at least one of them |
1277
+ | `preview_before_placing: true` (edit items only) | `dashboard_previewed_before_placing` | every existing chart the patch places was shown to the user in a reply, earlier or with the patch; a patch that places none fails |
1278
+
1279
+ A `sizes` entry names its widget one way: `visualization` (a chart), `text` (a note, case and
1280
+ spacing ignored), `switcher` (its charts, in order), `container` (its id) or `container_path`,
1281
+ optionally on a `tab`. Every placement of the widget is checked. A widget that states no size
1282
+ renders at 12 columns by 22 rows, as gen-ai reads it (`widget_columns` and `widget_rows` in
1283
+ `dashboard_widget_sources.py`), so an absent size is compared as that. As there, a width that is
1284
+ not a whole number reads as absent, so gen-ai reads `6.0` as 12:
1285
+
1286
+ ```json
1287
+ {
1288
+ "type": "dashboardPatch",
1289
+ "saved_dashboard_id": "qa30476_layout_dashboard",
1290
+ "visualizations": [{"id": "603bbd58-ea50-4607-ad20-418bd95c06c8", "title": "Top 10 Sellers"}],
1291
+ "sizes": [
1292
+ {"switcher": ["adf2b786-32bd-4864-b251-7e2cfe9a006f", "b666412b-3c13-4e80-9b3f-7787558aa3ce"], "columns": 4},
1293
+ {"container": "qa30476_k3", "columns": 12},
1294
+ {"visualization": "6bb6723e-3bcb-4833-96f7-844cf81b56ef", "min_columns": 6}
1295
+ ]
1296
+ }
1297
+ ```
1298
+
1299
+ The minimum sizes come from the item, not from the evaluator: gen-ai copies the editor's
1300
+ minimums from gdc-ui (`MIN_CHART_SIZE_BY_KIND` and the fallback `MIN_CHART_SIZE` in `dashboard_widget_sources.py`), and an item restates the
1301
+ one it needs. `layout` can name a container in a section's `widgets` as `{"container": id}`, so a
1302
+ whole section holding groups is compared in order.
1303
+
1304
+ Rejected before any request: an expectation key no check reads (a misspelt `size`, for example),
1305
+ an unknown key in a date expectation or a `sizes` entry, a `sizes` entry with no or two selectors
1306
+ or no check, a width that is not a positive integer (`6.0` included) or is wider than 12 columns,
1307
+ a height that is not a positive number, a dimension stated both exactly and as a minimum, one
1308
+ widget named twice the same way (a `container_path` compared hop by hop), entries with and without
1309
+ `tab` side by side, `grows` on a creation item, `sizes` on an item that expects no dashboard,
1310
+ `empty_values: only` beside a range, a granularity on an all-time date expectation, a parameter
1311
+ `mode` or `value` its type cannot hold, and `preview_before_placing` set to anything but `true` or
1312
+ on a creation item. A container named by its id in one entry and by a `container_path` in another
1313
+ is not caught, because the path resolves only against the dashboard.
1314
+
1315
+ Not checked: `grows` cannot follow a note the change rewords, a switcher whose charts change, or a
1316
+ widget on a flat dashboard the change splits into tabs, because the same `tab` is looked up before
1317
+ and after the change and the flat dashboard has none. A container is compared on its own `rows`,
1318
+ not the height its content draws. Name a container by its id when the change can move it: a
1319
+ `container_path` is a position. The names published only when they apply are
1320
+ `DASHBOARD_CONDITIONAL_SCORES`.
1321
+
1237
1322
  ### Items asked in a dashboard context (`user_context`)
1238
1323
 
1239
1324
  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.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
-
31
1
  # gooddata-eval
32
2
 
33
3
  CLI to evaluate the GoodData AI agent against a dataset of natural-language
@@ -1264,6 +1234,61 @@ names are `KDA_BEHAVIOUR_SCORES`; an item publishes only those of the keys it se
1264
1234
  }
1265
1235
  ```
1266
1236
 
1237
+ ### `agentic_dashboard_skill` opt-in checks
1238
+
1239
+ A dashboard item is scored on the charts it finds and, on an edit, on the patch applying to the
1240
+ saved dashboard. These keys add a check each, published only when the item states the key:
1241
+
1242
+ | Key | Score | Passes when |
1243
+ |---|---|---|
1244
+ | `empty_values` on `date_range`, `date_filters`, or a date entry of `filter_bar` or `tab_filters` | the check of that key | the filter's handling of rows with no date matches. A filter that leaves the key out reads as gen-ai's default: `include` for all time, `exclude` for a range |
1245
+ | `parameters` | `dashboard_parameters_correct` | each named tab, or the flat dashboard, holds exactly the listed parameters, compared on the keys an entry states; a tab the item does not name holds none |
1246
+ | `sizes` | `dashboard_sizes_correct` | each named widget has the stated `columns` / `rows`, at least `min_columns` / `min_rows`, or `grows` from the dashboard before the change: no dimension shrinks, and `rows` or `columns` increases, or with `size` at least one of them |
1247
+ | `preview_before_placing: true` (edit items only) | `dashboard_previewed_before_placing` | every existing chart the patch places was shown to the user in a reply, earlier or with the patch; a patch that places none fails |
1248
+
1249
+ A `sizes` entry names its widget one way: `visualization` (a chart), `text` (a note, case and
1250
+ spacing ignored), `switcher` (its charts, in order), `container` (its id) or `container_path`,
1251
+ optionally on a `tab`. Every placement of the widget is checked. A widget that states no size
1252
+ renders at 12 columns by 22 rows, as gen-ai reads it (`widget_columns` and `widget_rows` in
1253
+ `dashboard_widget_sources.py`), so an absent size is compared as that. As there, a width that is
1254
+ not a whole number reads as absent, so gen-ai reads `6.0` as 12:
1255
+
1256
+ ```json
1257
+ {
1258
+ "type": "dashboardPatch",
1259
+ "saved_dashboard_id": "qa30476_layout_dashboard",
1260
+ "visualizations": [{"id": "603bbd58-ea50-4607-ad20-418bd95c06c8", "title": "Top 10 Sellers"}],
1261
+ "sizes": [
1262
+ {"switcher": ["adf2b786-32bd-4864-b251-7e2cfe9a006f", "b666412b-3c13-4e80-9b3f-7787558aa3ce"], "columns": 4},
1263
+ {"container": "qa30476_k3", "columns": 12},
1264
+ {"visualization": "6bb6723e-3bcb-4833-96f7-844cf81b56ef", "min_columns": 6}
1265
+ ]
1266
+ }
1267
+ ```
1268
+
1269
+ The minimum sizes come from the item, not from the evaluator: gen-ai copies the editor's
1270
+ minimums from gdc-ui (`MIN_CHART_SIZE_BY_KIND` and the fallback `MIN_CHART_SIZE` in `dashboard_widget_sources.py`), and an item restates the
1271
+ one it needs. `layout` can name a container in a section's `widgets` as `{"container": id}`, so a
1272
+ whole section holding groups is compared in order.
1273
+
1274
+ Rejected before any request: an expectation key no check reads (a misspelt `size`, for example),
1275
+ an unknown key in a date expectation or a `sizes` entry, a `sizes` entry with no or two selectors
1276
+ or no check, a width that is not a positive integer (`6.0` included) or is wider than 12 columns,
1277
+ a height that is not a positive number, a dimension stated both exactly and as a minimum, one
1278
+ widget named twice the same way (a `container_path` compared hop by hop), entries with and without
1279
+ `tab` side by side, `grows` on a creation item, `sizes` on an item that expects no dashboard,
1280
+ `empty_values: only` beside a range, a granularity on an all-time date expectation, a parameter
1281
+ `mode` or `value` its type cannot hold, and `preview_before_placing` set to anything but `true` or
1282
+ on a creation item. A container named by its id in one entry and by a `container_path` in another
1283
+ is not caught, because the path resolves only against the dashboard.
1284
+
1285
+ Not checked: `grows` cannot follow a note the change rewords, a switcher whose charts change, or a
1286
+ widget on a flat dashboard the change splits into tabs, because the same `tab` is looked up before
1287
+ and after the change and the flat dashboard has none. A container is compared on its own `rows`,
1288
+ not the height its content draws. Name a container by its id when the change can move it: a
1289
+ `container_path` is a position. The names published only when they apply are
1290
+ `DASHBOARD_CONDITIONAL_SCORES`.
1291
+
1267
1292
  ### Items asked in a dashboard context (`user_context`)
1268
1293
 
1269
1294
  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.dev5"
4
+ version = "1.81.1.dev7"
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.dev5",
14
+ "gooddata-sdk~=1.81.1.dev7",
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"]