Interface AssistantMessageGuardRail
-
- All Implemented Interfaces:
-
com.embabel.agent.api.validation.ContentValidator,com.embabel.agent.api.validation.guardrails.GuardRail
public interface AssistantMessageGuardRail implements GuardRail
Validates assistant responses after LLM execution.
AssistantMessageGuardRails provide safety and quality checks on content that AI systems produce, ensuring that generated responses meet organizational standards for appropriateness, accuracy, compliance, and quality.
This interface handles validation of both standard responses and thinking-enhanced responses that include internal reasoning content.
-
-
Method Summary
Modifier and Type Method Description abstract ValidationResultvalidate(ThinkingResponse<?> response, Blackboard blackboard)Validate a thinking-enhanced response containing both result and reasoning. ValidationResultvalidate(AssistantMessage message, Blackboard blackboard)Validate a standard assistant message response. -
-
Method Detail
-
validate
abstract ValidationResult validate(ThinkingResponse<?> response, Blackboard blackboard)
Validate a thinking-enhanced response containing both result and reasoning.
This method provides access to the complete thinking response, allowing validators to examine both the final result and the internal thinking blocks. Implementations can validate the relationship between thinking and result, check for inappropriate reasoning, or ensure thinking quality standards.
- Parameters:
response- the thinking response containing result and thinking blocksblackboard- the blackboard context- Returns:
validation result indicating success or failure
-
validate
ValidationResult validate(AssistantMessage message, Blackboard blackboard)
Validate a standard assistant message response.
This method handles validation of typical chat-style responses from the assistant, checking content appropriateness and compliance.
Default implementation validates the message content, but implementations can override to examine message metadata or perform more sophisticated conversation-aware validation.
- Parameters:
message- the assistant message to validateblackboard- the blackboard context- Returns:
validation result indicating success or failure
-
-
-
-