Package com.tnsai.skills
Class LLMSkillResolver
java.lang.Object
com.tnsai.skills.LLMSkillResolver
- All Implemented Interfaces:
SkillResolver
LLM-driven
SkillResolver — asks the configured
LLMClient to pick the most relevant skill names from a
compact catalog (TNS-289).
Higher accuracy than KeywordSkillResolver when skill
triggers are paraphrased by the user (semantic match vs literal
word overlap), at the cost of one extra LLM round-trip per turn.
Opt-in — operators choose this when the prompt budget is large
enough that a poor skill ranking is more expensive than the scorer
call itself.
Failure mode
If the LLM call throws or returns an unparseable response, the resolver falls back toKeywordSkillResolver for the same
call rather than returning empty — a transient LLM hiccup must not
silently strip skills from the agent's prompt. The fallback is
logged at WARN.- Since:
- 0.10.0 (TNS-289)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LLMSkillResolver
-
-
Method Details
-
resolve
Description copied from interface:SkillResolverPick thelimitskills most relevant touserMessage. Returned list is ordered most-relevant-first; size is at mostlimit; an empty list is valid output (no skill matched the threshold).- Specified by:
resolvein interfaceSkillResolver- Parameters:
userMessage- the latest user turncandidates- the full set of registered skills (caller typically passesSkillStore.list())limit- maximum candidates to return; resolvers MUST not exceed this
-