EvaluationContext class abstract

Base class for contextual information beyond the conversation history that an Evaluator may need to accurately evaluate a response.

Subclasses are free to add domain-specific properties. However, the contents list should always represent all contextual information as AIContent objects so that it can be serialized when recording results.

Implementers
Annotations
  • @Source(name: 'EvaluationContext.cs', namespace: 'Microsoft.Extensions.AI.Evaluation', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Evaluation/')

Constructors

EvaluationContext(String name, {List<AIContent>? contents, String? text})
Creates an EvaluationContext with the given name and optional contents.

Properties

contents List<AIContent>
All contextual information decomposed into AIContent objects.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
name String
The name of this context, used as the key in metric context maps.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited