gooddata-eval 1.81.1.dev5__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.dev5 → gooddata_eval-1.81.1.dev6}/PKG-INFO +2 -2
  2. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/pyproject.toml +2 -2
  3. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/cli/agentic_runner.py +3 -1
  4. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_conversation_context.py +226 -0
  5. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/dashboard_skill.py +96 -6
  6. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/forecasting.py +158 -7
  7. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_dashboard_skill.py +719 -2
  8. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_forecasting.py +341 -0
  9. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_runner.py +24 -0
  10. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/.gitignore +0 -0
  11. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/AGENTS.md +0 -0
  12. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/CLAUDE.md +0 -0
  13. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/LICENSE.txt +0 -0
  14. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/Makefile +0 -0
  15. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/README.md +0 -0
  16. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/scripts/calibrate_catalog_metadata_judge.py +0 -0
  17. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/scripts/calibrate_knowledge_judge.py +0 -0
  18. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/scripts/calibrate_takeaway_judge.py +0 -0
  19. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/scripts/verify_guardrail_refusal_criteria.py +0 -0
  20. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/__init__.py +0 -0
  21. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/_version.py +0 -0
  22. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/cli/__init__.py +0 -0
  23. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/cli/main.py +0 -0
  24. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/__init__.py +0 -0
  25. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/_output.py +0 -0
  26. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/_retry.py +0 -0
  27. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/__init__.py +0 -0
  28. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_alert_update.py +0 -0
  29. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
  30. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
  31. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
  32. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
  33. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_failure_message.py +0 -0
  34. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_filters.py +0 -0
  35. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_gate.py +0 -0
  36. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_kda_answer.py +0 -0
  37. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_kda_expectation.py +0 -0
  38. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_langfuse.py +0 -0
  39. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_metric_expectation.py +0 -0
  40. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_metric_workspace.py +0 -0
  41. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
  42. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_search_expectation.py +0 -0
  43. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
  44. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/agent_switcher.py +0 -0
  45. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
  46. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
  47. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/conversation.py +0 -0
  48. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
  49. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/document_skill.py +0 -0
  50. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/general_question.py +0 -0
  51. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
  52. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/kda_skill.py +0 -0
  53. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/knowledge.py +0 -0
  54. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/memory.py +0 -0
  55. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
  56. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
  57. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
  58. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/visualization.py +0 -0
  59. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/agentic/what_if.py +0 -0
  60. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/catalog/__init__.py +0 -0
  61. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/catalog/evaluate.py +0 -0
  62. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/catalog/http_client.py +0 -0
  63. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/chat/__init__.py +0 -0
  64. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/chat/render.py +0 -0
  65. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/chat/sse_client.py +0 -0
  66. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/config.py +0 -0
  67. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/connection.py +0 -0
  68. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/__init__.py +0 -0
  69. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
  70. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
  71. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/dataset/local.py +0 -0
  72. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
  73. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
  74. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
  75. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
  76. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
  77. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
  78. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
  79. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
  80. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/base.py +0 -0
  81. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/catalog_metadata.py +0 -0
  82. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
  83. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
  84. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/knowledge.py +0 -0
  85. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
  86. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
  87. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/summary.py +0 -0
  88. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
  89. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
  90. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/granularity.py +0 -0
  91. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/interaction.py +0 -0
  92. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
  93. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/_env.py +0 -0
  94. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/client.py +0 -0
  95. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
  96. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/item_scope.py +0 -0
  97. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/observations.py +0 -0
  98. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
  99. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/langfuse/sink.py +0 -0
  100. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/models.py +0 -0
  101. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/number_format.py +0 -0
  102. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/outcome.py +0 -0
  103. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/__init__.py +0 -0
  104. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/console.py +0 -0
  105. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/html_report.py +0 -0
  106. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/json_report.py +0 -0
  107. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/reporting/report_template.html +0 -0
  108. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/runner.py +0 -0
  109. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/scoring.py +0 -0
  110. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/summary/__init__.py +0 -0
  111. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/summary/http_client.py +0 -0
  112. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
  113. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
  114. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
  115. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/timing.py +0 -0
  116. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/src/gooddata_eval/core/workspace.py +0 -0
  117. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/__init__.py +0 -0
  118. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/_fake_langfuse.py +0 -0
  119. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/conftest.py +0 -0
  120. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/fixtures/catalog_metadata_calibration.json +0 -0
  121. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/fixtures/knowledge_calibration.json +0 -0
  122. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
  123. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
  124. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/fixtures/sse_visualization_stream.txt +0 -0
  125. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/fixtures/takeaway_calibration.json +0 -0
  126. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_agent_switcher.py +0 -0
  127. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_alert_skill.py +0 -0
  128. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_alert_skill_checks.py +0 -0
  129. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_alert_update.py +0 -0
  130. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_anomaly_detection.py +0 -0
  131. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_conversation.py +0 -0
  132. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_dashboard_summary.py +0 -0
  133. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_document_editor_takeaways.py +0 -0
  134. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_document_skill.py +0 -0
  135. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_failure_message.py +0 -0
  136. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_gate.py +0 -0
  137. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_general_question.py +0 -0
  138. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_guardrail.py +0 -0
  139. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_join_trace.py +0 -0
  140. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_kda_skill.py +0 -0
  141. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_kda_skill_behaviour.py +0 -0
  142. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_kda_skill_fields.py +0 -0
  143. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_knowledge.py +0 -0
  144. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_langfuse_trace.py +0 -0
  145. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_memory.py +0 -0
  146. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_metric_skill.py +0 -0
  147. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_metric_skill_options.py +0 -0
  148. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_observe_experiment.py +0 -0
  149. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_run_context.py +0 -0
  150. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_search_tool.py +0 -0
  151. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_search_tool_checks.py +0 -0
  152. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_visualization.py +0 -0
  153. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_agentic_what_if.py +0 -0
  154. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_alert_skill_evaluator.py +0 -0
  155. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_catalog_metadata_client.py +0 -0
  156. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_catalog_metadata_evaluate.py +0 -0
  157. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_catalog_metadata_evaluator.py +0 -0
  158. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_chat_render.py +0 -0
  159. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_cli.py +0 -0
  160. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_connection.py +0 -0
  161. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_context_date_filter.py +0 -0
  162. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_deep_subset.py +0 -0
  163. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_eval_error_scores.py +0 -0
  164. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_fake_langfuse.py +0 -0
  165. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_from_insights.py +0 -0
  166. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_guardrail_criteria.py +0 -0
  167. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_html_report.py +0 -0
  168. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_interaction.py +0 -0
  169. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_knowledge_evaluator.py +0 -0
  170. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_client.py +0 -0
  171. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_e2e_fake_server.py +0 -0
  172. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_env.py +0 -0
  173. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_experiment.py +0 -0
  174. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_item_scope.py +0 -0
  175. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_observations.py +0 -0
  176. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_otlp.py +0 -0
  177. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_sink.py +0 -0
  178. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_langfuse_source.py +0 -0
  179. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_llm_judge.py +0 -0
  180. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_local_loader.py +0 -0
  181. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_maql_normalize.py +0 -0
  182. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_metric_skill_evaluator.py +0 -0
  183. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_models.py +0 -0
  184. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_number_format.py +0 -0
  185. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_outcome.py +0 -0
  186. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_reporting.py +0 -0
  187. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_runner.py +0 -0
  188. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_scoring.py +0 -0
  189. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_search_tool_evaluator.py +0 -0
  190. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_sse_client.py +0 -0
  191. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_summary_client.py +0 -0
  192. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_summary_evaluator.py +0 -0
  193. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_takeaway_client.py +0 -0
  194. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_takeaway_evaluate.py +0 -0
  195. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_takeaway_evaluator.py +0 -0
  196. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_text_evaluators.py +0 -0
  197. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_timing.py +0 -0
  198. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_trace_linker.py +0 -0
  199. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_visualization_evaluator.py +0 -0
  200. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tests/test_workspace.py +0 -0
  201. {gooddata_eval-1.81.1.dev5 → gooddata_eval-1.81.1.dev6}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gooddata-eval
