Table of Contents

Class PromptIssue

Namespace
AiDotNet.PromptEngineering.Analysis
Assembly
AiDotNet.dll

Represents an issue or warning detected during prompt validation.

public class PromptIssue
Inheritance
PromptIssue
Inherited Members

Remarks

When validating a prompt, various issues may be detected. This class represents a single issue with its severity, message, and location.

For Beginners: A problem found in your prompt.

Example issues:

  • Warning: "Prompt length (5000 tokens) approaches limit (8192)"
  • Error: "Unclosed variable placeholder at position 45"
  • Info: "Consider adding examples for better results"

Properties

Code

Gets or sets the issue code for programmatic handling.

public string Code { get; set; }

Property Value

string

Remarks

A short code like "PE001" that uniquely identifies this type of issue. Useful for filtering, ignoring specific issues, or looking up documentation.

Length

Gets or sets the length of the problematic text (if applicable).

public int? Length { get; set; }

Property Value

int?

Message

Gets or sets the human-readable message describing the issue.

public string Message { get; set; }

Property Value

string

Position

Gets or sets the character position where the issue was detected (if applicable).

public int? Position { get; set; }

Property Value

int?

Severity

Gets or sets the severity level of the issue.

public IssueSeverity Severity { get; set; }

Property Value

IssueSeverity