ContentHarmEvaluator 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 the presence of a variety of harmful content such as violence, hate speech, etc.
public ref class ContentHarmEvaluator : Microsoft::Extensions::AI::Evaluation::Safety::ContentSafetyEvaluator
public class ContentHarmEvaluator : Microsoft.Extensions.AI.Evaluation.Safety.ContentSafetyEvaluator
type ContentHarmEvaluator = class
inherit ContentSafetyEvaluator
Public Class ContentHarmEvaluator
Inherits ContentSafetyEvaluator
- Inheritance
- Derived
Remarks
ContentHarmEvaluator can be used to evaluate responses for all supported content harm metrics in one go. You can achieve this by omitting the metricNames
parameter.
ContentHarmEvaluator also serves as a base class for HateAndUnfairnessEvaluator, ViolenceEvaluator, SelfHarmEvaluator and SexualEvaluator which can be used to evaluate responses for one specific content harm metric at a time.
Constructors
ContentHarmEvaluator(IDictionary<String,String>) |
An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate responses produced by an AI model for the presence of a variety of harmful content such as violence, hate speech, etc. |
Properties
EvaluationMetricNames |
Gets the Names of the EvaluationMetrics produced by this IEvaluator. (Inherited from ContentSafetyEvaluator) |
Methods
EvaluateAsync(IEnumerable<ChatMessage>, ChatResponse, ChatConfiguration, IEnumerable<EvaluationContext>, CancellationToken) | |
EvaluateContentSafetyAsync(IChatClient, IEnumerable<ChatMessage>, ChatResponse, IEnumerable<EvaluationContext>, String, Boolean, CancellationToken) |
Evaluates the supplied |
FilterAdditionalContext(IEnumerable<EvaluationContext>) |
Filters the EvaluationContexts supplied by the caller via |