ProtectedMaterialEvaluator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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 |
EvaluateContentSafetyAsync(IChatClient, IEnumerable<ChatMessage>, ChatResponse, IEnumerable<EvaluationContext>, String, Boolean, CancellationToken) |
Evaluates the supplied |
FilterAdditionalContext(IEnumerable<EvaluationContext>) |
Filters the EvaluationContexts supplied by the caller via |