gooddata-eval 1.81.1.dev6__tar.gz → 1.81.1.dev8__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.dev6/README.md → gooddata_eval-1.81.1.dev8/PKG-INFO +85 -0
  2. gooddata_eval-1.81.1.dev6/PKG-INFO → gooddata_eval-1.81.1.dev8/README.md +55 -30
  3. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/pyproject.toml +2 -2
  4. gooddata_eval-1.81.1.dev8/src/gooddata_eval/core/agentic/_forecast_answer.py +280 -0
  5. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_langfuse.py +3 -3
  6. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/dashboard_skill.py +318 -10
  7. gooddata_eval-1.81.1.dev8/src/gooddata_eval/core/agentic/forecasting.py +1276 -0
  8. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/item_scope.py +2 -2
  9. gooddata_eval-1.81.1.dev8/tests/fixtures/dashboard_skill_sizes_switcher_in_container.json +297 -0
  10. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_dashboard_skill.py +586 -0
  11. gooddata_eval-1.81.1.dev8/tests/test_agentic_forecasting_behaviour.py +968 -0
  12. gooddata_eval-1.81.1.dev6/src/gooddata_eval/core/agentic/forecasting.py +0 -792
  13. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/.gitignore +0 -0
  14. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/AGENTS.md +0 -0
  15. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/CLAUDE.md +0 -0
  16. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/LICENSE.txt +0 -0
  17. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/Makefile +0 -0
  18. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/scripts/calibrate_catalog_metadata_judge.py +0 -0
  19. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/scripts/calibrate_knowledge_judge.py +0 -0
  20. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/scripts/calibrate_takeaway_judge.py +0 -0
  21. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/scripts/verify_guardrail_refusal_criteria.py +0 -0
  22. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/__init__.py +0 -0
  23. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/_version.py +0 -0
  24. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/cli/__init__.py +0 -0
  25. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/cli/agentic_runner.py +0 -0
  26. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/cli/main.py +0 -0
  27. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/__init__.py +0 -0
  28. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/_output.py +0 -0
  29. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/_retry.py +0 -0
  30. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/__init__.py +0 -0
  31. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_alert_update.py +0 -0
  32. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_catalog.py +0 -0
  33. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_clarification.py +0 -0
  34. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_conversation_context.py +0 -0
  35. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_editor_takeaways.py +0 -0
  36. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_failed_runs.py +0 -0
  37. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_failure_message.py +0 -0
  38. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_filters.py +0 -0
  39. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_gate.py +0 -0
  40. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_kda_answer.py +0 -0
  41. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_kda_expectation.py +0 -0
  42. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_metric_expectation.py +0 -0
  43. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_metric_workspace.py +0 -0
  44. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_outcome.py +0 -0
  45. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_search_expectation.py +0 -0
  46. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/_trace_linker.py +0 -0
  47. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/agent_switcher.py +0 -0
  48. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/alert_skill.py +0 -0
  49. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/anomaly_detection.py +0 -0
  50. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/conversation.py +0 -0
  51. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/dashboard_summary.py +0 -0
  52. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/document_skill.py +0 -0
  53. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/general_question.py +0 -0
  54. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/guardrail.py +0 -0
  55. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/kda_skill.py +0 -0
  56. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/knowledge.py +0 -0
  57. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/memory.py +0 -0
  58. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/metric_skill.py +0 -0
  59. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/report_skill.py +0 -0
  60. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/search_tool.py +0 -0
  61. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/visualization.py +0 -0
  62. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/agentic/what_if.py +0 -0
  63. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/catalog/__init__.py +0 -0
  64. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/catalog/evaluate.py +0 -0
  65. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/catalog/http_client.py +0 -0
  66. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/chat/__init__.py +0 -0
  67. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/chat/render.py +0 -0
  68. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/chat/sse_client.py +0 -0
  69. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/config.py +0 -0
  70. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/connection.py +0 -0
  71. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/dataset/__init__.py +0 -0
  72. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/dataset/from_insights.py +0 -0
  73. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/dataset/langfuse_source.py +0 -0
  74. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/dataset/local.py +0 -0
  75. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/__init__.py +0 -0
  76. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/_deep_subset.py +0 -0
  77. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/_guardrail_criteria.py +0 -0
  78. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/_llm_judge.py +0 -0
  79. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/_maql.py +0 -0
  80. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/_rubric.py +0 -0
  81. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/_text_utils.py +0 -0
  82. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/alert_skill.py +0 -0
  83. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/base.py +0 -0
  84. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/catalog_metadata.py +0 -0
  85. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/general_question.py +0 -0
  86. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/guardrail.py +0 -0
  87. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/knowledge.py +0 -0
  88. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/metric_skill.py +0 -0
  89. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/search_tool.py +0 -0
  90. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/summary.py +0 -0
  91. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/takeaway.py +0 -0
  92. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/evaluators/visualization.py +0 -0
  93. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/granularity.py +0 -0
  94. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/interaction.py +0 -0
  95. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/__init__.py +0 -0
  96. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/_env.py +0 -0
  97. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/client.py +0 -0
  98. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/experiment.py +0 -0
  99. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/observations.py +0 -0
  100. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/otlp.py +0 -0
  101. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/langfuse/sink.py +0 -0
  102. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/models.py +0 -0
  103. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/number_format.py +0 -0
  104. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/outcome.py +0 -0
  105. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/reporting/__init__.py +0 -0
  106. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/reporting/console.py +0 -0
  107. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/reporting/html_report.py +0 -0
  108. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/reporting/json_report.py +0 -0
  109. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/reporting/report_template.html +0 -0
  110. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/runner.py +0 -0
  111. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/scoring.py +0 -0
  112. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/summary/__init__.py +0 -0
  113. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/summary/http_client.py +0 -0
  114. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/takeaway/__init__.py +0 -0
  115. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/takeaway/evaluate.py +0 -0
  116. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/takeaway/http_client.py +0 -0
  117. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/timing.py +0 -0
  118. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/src/gooddata_eval/core/workspace.py +0 -0
  119. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/__init__.py +0 -0
  120. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/_fake_langfuse.py +0 -0
  121. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/conftest.py +0 -0
  122. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/fixtures/catalog_metadata_calibration.json +0 -0
  123. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/fixtures/knowledge_calibration.json +0 -0
  124. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/fixtures/sample_dataset/metric_skill_create.json +0 -0
  125. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/fixtures/sample_dataset/visualization_revenue.json +0 -0
  126. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/fixtures/sse_visualization_stream.txt +0 -0
  127. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/fixtures/takeaway_calibration.json +0 -0
  128. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_agent_switcher.py +0 -0
  129. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_alert_skill.py +0 -0
  130. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_alert_skill_checks.py +0 -0
  131. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_alert_update.py +0 -0
  132. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_anomaly_detection.py +0 -0
  133. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_conversation.py +0 -0
  134. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_dashboard_summary.py +0 -0
  135. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_document_editor_takeaways.py +0 -0
  136. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_document_skill.py +0 -0
  137. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_failure_message.py +0 -0
  138. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_forecasting.py +0 -0
  139. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_gate.py +0 -0
  140. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_general_question.py +0 -0
  141. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_guardrail.py +0 -0
  142. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_join_trace.py +0 -0
  143. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_kda_skill.py +0 -0
  144. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_kda_skill_behaviour.py +0 -0
  145. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_kda_skill_fields.py +0 -0
  146. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_knowledge.py +0 -0
  147. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_langfuse_trace.py +0 -0
  148. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_memory.py +0 -0
  149. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_metric_skill.py +0 -0
  150. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_metric_skill_options.py +0 -0
  151. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_observe_experiment.py +0 -0
  152. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_run_context.py +0 -0
  153. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_runner.py +0 -0
  154. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_search_tool.py +0 -0
  155. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_search_tool_checks.py +0 -0
  156. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_visualization.py +0 -0
  157. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_agentic_what_if.py +0 -0
  158. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_alert_skill_evaluator.py +0 -0
  159. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_catalog_metadata_client.py +0 -0
  160. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_catalog_metadata_evaluate.py +0 -0
  161. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_catalog_metadata_evaluator.py +0 -0
  162. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_chat_render.py +0 -0
  163. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_cli.py +0 -0
  164. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_connection.py +0 -0
  165. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_context_date_filter.py +0 -0
  166. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_deep_subset.py +0 -0
  167. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_eval_error_scores.py +0 -0
  168. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_fake_langfuse.py +0 -0
  169. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_from_insights.py +0 -0
  170. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_guardrail_criteria.py +0 -0
  171. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_html_report.py +0 -0
  172. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_interaction.py +0 -0
  173. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_knowledge_evaluator.py +0 -0
  174. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_client.py +0 -0
  175. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_e2e_fake_server.py +0 -0
  176. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_env.py +0 -0
  177. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_experiment.py +0 -0
  178. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_item_scope.py +0 -0
  179. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_observations.py +0 -0
  180. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_otlp.py +0 -0
  181. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_sink.py +0 -0
  182. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_langfuse_source.py +0 -0
  183. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_llm_judge.py +0 -0
  184. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_local_loader.py +0 -0
  185. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_maql_normalize.py +0 -0
  186. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_metric_skill_evaluator.py +0 -0
  187. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_models.py +0 -0
  188. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_number_format.py +0 -0
  189. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_outcome.py +0 -0
  190. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_reporting.py +0 -0
  191. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_runner.py +0 -0
  192. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_scoring.py +0 -0
  193. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_search_tool_evaluator.py +0 -0
  194. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_sse_client.py +0 -0
  195. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_summary_client.py +0 -0
  196. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_summary_evaluator.py +0 -0
  197. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_takeaway_client.py +0 -0
  198. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_takeaway_evaluate.py +0 -0
  199. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_takeaway_evaluator.py +0 -0
  200. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_text_evaluators.py +0 -0
  201. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_timing.py +0 -0
  202. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_trace_linker.py +0 -0
  203. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_visualization_evaluator.py +0 -0
  204. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tests/test_workspace.py +0 -0
  205. {gooddata_eval-1.81.1.dev6 → gooddata_eval-1.81.1.dev8}/tox.ini +0 -0
