Commit 4308f3f
committed
feat(gooddata-eval): add KDA-skill agentic evaluator
Adds an agentic evaluation runner for the Key Driver Analysis (KDA) skill:
drives the create/execute KDA tool-call flow through a live chat session,
evaluates completion (kda_triggered/executed/success/turn_completed) plus
informational per-field correctness (Measure/Date Attribute/Periods/
Filters/Summary, all kda_-prefixed scores, not yet gated on strict_pass),
and logs whole-turn latency plus pass_at_k/pass_power_k for gdc-nas's
combo_report.py to bucket into its own daily-report table.
Trace selection is deliberately NOT attempted here: a conversation can
have several Langfuse traces sharing one session_id (title generation, a
disambiguation turn, the actual KDA turn), and picking the right one
requires checking observations, which are ingested asynchronously just
like latency. This module links whichever trace the default (max-latency)
selector finds, like every other skill; combo_report.py resolves the real
KDA trace itself, well after the run, when ingestion has settled -- and
owns that logic entirely rather than importing it from here, since the
cross-repo import never actually resolves in the report-generation job.
Also from PR review, including two follow-up independent re-reviews:
- log_quality_and_value_scores (used by every agentic skill, not just
KDA) no longer treats an unresolved latency/cost as the worst possible
outcome -- drops that weighted term and renormalizes instead.
- Dedupe _is_asking_clarification (copy-pasted across kda_skill.py,
metric_skill.py, and a drifted third copy in conversation.py) into a
shared _clarification.py. Only the bare "?"-anywhere check is
tightened to require the message end on a question; the "could
you"/"please"/"clarif" substring checks stay as broad as before, since
they weren't the source of the original false-positive and
conversation.py's multi-turn driver relies on their recall.
- All 6 informational KDA scores are kda_-prefixed, closing off any
future collision with another skill's own score of the same shape.
- pass_power_k is now logged (mirrors visualization.py's own
pass_at_K/pass_power_K) instead of being computed and discarded.
- Replaced an unconditional print() with _log.info, named the
0.01-absolute-tolerance magic number, and fixed a couple of stale/
missing comments (a docstring reference to a removed function, a
missing copyright header).
JIRA: QA-288001 parent d1ab1ad commit 4308f3f
9 files changed
Lines changed: 1162 additions & 22 deletions
File tree
- packages/gooddata-eval
- src/gooddata_eval/core/agentic
- tests
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
| |||
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
| |||
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
| 96 | + | |
84 | 97 | | |
85 | 98 | | |
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
| 104 | + | |
91 | 105 | | |
92 | 106 | | |
93 | 107 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
358 | 363 | | |
359 | 364 | | |
360 | 365 | | |
361 | | - | |
362 | | - | |
363 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
364 | 380 | | |
365 | 381 | | |
| 382 | + | |
| 383 | + | |
366 | 384 | | |
367 | 385 | | |
368 | 386 | | |
| |||
371 | 389 | | |
372 | 390 | | |
373 | 391 | | |
374 | | - | |
375 | | - | |
| 392 | + | |
| 393 | + | |
376 | 394 | | |
377 | 395 | | |
378 | 396 | | |
| |||
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 196 | | |
203 | 197 | | |
204 | 198 | | |
| |||
327 | 321 | | |
328 | 322 | | |
329 | 323 | | |
330 | | - | |
| 324 | + | |
331 | 325 | | |
332 | 326 | | |
333 | 327 | | |
| |||
0 commit comments