3
- Version: 1.81.1.dev5
3
+ Version: 1.81.1.dev6
4
4
  Summary: Evaluate the GoodData AI agent against your own questions and models.
5
5
  Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
6
6
  Author-email: GoodData <support@gooddata.com>
@@ -18,7 +18,7 @@ Classifier: Topic :: Scientific/Engineering
18
18
  Classifier: Topic :: Software Development
19
19
  Classifier: Typing :: Typed
20
20
  Requires-Python: >=3.11
21
- Requires-Dist: gooddata-sdk~=1.81.1.dev5
21
+ Requires-Dist: gooddata-sdk~=1.81.1.dev6
22
22
  Requires-Dist: httpx<1.0,>=0.27
23
23
  Requires-Dist: jsonpatch<2.0,>=1.33
24
24
  Requires-Dist: orjson<4.0.0,>=3.9.15
@@ -1,7 +1,7 @@
1
1
  # (C) 2026 GoodData Corporation
2
2
  [project]
3
3
  name = "gooddata-eval"
4
- version = "1.81.1.dev5"
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.dev5",
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"]
@@ -5,13 +5,19 @@ from __future__ import annotations
5
5
 
6
6
  import re
7
7
  import time
8
+ from collections import Counter
8
9
  from dataclasses import dataclass, field