@@ -1,3 +1,33 @@
1
+ Metadata-Version: 2.5
2
+ Name: gooddata-eval
3
+ Version: 1.81.1.dev8
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.dev8
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.dev6
4
- Summary: Evaluate the GoodData AI agent against your own questions and models.
5
- Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
6
- Author-email: GoodData <support@gooddata.com>
7
- License-Expression: MIT
8
- License-File: LICENSE.txt
9
- Keywords: ai,analytics,cli,evaluation,gooddata,llm
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Environment :: Console
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Classifier: Programming Language :: Python :: 3.14
16
- Classifier: Programming Language :: Python :: 3.15
17
- Classifier: Topic :: Scientific/Engineering
18
- Classifier: Topic :: Software Development
19
- Classifier: Typing :: Typed
20
- Requires-Python: >=3.11
21
- Requires-Dist: gooddata-sdk~=1.81.1.dev6
22
- Requires-Dist: httpx<1.0,>=0.27
23
- Requires-Dist: jsonpatch<2.0,>=1.33
24
- Requires-Dist: orjson<4.0.0,>=3.9.15
25
- Requires-Dist: pydantic<3.0,>=2.6
26
- Requires-Dist: rich<15.0,>=13.0
27
- Provides-Extra: llm-judge
28
- Requires-Dist: openai<2.0,>=1.45; extra == 'llm-judge'
29
- Description-Content-Type: text/markdown
30
-
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.dev6"
4
+ version = "1.81.1.dev8"
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.dev6",
14
+ "gooddata-sdk~=1.81.1.dev8",
15
15
  "httpx>=0.27,<1.0",
