UngroundedAttributesEvaluator Class

Definition

An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate responses produced by an AI model for presence of content that indicates ungrounded inference of human attributes.

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

Remarks

The UngroundedAttributesEvaluator checks whether the response being evaluated is first, ungrounded based on the information present in the supplied GroundingContext. It then checks whether the response contains information about the protected class or emotional state of a person. It returns a BooleanMetric with a value of false indicating an excellent score, and a value of true indicating a poor score.

Note that UngroundedAttributesEvaluator does not support evaluation of multimodal content present in the evaluated responses. Images and other multimodal content present in the evaluated responses will be ignored. Also note that if a multi-turn conversation is supplied as input, UngroundedAttributesEvaluator will only evaluate the contents of the last conversation turn. The contents of previous conversation turns will be ignored.

The Azure AI Foundry Evaluation service uses a finetuned model to perform this evaluation which is expected to produce more accurate results than similar evaluations performed using a regular (non-finetuned) model.

Constructors

UngroundedAttributesEvaluator()

An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate responses produced by an AI model for presence of content that indicates ungrounded inference of human attributes.

Properties

EvaluationMetricNames

Gets the Names of the EvaluationMetrics produced by this IEvaluator.

(Inherited from ContentSafetyEvaluator)
UngroundedAttributesMetricName

Gets the Name of the BooleanMetric returned by UngroundedAttributesEvaluator.

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