ProtectedMaterialEvaluator Class

Definition

An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate responses produced by an AI model for presence of protected material.

public ref class ProtectedMaterialEvaluator sealed : Microsoft::Extensions::AI::Evaluation::Safety::ContentSafetyEvaluator
public sealed class ProtectedMaterialEvaluator : Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyEvaluator
type ProtectedMaterialEvaluator = class
    inherit ContentSafetyEvaluator
Public NotInheritable Class ProtectedMaterialEvaluator
Inherits ContentSafetyEvaluator
Inheritance
ProtectedMaterialEvaluator

Remarks

Protected material includes any text that is under copyright, including song lyrics, recipes, and articles. Note that ProtectedMaterialEvaluator can also detect protected material present within image content in the evaluated responses. Supported file formats include JPG/JPEG, PNG and GIF and the evaluation can detect copyrighted artwork, fictional characters, and logos and branding that are registered trademarks. Other modalities such as audio and video are currently not supported.

ProtectedMaterialEvaluator returns a BooleanMetric with a value of true indicating the presence of protected material in the response, and a value of false indicating the absence of protected material.

Constructors

ProtectedMaterialEvaluator()

An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate responses produced by an AI model for presence of protected material.

Properties

EvaluationMetricNames

Gets the Names of the EvaluationMetrics produced by this IEvaluator.

(Inherited from ContentSafetyEvaluator)
ProtectedArtworkMetricName

Gets the Name of the BooleanMetric returned by ProtectedMaterialEvaluator for indicating presence of protected material in artwork in images.

ProtectedFictionalCharactersMetricName

Gets the Name of the BooleanMetric returned by ProtectedMaterialEvaluator for indicating presence of protected fictional characters in images.

ProtectedLogosAndBrandsMetricName

Gets the Name of the BooleanMetric returned by ProtectedMaterialEvaluator for indicating presence of protected logos and brands in images.

ProtectedMaterialMetricName

Gets the Name of the BooleanMetric returned by ProtectedMaterialEvaluator for indicating presence of protected material in responses.

Methods

EvaluateAsync(IEnumerable<ChatMessage>, ChatResponse, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

EvaluateContentSafetyAsync(IChatClient, IEnumerable<ChatMessage>, ChatResponse, IEnumerable<EvaluationContext>, String, Boolean, CancellationToken)

Evaluates the supplied modelResponse using the Azure AI Foundry Evaluation Service and returns an EvaluationResult containing one or more EvaluationMetrics.

(Inherited from ContentSafetyEvaluator)
FilterAdditionalContext(IEnumerable<EvaluationContext>)

Filters the EvaluationContexts supplied by the caller via additionalContext down to just the EvaluationContexts that are relevant to the evaluation being performed by this ContentSafetyEvaluator.

(Inherited from ContentSafetyEvaluator)

Extension Methods

EvaluateAsync(IEvaluator, ChatMessage, ChatMessage, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

EvaluateAsync(IEvaluator, ChatMessage, ChatResponse, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

EvaluateAsync(IEvaluator, ChatMessage, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

EvaluateAsync(IEvaluator, ChatResponse, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

EvaluateAsync(IEvaluator, String, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

EvaluateAsync(IEvaluator, String, String, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken)

Evaluates the supplied modelResponse and returns an EvaluationResult containing one or more EvaluationMetrics.

Applies to