Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion packages/gooddata-eval/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ which is why `knowledge_question` can reuse `GeneralQuestionEvaluator` verbatim.
`agent_switcher_input`, `agentic_memory` items `memory_input`. `agentic_knowledge` items keep earlier user turns in
`expected_output.setup_turns` (`question` is the graded turn); their evaluator lives in
`core/evaluators/knowledge.py` but is agentic-only, so it is not in the single-shot registry.
`agentic_summary` is not `agentic_dashboard_summary`: that kind builds the context itself from a
dashboard id and grades a rubric; this one sends the context the UI sent (any widget, tab and filter
state), re-executes the stored widget executions, asks follow-ups and checks the figures.
`agentic_summary` items need `agentic_summary_input` (scope, one stored execution per widget,
follow-ups) plus `user_context`: the UI's context without result ids, which expire, so the kind
re-executes the stored executions on every run. Their `question` is a readable scenario line the
judge reads; the text sent to the agent is `agentic_summary_input.question` or the UI's own.
An execution may carry a `baseline` (has data, rows, value sum): data that differs stops the item
before the chat as an ERROR (`data_baseline_changed`), because the run would say nothing about the
agent; an execution that fails or whose result cannot be read stops it as `widget_execution_failed`.
Both causes are on `SETUP_ERRORS` in `core/outcome.py`. An unknown key in an `expected_output` or its
`format` is rejected before any execution. Every turn's figures are checked against the tables the agent read in the conversation
(`core/evaluators/chat_summary_figures.py`); an invented or miscomputed figure fails the run.

## Running the pipeline

