GroundednessProEvaluator Class

Definition

An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate the groundedness of responses produced by an AI model.

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

Remarks

The GroundednessProEvaluator measures the degree to which the response being evaluated is grounded in the information present in the supplied GroundingContext. It returns a NumericMetric that contains a score for the groundedness. The score is a number between 1 and 5, with 1 indicating a poor score, and 5 indicating an excellent score.

Note that GroundednessProEvaluator 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, GroundednessProEvaluator 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

GroundednessProEvaluator()

An IEvaluator that utilizes the Azure AI Foundry Evaluation service to evaluate the groundedness of responses produced by an AI model.

Properties

EvaluationMetricNames

Gets the Names of the EvaluationMetrics produced by this IEvaluator.

(Inherited from ContentSafetyEvaluator)
GroundednessProMetricName

Gets the Name of the NumericMetric returned by GroundednessProEvaluator.

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