Table of Contents

Property Guidance

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

Guidance

Gets or sets optional guidance text that can influence the summarization process.

public string Guidance { get; set; }

Property Value

string

A string that contains additional instructions or preferences for the summarization process.

Examples

// Example: Supplying guidance to produce a more formal and academic tone.
var model = LM.LoadFromModelID("lmkit-tasks:4b-preview");
var summarizer = new LMKit.TextGeneration.Summarizer(model)
{
    Guidance = "Please create a professional, academic style summary focusing on key research findings."
};

string researchPaperText = File.ReadAllText("research-paper.txt");
var result = summarizer.Summarize(researchPaperText);

Console.WriteLine("Title: " + result.Title);
Console.WriteLine("Content Summary (with academic guidance): " + result.Content);
// Example: Providing guidance to simplify technical jargon for a lay audience.
var model = LM.LoadFromModelID("lmkit-tasks:4b-preview");
var summarizer = new LMKit.TextGeneration.Summarizer(model)
{
    Guidance = "Summarize this text in very simple terms for a general audience with minimal technical language."
};

string technicalDocument = File.ReadAllText("technical-document.txt");
var laymanSummary = summarizer.Summarize(technicalDocument);

Console.WriteLine("Guided Summary: " + laymanSummary.Content);

Remarks

Providing guidance text allows you to nudge the model toward specific styles, tones, or focal points within the summary. For example, you might supply a short phrase or sentence that emphasizes a particular theme, ensures the summary addresses certain user preferences, or adheres to a designated format. If no guidance is provided, the model will rely solely on the input content and its internal training to produce a summary.