Expand Down Expand Up @@ -188,7 +201,8 @@ That default is correct: agent tool calls create real server-side objects (metri
Adding a kind to `PARALLEL_SAFE_TEST_KINDS` is a deliberate assertion that it is read-only,
which nothing in the package can prove for you. An item can still be held back:
`item_runs_in_parallel` runs an `agentic_search` item with `setup_turns` serially, because
the clearance covers the search and not free-text turns sent before it.
the clearance covers the search and not free-text turns sent before it. An `agentic_summary`
item with a `question` of its own or with `follow_ups` runs serially for the same reason.

**The SSE client's retry predicate is load-bearing.** The backoff loop and the retryable
status set (429/500/502/503/504) live in `core/_retry.py`, shared by the chat, takeaway and
Expand Down
5 changes: 3 additions & 2 deletions packages/gooddata-eval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,12 @@ linking ran. Pass `TAVERN_E2E_SKIP_TRACE_LINK=1` to opt out of linking altogethe
their eval kind, and states latency for each:

- **Single-shot** — kinds that send exactly one chat message per run: every non-agentic kind, plus
`agentic_general_question`, `agentic_guardrail`, `agentic_search` and `agentic_memory`.
`agentic_general_question`, `agentic_guardrail`, `agentic_search`, `agentic_memory` and
`agentic_describe_object`.
- **Multi-turn** — kinds that drive a simulated user or fixture turns: `agentic_visualization` (and
`vis_agentic`), `agentic_metric_skill`, `agentic_alert_skill`, `agentic_dashboard_skill`,
`agentic_document_skill`, `agentic_kda_skill`, `agentic_anomaly_detection`, `agentic_what_if`,
`agentic_agent_switcher`, `agentic_knowledge` and `agentic_conversation`.
`agentic_agent_switcher`, `agentic_knowledge`, `agentic_summary` and `agentic_conversation`.

```json
"summary": {
Expand Down
47 changes: 46 additions & 1 deletion packages/gooddata-eval/src/gooddata_eval/cli/agentic_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
from gooddata_eval.core.agentic.agent_switcher import evaluate_agentic_agent_switcher
from gooddata_eval.core.agentic.alert_skill import evaluate_agentic_alert_skill
from gooddata_eval.core.agentic.anomaly_detection import evaluate_agentic_anomaly_detection
from gooddata_eval.core.agentic.chat_summary import evaluate_agentic_summary
from gooddata_eval.core.agentic.conversation import ConversationFixture, evaluate_agentic_conversation
from gooddata_eval.core.agentic.dashboard_skill import evaluate_agentic_dashboard_skill
from gooddata_eval.core.agentic.dashboard_summary import evaluate_agentic_dashboard_summary
from gooddata_eval.core.agentic.describe_object import evaluate_agentic_describe_object
from gooddata_eval.core.agentic.document_skill import evaluate_agentic_document_skill
from gooddata_eval.core.agentic.forecasting import evaluate_agentic_forecasting
from gooddata_eval.core.agentic.general_question import evaluate_agentic_general_question
Expand Down Expand Up @@ -69,6 +71,8 @@ class _LfKw(TypedDict, total=False):
"agentic_agent_switcher",
"agentic_knowledge",
"agentic_memory",
"agentic_summary",
"agentic_describe_object",
}
)

Expand All @@ -94,6 +98,11 @@ class _LfKw(TypedDict, total=False):
# vis_agentic, agentic_visualization visualizations come back as AAC proposals
# in the chat response; nothing is persisted
# and neither module has cleanup code
# agentic_summary executes stored AFMs (a read) and sends the UI's own
# "Summarize" message; an item with a question of its
# own or with follow_ups runs serially
# (item_runs_in_parallel)
# agentic_describe_object one question answered from workspace lookups
PARALLEL_SAFE_TEST_KINDS = frozenset(
{
"agentic_general_question",
Expand All @@ -102,6 +111,8 @@ class _LfKw(TypedDict, total=False):
"agentic_search",
"vis_agentic",
"agentic_visualization",
"agentic_summary",
"agentic_describe_object",
}
)

Expand Down Expand Up @@ -129,11 +140,14 @@ def item_runs_in_parallel(item: DatasetItem) -> bool:
"""True for an item of a cleared kind that sends nothing the clearance does not cover.

``agentic_search`` is cleared for its search. An item's ``setup_turns`` are free text sent before the question,
and nothing stops one from asking the agent to save something, so such an item runs serially.
and nothing stops one from asking the agent to save something, so such an item runs serially. The same holds
for an ``agentic_summary`` item with a ``question`` of its own or with ``follow_ups``.
"""
if not runs_in_parallel(item.test_kind):
return False
eo = item.expected_output
if item.test_kind == "agentic_summary" and item.agentic_summary_input is not None:
return not (item.agentic_summary_input.question or item.agentic_summary_input.follow_ups)
return not (item.test_kind == "agentic_search" and isinstance(eo, dict) and "setup_turns" in eo)


Expand Down Expand Up @@ -367,6 +381,37 @@ def _dispatch_agentic(
agent_id=agent_id,
**lf_kw,
)
elif kind == "agentic_summary":
agentic_summary_input = item.agentic_summary_input
if agentic_summary_input is None or item.user_context is None:
raise ValueError(f"agentic_summary item '{item.id}' needs both 'agentic_summary_input' and 'user_context'.")
return evaluate_agentic_summary(
host=host,
token=token,
workspace_id=workspace_id,
# The item's question is its readable scenario line, read by the judge; the text
# sent to the agent is agentic_summary_input.question or the UI's pre-filled one.
scenario=item.question,
summary_input=agentic_summary_input,
user_context=item.user_context,
expected_output=eo if isinstance(eo, dict) else {},
k=k,
gate=gate,
agent_id=agent_id,
**lf_kw,
)
elif kind == "agentic_describe_object":
return evaluate_agentic_describe_object(
host=host,
token=token,
workspace_id=workspace_id,
question=item.question,
expected_output=eo if isinstance(eo, dict) else {},
k=k,
gate=gate,
agent_id=agent_id,
**lf_kw,
)
elif kind == "agentic_what_if":
return evaluate_agentic_what_if(
host=host,
Expand Down
Loading
Loading