Table of Contents

Property Guidance

Namespace
LMKit.TextAnalysis
Assembly
LM-Kit.NET.dll

Guidance

Gets or sets optional guidance text that can influence the categorization process. This can be used to steer the model toward certain themes or constraints.

public string Guidance { get; set; }

Property Value

string

Examples

using LMKit.Model;
using LMKit.TextAnalysis;
using System;
using System.Collections.Generic;

LM model = LM.LoadFromModelID("lmkit-tasks:4b-preview");
Categorization categorizer = new Categorization(model);

// Provide guidance to influence classification
categorizer.Guidance = "Focus on the primary intent of the message, ignoring greetings and signatures.";

var categories = new List<string> { "complaint", "inquiry", "feedback", "request" };
string email = "Hi team, I hope you're well. I wanted to ask about the status of my order #12345. Thanks!";

int index = categorizer.GetBestCategory(categories, email);
Console.WriteLine($"Email type: {categories[index]}");