9
10
  from typing import Any
10
11
 
11
12
  import jsonpatch
12
13
 
13
14
  from gooddata_eval.core.agentic._clarification import all_questions
14
- from gooddata_eval.core.agentic._conversation_context import CONFIRMATION_REPLY, asks_in_text, classify_reply, clip
15
+ from gooddata_eval.core.agentic._conversation_context import (
16
+ CONFIRMATION_REPLY,
17
+ classify_edit_reply,
18
+ classify_reply,
19
+ clip,
20
+ )
15
21
  from gooddata_eval.core.agentic._failed_runs import build_failed_runs
16
22
  from gooddata_eval.core.agentic._failure_message import failed_checks_from
17
23
  from gooddata_eval.core.agentic._filters import describe_selection, same_unordered_values, selection_of
@@ -41,7 +47,7 @@ from gooddata_eval.core.agentic._trace_linker import (
41
47
  utc_now,
42
48
  )
43
49
  from gooddata_eval.core.chat.render import render_answer_text
44
- from gooddata_eval.core.chat.sse_client import ChatClient, ChatError
50
+ from gooddata_eval.core.chat.sse_client import ADHOC_VIZ_ID, ChatClient, ChatError
45
51
  from gooddata_eval.core.config import ReasoningEffort
46
52
  from gooddata_eval.core.langfuse.item_scope import item_scope
47
53
  from gooddata_eval.core.models import (
@@ -764,6 +770,58 @@ def _bodies_by_id(*references: dict) -> dict[str, dict]:
764
770
  return bodies
765
771
 
766
772
 
773
+ def _shown_visualization_ids(chat_result: ChatResult) -> set[str]:
774
+ """Ids of the charts one turn showed the user as visualization parts.
775
+
776
+ A chart shown with ``preview_existing_visualization`` carries its object id in the part, the
777
+ id a patch places it by. The sentinel standing in for an authored chart the reply did not show
778
+ is not a chart anyone saw.
779
+ """
780
+ created = chat_result.created_visualizations
781
+ return {viz.id for viz in (created.objects if created else []) if viz.id and viz.id != ADHOC_VIZ_ID}
782
+
783
+
784
+ def _placed_existing_visualizations(base: dict, document: dict, new_ids: set[str]) -> list[str]:
785
+ """Existing charts the patch puts on the dashboard, in document order.
786
+
787
+ A chart counts when the document shows it more often than the base did, so a second copy of a
788
+ chart already on the dashboard counts and a widget moved elsewhere does not. A switcher's member
789
+ charts count like charts of their own: the editor can build a switcher out of existing charts. A
790
+ chart authored in this conversation is shown with the ref it was created under, never previewed.
791
+ """
792
+
793
+ def charts(widget: dict) -> list[object]:
794
+ if "visualizations" in widget:
795
+ return [m.get("visualization") for m in widget["visualizations"] or [] if isinstance(m, dict)]
796
+ return [widget.get("visualization")]
797
+
798
+ def counts(dashboard: dict) -> Counter[str]:
799
+ return Counter(v for w in _widgets_of(dashboard) for v in charts(w) if isinstance(v, str))
800
+
801
+ return [viz_id for viz_id in counts(document) - counts(base) if viz_id not in new_ids]
802
+
803
+
804
+ def _check_previewed(placed: list[str], shown_ids: frozenset[str], bodies: dict[str, dict]) -> list[str]:
805
+ """One failure per placed existing chart that no reply showed the user, in an earlier turn or with the patch.
806
+
807
+ A case asks for this only when its edit places an existing chart, so a patch that places none
808
+ fails too: there was no preview to check, and the check would otherwise pass on nothing.
809
+ """
810
+ if not placed:
811
+ return ["preview_before_placing is set, but the patch places no existing chart"]
812
+ failures: list[str] = []
813
+ for viz_id in placed:
814
+ if viz_id in shown_ids:
815
+ continue
816
+ title = (bodies.get(viz_id) or {}).get("title")
817
+ name = f"{title!r} ({viz_id})" if title else repr(viz_id)
818
+ failures.append(
819
+ f"the patch places {name}, but no reply up to the patch showed it as a visualization part "
820
+ "(preview_existing_visualization)"
821
+ )
822
+ return failures
823
+
824
+
767
825
  def _check_chart_types(
768
826
  widgets: list[dict], new_ids: set[str], expected: list[dict], bodies: dict[str, dict]
769
827
  ) -> tuple[list[str], list[str]]:
@@ -1534,6 +1592,15 @@ def _validate_expectation(expected_output: dict) -> None:
1534
1592
  "built from its charts and date range"
1535
1593
  )
