GuardRail

sealed interface GuardRail : ContentValidator<String>

Base guardrail interface for AI interaction safety and policy enforcement.

GuardRails are specialized validators that focus on string-based validation for prompts, responses, and other text content in AI interactions. They extend the general ContentValidator framework to provide AI-specific safety measures.

GuardRails validate content for:

  • Safety and toxicity concerns

  • Organizational policy compliance

  • Data privacy and sensitive information

  • Content appropriateness and quality

  • Regulatory compliance requirements

Inheritors

Properties

Link copied to clipboard
abstract val description: String

Description of what this validator checks. Used for documentation and debugging purposes.

Link copied to clipboard
abstract val name: String

Human-readable name for this validator. Used for logging, error reporting, and configuration.

Functions

Link copied to clipboard
abstract fun validate(input: String, blackboard: Blackboard): ValidationResult

Validate the given input within the provided blackboard context.