Table of Contents

Method FindMatches

Namespace
LMKit.Agents.Skills
Assembly
LM-Kit.NET.dll

FindMatches(string, int, float)

Finds skills that match a user request based on description keywords.

This is a simple keyword-based matching implementation. For more sophisticated matching, consider using FindMatchesWithEmbeddings(string, Func<string, float[]>, int, float) with an embedding model.

public IReadOnlyList<SkillMatch> FindMatches(string userRequest, int maxResults = 5, float minScore = 0.1)

Parameters

userRequest string

The user's request text.

maxResults int

Maximum number of matches to return.

minScore float

Minimum score threshold (0.0 to 1.0).

Returns

IReadOnlyList<SkillMatch>

A list of skill matches sorted by relevance (highest first).

Examples

Finding skills matching a user request:

var registry = new SkillRegistry();
registry.LoadFromDirectory("./skills");

var matches = registry.FindMatches("help me review my code for bugs");
foreach (var match in matches)
{
    Console.WriteLine($"{match.Skill.Name}: {match.Score:P0}");
}
// Output: code-review: 85%