16
16
  "jsonpatch>=1.33,<2.0",
17
17
  "orjson>=3.9.15,<4.0.0",
@@ -0,0 +1,280 @@
1
+ # (C) 2026 GoodData Corporation. All rights reserved.
2
+ """Whether a forecast answer names a value the forecast predicted.
3
+
4
+ ``execute_forecast`` returns parallel lists in ``data``: ``attribute`` names the period, ``origin``
5
+ holds the actual values and ``prediction`` the forecast. The forecast line starts from the last
6
+ actual value: a row that repeats the last actual period, with that value as its prediction and
7
+ both bounds. The periods after it carry a prediction only, and those are the values a grounded
8
+ answer names. ``data.points`` holds the same rows but keeps only the oldest ``max_points`` of them,
9
+ so a long history can leave every prediction out of it.
10
+
11
+ The answer is read as text. A number counts as a value when the value rounds to it at the last
12
+ digit the answer wrote: ``5.54M`` names 5,541,967.50, ``5.5 million`` too, ``5.55M`` does not,
13
+ and ``6M`` names nothing because one digit agrees with too many values. Both the English and the Czech way of writing a
14
+ number are read (``1,234.5`` and ``1 234,5``), and a percentage also matches a ratio
15
+ (``48.1%`` names 0.481).
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ import math
21
+ import re
22
+ from dataclasses import dataclass
23
+ from typing import Any
24
+
25
+ # A number of one digit agrees with too many values to name one.
26
+ _MIN_DIGITS = 2
27
+ # How many predicted values a detail lists.
28
+ _LISTED = 5
29
+ _SCALES = {
30
+ "k": 1e3,
31
+ "thousand": 1e3,
32
+ "thousands": 1e3,
33
+ "tis": 1e3,
34
+ "tisíc": 1e3,
35
+ "tisíce": 1e3,
36
+ "m": 1e6,
37
+ "mn": 1e6,
38
+ "mil": 1e6,
39
+ "mln": 1e6,
40
+ "million": 1e6,
41
+ "millions": 1e6,
42
+ "milion": 1e6,
43
+ "milionu": 1e6,
44
+ "miliony": 1e6,
45
+ "milionů": 1e6,
46
+ "b": 1e9,
47
+ "bn": 1e9,
48
+ "billion": 1e9,
49
+ "billions": 1e9,
50
+ "bln": 1e9,
51
+ "mld": 1e9,
52
+ "miliard": 1e9,
53
+ "miliarda": 1e9,
54
+ "miliardu": 1e9,
55
+ "miliardy": 1e9,
56
+ }
57
+ _GROUP_SPACES = "   "
58
+ # A grouped number (5,541,967.50 or 5 541 967,50), else a plain one (193, 5.54, 1,5).
59
+ _NUMBER = re.compile(
60
+ rf"(?<![\w.,])(?P<num>\d{{1,3}}(?:[,.{_GROUP_SPACES}]\d{{3}})+(?:[.,]\d+)?(?!\d)|\d+(?:[.,]\d+)?(?!\d))"
61
+ r"(?:\s?(?P<pct>%)|\s?(?P<word>[^\W\d_]+))?"
62
+ )
63
+ # A date or a timestamp: 2025-10, 2025-10-17, 2025-10-17T14:30:00Z, 2025-10-17 14:30+02:00.
64
+ _ISO_DATE = re.compile(
65
+ r"\b\d{4}-\d{2}(?:-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?)?(?![\d:])"
66
+ )
67
+ _MONTHS = (
68
+ r"(?:jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec|january|february|march|april|june|july|august"
69
+ r"|september|october|november|december|ledna|února|března|dubna|května|června|července|srpna|září|října"
70
+ r"|listopadu|prosince|leden|únor|březen|duben|květen|červen|červenec|srpen|říjen|listopad|prosinec)"
71
+ )
72
+ # A date written with a month name: "October 17, 2025", "17. října 2025", "October 2025". Its day and
73
+ # year are not values, whatever follows them.
74
+ _WRITTEN_DATE = re.compile(
75
+ # A day is one or two digits that no group or decimal follows: "October 5,541,967.50" is a value.
76
+ rf"\b{_MONTHS}\.?\s+\d{{1,2}}(?:st|nd|rd|th)?\b(?![.,]\d)(?:,?\s+\d{{4}}\b)?"
77
+ rf"|(?<![\d.,])\d{{1,2}}\.?\s+{_MONTHS}\b(?:\s+\d{{4}}\b)?"
78
+ rf"|\b{_MONTHS}\.?\s+\d{{4}}\b",
79
+ re.IGNORECASE,
80
+ )
81
+ _YEAR = re.compile(r"(?:19|20)\d\d")
82
+ # A bare year is a date only after one of these words: "2045 orders" is a value, "October 2025" is not.
83
+ # Words that may follow a year in a date ("in 2025 Q4", "2025 rok"), which leave it a date.
84
+ _DATE_WORD = re.compile(r"q[1-4]|h[12]|fy|year|years|rok|roku|roce|and|a|to|do", re.IGNORECASE)
85
+ # A year followed by one of these is a period, whatever precedes it. The word reader stops at a digit,
86
+ # so "2025 Q4" gives "q".
87
+ _PERIOD_AFTER_YEAR = re.compile(r"q|h|q[1-4]|h[12]|fy", re.IGNORECASE)
88
+ _BEFORE_YEAR = re.compile(
89
+ r"\b(?:jan|feb|mar|apr|may|jun|jul|aug|sep|sept|oct|nov|dec|january|february|march|april|june|july|august"
90
+ r"|september|october|november|december|q[1-4]|h[12]|fy|in|of|year|since|until|through|to|from|by|and"
91
+ r"|ledna|února|března|dubna|května|června|července|srpna|září|října|listopadu|prosince|leden|únor|březen"
92
+ r"|duben|květen|červen|červenec|srpen|říjen|listopad|prosinec|v|roce|rok|roku|od|do|a)\.?,?\s*$",
93
+ re.IGNORECASE,
94
+ )
95
+ # A date written in numbers: 17. 10. 2025, 17. 10., 17.10.2025, 10/17/2025. Without the space or the
96
+ # year, "48.1." would be a value at the end of a sentence.
97
+ _NUMERIC_DATE = re.compile(
98
+ r"(?<![\d.,])(?:\d{1,2}\.\s\d{1,2}\.(?:\s?\d{4}\b)?|\d{1,2}\.\d{1,2}\.\d{4}\b)|\b\d{1,2}/\d{1,2}/\d{2,4}\b"
99
+ )
100
+ # A number followed by one of these counts periods, as in "the next 14 days": the horizon, not a value.
101
+ _SPAN_WORD = re.compile(
102
+ r"days?|weeks?|months?|quarters?|years?|periods?|den|dny|dní|dnů|týden|týdny|týdnů|měsíc|měsíce|měsíců"
103
+ r"|čtvrtletí|roky|let|období",
104
+ re.IGNORECASE,
105
+ )
106
+ # What follows a confidence level: "95% confidence", "95 % CI", "interval spolehlivosti 95 %" is not.
107
+ _CONFIDENCE_AFTER = re.compile(r"\s?%?\s*(?:confidence|ci\b|prediction interval|spolehlivost)", re.IGNORECASE)
108
+ # English: comma or space groups, dot decimals. Czech: dot or space groups, comma decimals.
109
+ _READINGS = (
110
+ (re.compile(rf"\d{{1,3}}(?:[,{_GROUP_SPACES}]\d{{3}})*(?:\.\d+)?|\d+(?:\.\d+)?"), f",{_GROUP_SPACES}", "."),
111
+ (re.compile(rf"\d{{1,3}}(?:[.{_GROUP_SPACES}]\d{{3}})*(?:,\d+)?|\d+(?:,\d+)?"), f".{_GROUP_SPACES}", ","),
112
+ )
113
+
114
+
115
+ @dataclass(frozen=True)
116
+ class _Number:
117
+ text: str
118
+ value: float
119
+ # The place of the last digit written, scaled: 0.01 for "5.54", 10,000 for "5.54M".
120
+ unit: float
121
+ percent: bool
122
+
123
+
124
+ def _readings(token: str) -> list[tuple[float, float, int]]:
125
+ """(value, unit of the last significant digit, significant digits) for each way the token can be read.
126
+
127
+ The zeros that end a whole number are rounding: "5,540,000" is written to the ten thousand, so
128
+ its unit is 10,000 and it has three significant digits.
129
+ """
130
+ out: list[tuple[float, float, int]] = []
131
+ for pattern, groups, decimal in _READINGS:
132
+ if not pattern.fullmatch(token):
133
+ continue
134
+ plain = token.translate({ord(c): None for c in groups}).replace(decimal, ".")
135
+ whole, _, fraction = plain.partition(".")
136
+ if fraction:
137
+ unit = 10.0 ** -len(fraction)
138
+ significant = len((whole + fraction).lstrip("0"))
139
+ else:
140
+ trailing = len(whole) - len(whole.rstrip("0"))
141
+ unit = 10.0**trailing
142
+ significant = len(whole.strip("0"))
143
+ reading = (float(plain), unit, significant)
144
+ if reading not in out:
145
+ out.append(reading)
146
+ return out
147
+
148
+
149
+ def answer_numbers(text: str) -> list[_Number]:
150
+ """The numbers an answer writes, each in every reading it allows.
151
+
152
+ Left out: dates (2025-10, October 17, 17. 10. 2025, October 2025, a year after a preposition such
153
+ as "in 2025"), a span of time ("the next 14 days"), a confidence level ("95% confidence") and
154
+ numbers of one significant digit.
155
+ """
156
+ numbers: list[_Number] = []
157
+ text = _NUMERIC_DATE.sub(" ", _WRITTEN_DATE.sub(" ", _ISO_DATE.sub(" ", text)))
158
+ for match in _NUMBER.finditer(text):
159
+ token = match.group("num")
160
+ word = (match.group("word") or "").casefold()
161
+ scale = _SCALES.get(word, 1.0)
162
+ percent = match.group("pct") is not None
163
+ before = text[max(0, match.start() - 16) : match.start()]
164
+ # "rise to 2045 orders" names a count: a year-like number followed by a noun is a value.
165
+ counted = bool(word) and not _DATE_WORD.fullmatch(word)
166
+ dated = bool(_PERIOD_AFTER_YEAR.fullmatch(word)) or (bool(_BEFORE_YEAR.search(before)) and not counted)
167
+ if scale == 1.0 and not percent and _YEAR.fullmatch(token) and dated:
168
+ continue
169
+ if scale == 1.0 and not percent and _SPAN_WORD.fullmatch(word):
170
+ continue
171
+ if _CONFIDENCE_AFTER.match(text, match.end("pct") if percent else match.end("num")):
172
+ continue
173
+ written = match.group(0).strip() if scale != 1.0 or percent else token
174
+ numbers.extend(
175
+ _Number(written, value * scale, unit * scale, percent)
176
+ for value, unit, significant in _readings(token)
177
+ if significant >= _MIN_DIGITS
178
+ )
179
+ return numbers
180
+
181
+
182
+ def _agrees(number: _Number, value: float) -> bool:
183
+ """Whether the number is the value rounded to the number's last digit (signs aside)."""
184
+ targets = (abs(value), abs(value) * 100) if number.percent else (abs(value),)
185
+ return any(abs(number.value - t) <= number.unit / 2 * (1 + 1e-9) for t in targets)
186
+
187
+
188
+ def _numbers_of(data: dict[str, Any], key: str) -> list[Any]:
189
+ values = data.get(key)
190
+ return values if isinstance(values, list) else []
191
+
192
+
193
+ def _finite(value: Any) -> float | None:
194
+ if isinstance(value, bool) or not isinstance(value, int | float):
195
+ return None
196
+ try:
197
+ number = float(value)
198
+ except OverflowError: # an int too large for a float
199
+ return None
200
+ return number if math.isfinite(number) else None
201
+
202
+
203
+ def forecast_values(execute_result: Any) -> dict[str, list[float]]:
204
+ """The predicted values after the last actual period, their bounds, and the starting point.
205
+
206
+ ``predicted`` and ``bounds`` are the periods the forecast adds; ``anchor`` is the prediction
207
+ the last actual period carries, which the line starts from and which is not a forecast.
208
+ """
209
+ data = execute_result.get("data") if isinstance(execute_result, dict) else None
210
+ if not isinstance(data, dict):
211
+ return {"predicted": [], "bounds": [], "anchor": []}
212
+ attribute = _numbers_of(data, "attribute")
213
+ origin = _numbers_of(data, "origin")
214
+ prediction = _numbers_of(data, "prediction")
215
+ lower = _numbers_of(data, "lower_bound")
216
+ upper = _numbers_of(data, "upper_bound")
217
+
218
+ def at(values: list[Any], index: int) -> Any:
219
+ return values[index] if index < len(values) else None
220
+
221
+ actual_periods = {
222
+ period
223
+ for index, period in enumerate(attribute)
224
+ if isinstance(period, str) and _finite(at(origin, index)) is not None
225
+ }
226
+ predicted: list[float] = []
227
+ bounds: list[float] = []
228
+ anchor: list[float] = []
229
+ for index, raw in enumerate(prediction):
230
+ value = _finite(raw)
231
+ if value is None:
232
+ continue
233
+ # The starting point repeats the last actual period, as a row of its own or on the actual
234
+ # row. Without periods to compare, it is the first predicted row when its interval has no
235
+ # width: a flat series has rows of no width after it too, and those are forecasts.
236
+ period = at(attribute, index)
237
+ starts_line = (
238
+ _finite(at(origin, index)) is not None
239
+ or (isinstance(period, str) and period in actual_periods)
240
+ or (
241
+ not actual_periods
242
+ and not predicted
243
+ and not anchor
244
+ and _finite(at(lower, index)) == value == _finite(at(upper, index))
245
+ )
246
+ )
247
+ if starts_line:
248
+ anchor.append(value)
249
+ continue
250
+ predicted.append(value)
251
+ for side in (lower, upper):
252
+ bound = _finite(at(side, index))
253
+ if bound is not None:
254
+ bounds.append(bound)
255
+ return {"predicted": predicted, "bounds": bounds, "anchor": anchor}
256
+
257
+
258
+ def _named(numbers: list[_Number], values: list[float]) -> list[str]:
259
+ return list(dict.fromkeys(n.text for n in numbers if any(_agrees(n, v) for v in values)))
260
+
261
+
262
+ def check_answer_grounded(execute_result: Any, answer: str) -> tuple[bool, dict[str, Any]]:
263
+ """Whether the answer names a value the forecast predicted for a period after the actuals.
264
+
265
+ The bounds and the starting point are reported but not required: an answer may leave the
266
+ interval out, and may mention the last actual value as context.
267
+ """
268
+ if not (isinstance(execute_result, dict) and execute_result.get("success") is True):
269
+ return False, {"reason": "no forecast ran"}
270
+ values = forecast_values(execute_result)
271
+ if not values["predicted"]:
272
+ return False, {"reason": "the forecast returned no predicted value"}
273
+ numbers = answer_numbers(answer)
274
+ named = _named(numbers, values["predicted"])
275
+ return bool(named), {
276
+ "predicted": values["predicted"][:_LISTED],
277
+ "named": named,
278
+ "bounds_named": _named(numbers, values["bounds"]),
279
+ "anchor_named": _named(numbers, values["anchor"]),
280
+ }
@@ -9,7 +9,7 @@ import logging
9
9
  import os
