Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/gooddata-eval/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ its own shape. `test_kind` on the item is what labels the result, not the evalua
which is why `knowledge_question` can reuse `GeneralQuestionEvaluator` verbatim.
`dashboard_summary` items additionally need `summary_input`, `document_takeaway` items
`takeaway_input`, `catalog_metadata` items `catalog_input`, `agentic_agent_switcher` items
`agent_switcher_input`. `agentic_knowledge` items keep earlier user turns in
`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.

Expand Down
43 changes: 42 additions & 1 deletion packages/gooddata-eval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ 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` and `agentic_search`.
`agentic_general_question`, `agentic_guardrail`, `agentic_search` and `agentic_memory`.
- **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`,
Expand Down Expand Up @@ -983,6 +983,47 @@ first message when the new conversation is bound to another agent (`agent_bound`
are reported as `turn<N>_<check>`, e.g. `turn2_skills_used`, `turn2_include_0`. The CI entry point
is `evaluate_agentic_agent_switcher`, which takes the whole item; `--agent-id` does not apply.

### `agentic_memory` items

Memory items check AI memory (organization- and workspace-level memory items). Each run sends
`question` in a new conversation and is graded twice; it passes only when both pass:

- `memory_injected` (code) — the memory items gen-ai injected into the turn's prompt, read from the
`applyMemory` detail of the turn's conversation items (`/items`), hold every title in
`memory_input.injected` and none in `memory_input.not_injected`. A turn with other details and
no `applyMemory` injected nothing, so an item with only `not_injected` titles passes there.
gen-ai records the details only while the `enableGenAiInteractionIntelligence` feature flag is on
for the organization. A turn with no detail at all, or items that cannot be read, leave the
injected memory unknown: the run fails with the check `memory_read` (also the name of its
Langfuse score) and the exit `chat_error`. The message of a turn without details names the flag.
- `memory_answer_pass` (judge) — the answer against `expected_output`, with the
`agentic_general_question` judge steps. The judge reads text only, so a chart the turn created
is given to it as one line with the chart's title and type.

Titles are compared exactly. Injected means "in the prompt", not "followed": gen-ai presents memory
as defaults, so whether the answer applies an item is the judge's part. In a Langfuse dataset the
block goes in the item's `metadata` or its `input` object; an item carrying it is an `agentic_memory`
item unless it declares another `test_kind` or its `expectedOutput` has a `visualization` key (that
infers `vis_agentic`), as for the other structured inputs; `metadata.test_kind: "agentic_memory"`
forces the memory kind.

```json
{
"id": "om-auto-returns",
"dataset_name": "org_memory",
"test_kind": "agentic_memory",
"question": "Which product categories had the most returned orders in 2024? Anything I should keep in mind?",
"expected_output": "The answer mentions that orders can be returned within 30 days of delivery.",
"memory_input": {
"injected": ["help-line", "returns-30-days"],
"not_injected": ["returns-14-days-disabled"]
}
}
```

At least one title is required, and a title cannot be in both lists. The CI entry point is
`evaluate_agentic_memory`, which takes the whole item.

### `agentic_knowledge` items

Knowledge items ask the AI chat questions it answers from knowledge documents (tools
Expand Down
16 changes: 16 additions & 0 deletions packages/gooddata-eval/src/gooddata_eval/cli/agentic_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from gooddata_eval.core.agentic.guardrail import evaluate_agentic_guardrail
from gooddata_eval.core.agentic.kda_skill import evaluate_agentic_kda_skill
from gooddata_eval.core.agentic.knowledge import evaluate_agentic_knowledge
from gooddata_eval.core.agentic.memory import evaluate_agentic_memory
from gooddata_eval.core.agentic.metric_skill import evaluate_agentic_metric_skill
from gooddata_eval.core.agentic.search_tool import evaluate_agentic_search_tool
from gooddata_eval.core.agentic.visualization import evaluate_agentic_visualization
Expand Down Expand Up @@ -67,6 +68,7 @@ class _LfKw(TypedDict, total=False):
"agentic_what_if",
"agentic_agent_switcher",
"agentic_knowledge",
"agentic_memory",
}
)

Expand All @@ -86,6 +88,7 @@ class _LfKw(TypedDict, total=False):
# reads like a model regression.
#
# agentic_general_question, agentic_guardrail answer questions only, no tool writes
# agentic_memory same as agentic_general_question, plus a read of /items
# agentic_search search_objects, read-only by definition; an item
# with setup_turns runs serially (item_runs_in_parallel)
# vis_agentic, agentic_visualization visualizations come back as AAC proposals
Expand All @@ -95,6 +98,7 @@ class _LfKw(TypedDict, total=False):
{
"agentic_general_question",
"agentic_guardrail",
"agentic_memory",
"agentic_search",
"vis_agentic",
"agentic_visualization",
Expand Down Expand Up @@ -400,6 +404,18 @@ def _dispatch_agentic(
gate=gate,
**lf_kw,
)
elif kind == "agentic_memory":
# The item carries its own memory_input and user_context.
return evaluate_agentic_memory(
host=host,
token=token,
workspace_id=workspace_id,
dataset_item=item,
k=k,
gate=gate,
agent_id=agent_id,
**lf_kw,
)
elif kind == "agentic_knowledge":
return evaluate_agentic_knowledge(
host=host,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
evaluate_agentic_kda_skill,
run_agentic_kda_skill,
)
from gooddata_eval.core.agentic.memory import (
AgenticMemorySummary,
MemoryAssertionError,
MemoryRunResult,
evaluate_agentic_memory,
run_agentic_memory,
)
from gooddata_eval.core.agentic.metric_skill import (
AgenticMetricSummary,
MetricRunResult,
Expand Down Expand Up @@ -92,6 +99,11 @@
run_agentic_report_skill = run_agentic_document_skill

__all__ = [
"run_agentic_memory",
"evaluate_agentic_memory",
"MemoryRunResult",
"MemoryAssertionError",
"AgenticMemorySummary",
"AgentSwitcherAssertionError",
"AgentSwitcherRunResult",
"AgenticAgentSwitcherSummary",
Expand Down
Loading
Loading