Skip to content

fix(gooddata-eval): persist skill_routing credit across conversation turns - #1762

Open
Tomkess wants to merge 1 commit into
masterfrom
fix/agentic-conversation-skill-routing-persistence
Open

fix(gooddata-eval): persist skill_routing credit across conversation turns#1762
Tomkess wants to merge 1 commit into
masterfrom
fix/agentic-conversation-skill-routing-persistence

Conversation

@Tomkess

@Tomkess Tomkess commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • `_activated_skills()` only looked at the current turn's tool calls, so `skill_routing` was recomputed from scratch every turn. The platform keeps a skill active once `set_skills` is called, so an agent correctly omits a redundant `set_skills` call on a later turn that reuses the same skill — but the scorer forced `skill_routing=False` whenever no skill was activated this specific turn, regardless of whether it was already active from an earlier turn in the same conversation.
  • Found via `scripts/authoring/debug_conversation.py` (gdc-mic-ai-evaluation repo) replaying `analyst-explores-dynamic-currency-conversion`: turns t4/t5 both ran `create_adhoc_visualization`/`create_metric` successfully against an already-active skill, yet scored FAIL solely because of this.
  • Fix: track activated skills in a running set accumulated across the whole conversation instead of resetting it every turn.

Test plan

  • Added `test_run_agentic_conversation_skill_routing_persists_across_turns` — a skill activated in turn 1, reused without re-declaring in turn 2, is credited on both.
  • Added `test_run_agentic_conversation_skill_routing_false_when_skill_never_activated` — guards against the fix being too lenient; a skill no turn ever activates still fails routing.
  • `uv run pytest tests/test_agentic_conversation.py` — 22 passed.
  • Full package suite (`uv run pytest`) — same 9 pre-existing failures as on `master` with these changes stashed out (missing `openai` extra, one unrelated stale assertion in `test_runner.py`), nothing newly broken.

Summary by CodeRabbit

  • Bug Fixes

    • Skill routing now remains active across conversation turns after a skill is initially enabled.
    • Later requests correctly recognize previously activated skills without requiring reconfiguration.
    • Skills that were never activated continue to be excluded from routing.
  • Tests

    • Added coverage for persistent skill routing and inactive skills.

…turns

_activated_skills() only looked at the current turn's tool calls, so
skill_routing was recomputed from scratch each turn. The platform keeps a
skill active once set_skills is called, so an agent correctly omits a
redundant set_skills call on a later turn that reuses the same skill --
but the scorer forced skill_routing=False whenever no skill was activated
*this* turn, regardless of whether it was already active.

Found via scripts/authoring/debug_conversation.py replaying
analyst-explores-dynamic-currency-conversion (gdc-mic-ai-evaluation repo):
turns t4/t5 both ran create_adhoc_visualization/create_metric successfully
against an already-active skill, yet scored FAIL solely on this.

Track activated skills in a running set across the whole conversation
instead of resetting it every turn.
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 14a78872-7aa1-42e3-89da-9fa1af677a5a

📥 Commits

Reviewing files that changed from the base of the PR and between 8a7cf06 and e18efdc.

📒 Files selected for processing (2)
  • packages/gooddata-eval/src/gooddata_eval/core/agentic/conversation.py
  • packages/gooddata-eval/tests/test_agentic_conversation.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The conversation now preserves activated skills across turns. Skill routing checks all skills activated so far. Tests cover both previously activated skills and skills that were never activated.

Changes

Persistent skill routing

Layer / File(s) Summary
Cumulative skill tracking and validation
packages/gooddata-eval/src/gooddata_eval/core/agentic/conversation.py, packages/gooddata-eval/tests/test_agentic_conversation.py
The conversation accumulates activated skills. Later turns can reuse earlier activations. Tests confirm persistent routing and rejection of never-activated skills.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e18ef

The PR persists skill activation across conversation turns while retaining the false case for skills that were never activated. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: hkad98, lupko, pcerny

Poem

A rabbit watched the skills take flight

One turn lit sparks, the next stayed bright
The ledger kept each skill in view
Unused skills stayed false and true
“Hop,” said the rabbit, “the route is right!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: persisting skill_routing credit across conversation turns.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.65%. Comparing base (8a7cf06) to head (e18efdc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1762   +/-   ##
=======================================
  Coverage   80.65%   80.65%           
=======================================
  Files         272      272           
  Lines       19369    19371    +2     
=======================================
+ Hits        15622    15624    +2     
  Misses       3747     3747           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant