Repository navigation
fix(skills): measure auto-load on a held-out half and set defaults that fire - #8510
Conversation
The opt-in skill calibration posted to /embeddings with no Authorization header, so against GAIA's own key-protected Lemonade every call was a 401 and the defaults could not be measured. It now resolves the key the way the client does, reading the real GAIA home the suite otherwise hides, and names the missing key when the server still refuses.
The 90-request set had about three requests per hub skill, 21 negatives and no long task prompt, too few to split into a tuning and a held-out half. Adds three more requests per skill, 20 long task prompts (500-2,200 characters, some with a pasted table, log or transcript) and 41 negatives: small talk, general and coding questions, and questions about pasted text. Two requests that shared wording with an eval scenario or task were reworded.
…at fire Auto-load at the shipped 0.55 floor loaded a skill on about one request in ten and the calibration test failed on main. Skills are now embedded by description alone under EmbeddingGemma's document prompt and the request under its classification prompt, the auto-load floor is 0.40 and the suggestion floor 0.35. The labelled requests are split in two by a hash; prompts and floors were chosen on the tuning half. Held-out half (118 requests, 29 needing no skill), auto-load: precision 0.93, recall 0.58, 62 loads, 4 wrong, all 4 on questions about a skill's topic. Before: precision 0.91, recall 0.11, 12 loads. The calibration tests hold the defaults to a stated bar on the held-out half and print both halves.
|
Verdict: Approve with suggestions This re-tunes skill matching: requests and skill descriptions are now embedded with EmbeddingGemma's own prompts, the labelled set is split into a tuning half and a held-out half, and the defaults (suggest at 0.35, auto-load at 0.40) are chosen on the tuning half and checked on the held-out half. The method is sound and the code change is small. Auto-load stays opt-in and only runs on the embedder it was calibrated for, so nothing breaks. Two things to tidy before merge:
Real-world evidenceN/A: no evidence bundle was produced for this PR. It changes internal matching defaults, tests, a fixture and a spec page, with no new CLI, API or UI surface. The verdict rests on static review. I could not run the unit tests here (pytest isn't installed on this runner), and the real-embedder calibration needs a Lemonade server, so the precision and recall figures are the author's own measurement. 🔍 Technical detailsIssues 🟡 Suggestions change for everyone, but no eval is planned (
On the held-out half, 11 of 29 negatives still get a suggestion. This isn't on CLAUDE.md's required-eval list word for word, but it changes what the model sees on every turn. Add the categories to watch (likely the skill and 🟢 224 vs 230 ( 🟢 Prompts are EmbeddingGemma-specific, but suggestions run on any embedder ( Checked, no finding
Strengths
|
office-docs landed on main with requests in the tuning half only, so the split test failed: a skill with no held-out request is never measured. Adds seven office-docs and six slide-decks requests, which puts each skill in both halves, and restates the measured numbers for 28 hub skills. Held-out auto-load at the defaults: precision 0.92, recall 0.59, 65 loads, 5 wrong, 4 of 29 negatives; the bar is unchanged and still met.
…core
A skill that pairs with the best match loaded with it as soon as it reached
the floor. In real runs one such companion loaded on five requests and none
of its tools was called: it only added its body and tool schemas to every
step. On the tuning half 1 of the 7 companions loaded was a labelled skill.
A companion now loads only when it reaches the floor and leads every
remaining skill by the lead itself. Otherwise it stays a suggestion, and
after an auto-load the suggestion line is an offer ("Also available: X"),
not an instruction to load. Two skills per turn at most, as before.
Measured with embeddinggemma-300m at 0.40 and 0.03: tuning half precision
0.91, recall 0.72, 68 loads, 6 wrong (was 0.90, 0.73, 74, 7); held-out half
0.93, 0.59, 60 loads, 4 wrong (was 0.92, 0.59, 65, 5).
…numbers The spec and the changelog still said a paired skill loads at the floor, and the changelog still named the 0.55 floor this branch replaced with 0.40.
Skill auto-load shipped in #5442 with a floor that was never measured on the current request set, so it almost never fired, and its calibration test could not run against GAIA's own Lemonade (401, no API key). This re-measures it and picks defaults that fire, while auto-load stays off by default.
pairs_withis no longer auto-loaded with it unless it leads on its own score; otherwise it is named as "Also available".Eval
Suggestions are on by default, so the per-turn suggestion line changes for every user. The RC eval should watch
gaia_skills_tasks,gaia_skills_lifecycle,gaia_skills_captureandgaia_tool_selection. Auto-load itself is off by default, so no lane exercises it.Test plan
python -m pytest tests/unit/test_skill_suggester.pycd hub/agents/gaia/python && python -m pytest tests/test_skill_suggestions.pyGAIA_SKILL_SUGGEST_CALIBRATE=1 LEMONADE_BASE_URL=<server> python -m pytest tests/unit/test_skill_suggester.py -k calibration -s