1536
1594
 
1595
+ if "preview_before_placing" in expected_output:
1596
+ if expected_output["preview_before_placing"] is not True:
1597
+ raise ValueError(
1598
+ "preview_before_placing must be true when present; leave it out to skip the check, "
1599
+ f"got {expected_output['preview_before_placing']!r}"
1600
+ )
1601
+ if not _is_edit(expected_output):
1602
+ raise ValueError("preview_before_placing is for an edit case; a new draft places nothing it showed")
1603
+
1537
1604
  forbidden = _forbidden_visualizations(expected_output)
1538
1605
  if not isinstance(forbidden, list):
1539
1606
  raise ValueError(f"must_not_contain must be a list of chart expectations, got {forbidden!r}")
@@ -1980,6 +2047,7 @@ class _Applies:
1980
2047
  parameters: bool = False
1981
2048
  forbidden: bool = False
1982
2049
  answer: bool = False
2050
+ preview: bool = False
1983
2051
  # Not a check of its own but a switch over the whole set: a refusal case is scored on the
1984
2052
  # absence of a draft and on what the answer said, so publishing the document checks beside
1985
2053
  # it would report six passes for a document that was never produced.
@@ -2007,6 +2075,7 @@ class _Applies:
2007
2075
  layout="layout" in expected_output,
2008
2076
  filter_bar="filter_bar" in expected_output,
2009
2077
  parameters="parameters" in expected_output,
2078
+ preview=expected_output.get("preview_before_placing") is True,
2010
2079
  forbidden=forbidden,
2011
2080
  answer=answer,
2012
2081
  refusal=refusal,
@@ -2054,6 +2123,7 @@ class DashboardEvaluation:
2054
2123
  layout_correct: bool = False
2055
2124
  filter_bar_correct: bool = False
2056
2125
  parameters_correct: bool = False
2126
+ previewed_before_placing: bool = False
2057
2127
  forbidden_absent: bool = True
2058
2128
  answer_matched: bool = True
2059
2129
  # Whether EITHER dashboard-producing tool was called at all, successful or not. Only a
@@ -2127,6 +2197,8 @@ class DashboardEvaluation:
2127
2197
  checks["dashboard_filter_bar_correct"] = self.filter_bar_correct
2128
2198
  if self.applies.parameters:
2129
2199
  checks["dashboard_parameters_correct"] = self.parameters_correct
2200
+ if self.applies.preview:
2201
+ checks["dashboard_previewed_before_placing"] = self.previewed_before_placing
2130
2202
  if self.applies.forbidden:
2131
2203
  checks["forbidden_charts_absent"] = self.forbidden_absent
2132
2204
  if self.applies.answer:
@@ -2198,6 +2270,7 @@ def evaluate_dashboard_response(
2198
2270
  patch_part: dict | None = None,
2199
2271
  answer_text: str = "",
2200
2272
  producing_tool_called: bool = False,
2273
+ shown_visualization_ids: frozenset[str] = frozenset(),
2201
2274
  ) -> DashboardEvaluation:
2202
2275
  """Score one dashboard response against its expectation.
2203
2276
 
@@ -2420,6 +2493,11 @@ def evaluate_dashboard_response(
2420
2493
  layout_failures = _check_layout(document, new_ids, expected_output["layout"]) if applies.layout else []
2421
2494
  filter_bar_failures = _check_filter_bar(document, expected_output["filter_bar"]) if applies.filter_bar else []
2422
2495
  parameter_failures = _check_parameters(document, expected_output["parameters"]) if applies.parameters else []
2496
+ preview_failures = (
2497
+ _check_previewed(_placed_existing_visualizations(base, document, new_ids), shown_visualization_ids, bodies)
2498
+ if applies.preview
2499
+ else []
2500
+ )
2423
2501
 
2424
2502
  return DashboardEvaluation(
2425
2503
  drafted=True,
@@ -2443,6 +2521,7 @@ def evaluate_dashboard_response(
2443
2521
  layout_correct=not layout_failures,
2444
2522
  filter_bar_correct=not filter_bar_failures,
2445
2523
  parameters_correct=not parameter_failures,
2524
+ previewed_before_placing=not preview_failures,
2446
2525
  forbidden_absent=not forbidden_failures,
2447
2526
  answer_matched=not answer_failures,
2448
2527
  failures=[
@@ -2460,6 +2539,7 @@ def evaluate_dashboard_response(
2460
2539
  *layout_failures,
2461
2540
  *filter_bar_failures,
2462
2541
  *parameter_failures,
2542
+ *preview_failures,
2463
2543
  *new_failures,
2464
2544
  *answer_failures,
2465
2545
  ],
@@ -2539,6 +2619,10 @@ def _execute_single_dashboard_run(
2539
2619
  response_id: str | None = None
2540
2620
  all_tool_call_events: list[ToolCallEvent] = []
2541
2621
  all_reasoning_step_events: list[ReasoningStepEvent] = []
2622
+ # Every chart shown to the user as a visualization part, in any turn up to and including the one
2623
+ # that produced the patch: the editor usually shows a chart and places it after the user's yes, and
2624
+ # sometimes shows and places it in one turn. Both put the chart in front of the user.
2625
+ shown_visualization_ids: set[str] = set()
2542
2626
  timings = PhaseTimings()
2543
2627
  turn_offset = 0.0
2544
2628
  tool_index_offset = 0
@@ -2591,6 +2675,7 @@ def _execute_single_dashboard_run(
2591
2675
  all_tool_call_events.extend(chat_result.tool_call_events or [])
2592
2676
  all_reasoning_step_events.extend(chat_result.reasoning_step_events or [])
2593
2677
  steps += chat_result.reasoning_step_count
2678
+ shown_visualization_ids |= _shown_visualization_ids(chat_result)
2594
2679
 
2595
2680
  # Read every turn, not only the ones that answer without drafting: the turn that
2596
2681
  # produces the draft carries the text describing it, and that text is exactly what the
@@ -2632,10 +2717,14 @@ def _execute_single_dashboard_run(
2632
2717
  # agent would be talked out of the right answer by the harness.
2633
2718
  exit_reason = LoopExit.STOPPED_EARLY
2634
2719
  break
2635
- reply_kind = classify_reply(chat_result, response_text)
2636
- if is_edit and reply_kind == "confirmation" and asks_in_text(chat_result, response_text):
2637
- # "Which widget should I resize? Please confirm." asks something a yes does not answer.
2638
- reply_kind = "question"
2720
+ # On an edit, "Which widget should I resize? Please confirm." asks something a yes does not
2721
+ # answer, and "Should I replace Order breakdown with it?" is the editor's own step before it
2722
+ # places a chart it has shown, in this turn or an earlier one (the set already holds this turn's).
2723
+ reply_kind = (
2724
+ classify_edit_reply(chat_result, response_text, shown_earlier=bool(shown_visualization_ids))
2725
+ if is_edit
2726
+ else classify_reply(chat_result, response_text)
2727
+ )
2639
2728
  if is_edit:
2640
2729
  # The creation reply names charts and a date range, which answers nothing a rename
2641
2730
  # or a resize could have asked, and nothing here can guess what an edit question
@@ -2689,6 +2778,7 @@ def _execute_single_dashboard_run(
2689
2778
  _skill_activated(all_tool_call_events, _required_skill(expected_output)),
2690
2779
  patch_part=patch_part,
2691
2780
  answer_text=answer_text,
2781
+ shown_visualization_ids=frozenset(shown_visualization_ids),
2692
2782
  # Any call, not just a successful one -- see DashboardEvaluation. BOTH tools,
2693
2783
  # not the one this case selected: a refusal is a creation shape, so `tool` is
2694
2784
  # `draft_dashboard`, and an agent that routed to the editor and had a