Commit 3a76027
committed
fix(gooddata-eval): detect KDA clarifying questions followed by an option list
_is_asking_kda_clarification only matched text ending literally on "?", to avoid
false-positiving on a final answer that merely quotes a question elsewhere. That
missed a real, common response shape: a clarifying question immediately followed
by a bullet/numbered list of the options being offered (e.g. "Which metric?\n-
metric A\n- metric B") -- the message doesn't end on "?" itself, so the run gave up
after turn 1 instead of ever nudging the simulated user to pick one, scoring a
genuinely-ambiguous case as triggered=False.
Found via a real CI trace (QA-28800, gpt56luna_openai / globalmart): the chatbot
asked to disambiguate between two "Total Net Revenue" metrics -- one of which was
the expected answer -- but kda_disambiguated stayed False and the session never
got a second turn, confirming the simulated-reply path was never reached.
Fix: still match text ending on "?"; additionally match a "?" followed only by
list-marker lines (nothing else after it) -- real prose after the list still means
a final answer that merely enumerated something, not a still-open request.
Also fixed: generate_simulated_kda_response only ever knew about measure
candidates, even when the agent's clarifying question was about the PERIOD to
compare instead (e.g. "Which period would you like to compare?") -- it had nothing
period-specific to answer with. Now also builds a period_hint from
expected_output's Date Attribute/Analyzed Period/Reference Period and passes it
alongside the measure candidates, so the reply answers whichever the agent
actually asked about.
Tests: one end-to-end run_agentic_kda_skill test per shape -- the real captured
question+option-list response, and a period-clarification response verifying the
period hint reaches generate_simulated_kda_response correctly.
JIRA: QA-288001 parent 8ad7eb3 commit 3a76027
2 files changed
Lines changed: 120 additions & 10 deletions
File tree
- packages/gooddata-eval
- src/gooddata_eval/core/agentic
- tests
Lines changed: 35 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
42 | 56 | | |
43 | 57 | | |
44 | 58 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
48 | 64 | | |
49 | 65 | | |
50 | 66 | | |
| |||
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
64 | 83 | | |
65 | 84 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
69 | 88 | | |
70 | 89 | | |
71 | 90 | | |
| |||
216 | 235 | | |
217 | 236 | | |
218 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
219 | 245 | | |
220 | | - | |
| 246 | + | |
221 | 247 | | |
222 | 248 | | |
223 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
430 | 514 | | |
431 | 515 | | |
432 | 516 | | |
| |||
457 | 541 | | |
458 | 542 | | |
459 | 543 | | |
460 | | - | |
| 544 | + | |
461 | 545 | | |
462 | 546 | | |
463 | 547 | | |
| |||
0 commit comments