Commit 73f0c22
committed
feat(gooddata-eval): add KDA-skill agentic evaluator
Add kda_skill.py: the evaluator for the KDA (Key Driver Analysis) chatbot
skill. Mirrors metric_skill/alert_skill's shape (run_agentic_*/
evaluate_agentic_*/*AssertionError), with a few KDA-specific pieces:
- Scope (QA-28800): strict_pass gates only completion (kda_triggered,
executed, success, turn_completed), not per-field correctness or
latency -- those are logged as informational-only for a follow-up ticket.
- A bounded (max_iterations=2) disambiguation safety net: if the agent asks
a clarifying question instead of triggering KDA, a simulated user reply
(gpt-4o-mini) nudges it forward. A failure in that helper ends only the
current run (contained), not the whole evaluation.
- KDA-turn latency for the daily report is read from Langfuse, but the
trace to read it from is selected by which one actually made the
create_key_driver_analysis/execute_key_driver_analysis tool call
(paginated observation lookup) -- not by picking the largest-latency
trace in the session, which can pick the wrong turn when a case spans
more than one (a disambiguation exchange, or a transient-retry the chat
SDK does internally).
- classify_kda_report_bucket() classifies each run into pass (completed,
<=60s) / failed (completed, slower) / error (didn't complete) for a
separate daily-report reducer to read back via three Langfuse boolean
scores -- distinct from strict_pass, which continues to gate the CI
assertion on completion only.
_langfuse.py: add an additive Observations API (paginated) and an optional
select= override on find_traces_per_conversation (default unchanged: max
latency) so KDA's trace selection doesn't touch the default other skills use.
JIRA: QA-28800
risk: nonprod1 parent 17bcb5c commit 73f0c22
3 files changed
Lines changed: 564 additions & 3 deletions
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: 38 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
59 | 88 | | |
60 | 89 | | |
61 | 90 | | |
| |||
83 | 112 | | |
84 | 113 | | |
85 | 114 | | |
| 115 | + | |
86 | 116 | | |
87 | 117 | | |
88 | 118 | | |
| |||
247 | 277 | | |
248 | 278 | | |
249 | 279 | | |
| 280 | + | |
250 | 281 | | |
251 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
252 | 286 | | |
253 | 287 | | |
254 | 288 | | |
| 289 | + | |
255 | 290 | | |
256 | 291 | | |
257 | 292 | | |
| |||
269 | 304 | | |
270 | 305 | | |
271 | 306 | | |
272 | | - | |
| 307 | + | |
273 | 308 | | |
274 | 309 | | |
275 | 310 | | |
| |||
0 commit comments