Table of Contents

Class ValidationOptions

Namespace
AiDotNet.PromptEngineering.Analysis
Assembly
AiDotNet.dll

Options for controlling prompt validation behavior.

public class ValidationOptions
Inheritance
ValidationOptions
Inherited Members

Remarks

Configures what checks are performed and how strict validation should be.

For Beginners: Settings for how strict the validation should be.

Example:

var strictOptions = new ValidationOptions
{
    MaxTokens = 4000,
    CheckForInjection = true,
    MinSeverityToReport = IssueSeverity.Info
};

Properties

CheckForInjection

Gets or sets whether to check for potential prompt injection.

public bool CheckForInjection { get; set; }

Property Value

bool

Lenient

Gets a lenient validation configuration.

public static ValidationOptions Lenient { get; }

Property Value

ValidationOptions

MaxTokens

Gets or sets the maximum allowed token count.

public int MaxTokens { get; set; }

Property Value

int

MinSeverityToReport

Gets or sets the minimum severity level to report.

public IssueSeverity MinSeverityToReport { get; set; }

Property Value

IssueSeverity

Strict

Gets a strict validation configuration.

public static ValidationOptions Strict { get; }

Property Value

ValidationOptions

ValidateVariables

Gets or sets whether to validate template variables.

public bool ValidateVariables { get; set; }

Property Value

bool