Evaluate recent and character-routed skill selection (#38993)

## What changed

- Add shadow selectors that fuse recently invoked skills with character routing-card matches using reciprocal rank fusion.
- Add a second variant that also incorporates weighted lexical matches.
- Record both variants in the existing shadow-selection experiment, capped at 50 candidates.

## Testing

- Cover cold starts, duplicate removal, short exact matches, deterministic ranking, result limits, and truncation metadata.
- Extend the skills integration test to verify both selectors recover a skill invoked on an earlier turn.

GitOrigin-RevId: 4ff9e91da8cb49ecbce54ab8e760820616e1a1d3
This commit is contained in:
jif authored and copyberry committed 2026-08-17 12:13:20 +00:00
1 parent 8bf50439f2
commit ea10ae7d0f
5 files changed
+348 -2

No files matched your search

@@ -2,6 +2,7 @@ mod character_ngram;
mod character_routing_card;
mod fielded_bm25;
mod lru;
mod lru_plus_character_routing;
mod lru_plus_lexical;
mod multi_query_lexical;
mod routing_card_lexical;
@@ -12,6 +13,8 @@ pub(crate) use character_routing_card::CharacterRoutingCardSkillSelector;
use codex_skills::SkillDependencies;
pub(crate) use fielded_bm25::FieldedBm25SkillSelector;
pub(crate) use lru::LruSkillSelector;
pub(crate) use lru_plus_character_routing::LruPlusCharacterRoutingSkillSelector;
pub(crate) use lru_plus_character_routing::LruPlusLexicalCharacterRoutingSkillSelector;
pub(crate) use lru_plus_lexical::LruPlusLexicalSkillSelector;
pub(crate) use multi_query_lexical::MultiQueryLexicalSkillSelector;
pub(crate) use routing_card_lexical::RoutingCardLexicalSkillSelector;