10
10
  import threading
11
11
  import time
12
- from collections.abc import Iterator
12
+ from collections.abc import Generator
13
13
  from contextlib import contextmanager
14
14
  from datetime import UTC, datetime, timedelta
15
15
  from typing import TYPE_CHECKING, Any
@@ -395,7 +395,7 @@ def observe(
395
395
  conversation_id: str | None = None,
396
396
  item_input: Any = None,
397
397
  output: Any = None,
398
- ) -> Iterator[ScoreTarget | None]:
398
+ ) -> Generator[ScoreTarget | None, None, None]:
399
399
  """Export gd-eval's experiment root span for one run and yield where to score it.
400
400
 
401
401
  A run belongs to a Langfuse experiment through the attributes on that span, so the span
@@ -557,7 +557,7 @@ _PENDING_SCORES: contextvars.ContextVar[list[dict[str, Any]] | None] = contextva
557
557
 
558
558
 
559
559
  @contextmanager
560
- def collect_scores(langfuse: HttpxLangfuseClient) -> Iterator[None]:
560
+ def collect_scores(langfuse: HttpxLangfuseClient) -> Generator[None, None, None]:
561
561
  """Hold every ``score_safe`` write made in the block and send them as one batch at its end.
562
562
 
563
563
  The batch is sent even when the drain was cancelled meanwhile, without retrying, so the