-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MEAI.Evaluation library (#10818)
- Loading branch information
Showing
700 changed files
with
57,861 additions
and
11,527 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
455 changes: 455 additions & 0 deletions
455
xml/Microsoft.Extensions.AI.Evaluation.Quality/ChatConversationEvaluator.xml
Large diffs are not rendered by default.
Oops, something went wrong.
176 changes: 176 additions & 0 deletions
176
xml/Microsoft.Extensions.AI.Evaluation.Quality/CoherenceEvaluator.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<Type Name="CoherenceEvaluator" FullName="Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator"> | ||
<TypeSignature Language="C#" Value="public sealed class CoherenceEvaluator : Microsoft.Extensions.AI.Evaluation.Quality.SingleNumericMetricEvaluator" /> | ||
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit CoherenceEvaluator extends Microsoft.Extensions.AI.Evaluation.Quality.SingleNumericMetricEvaluator" /> | ||
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator" /> | ||
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class CoherenceEvaluator
Inherits SingleNumericMetricEvaluator" /> | ||
<TypeSignature Language="F#" Value="type CoherenceEvaluator = class
 inherit SingleNumericMetricEvaluator" /> | ||
<TypeSignature Language="C++ CLI" Value="public ref class CoherenceEvaluator sealed : Microsoft::Extensions::AI::Evaluation::Quality::SingleNumericMetricEvaluator" /> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<Base> | ||
<BaseTypeName>Microsoft.Extensions.AI.Evaluation.Quality.SingleNumericMetricEvaluator</BaseTypeName> | ||
</Base> | ||
<Interfaces /> | ||
<Attributes> | ||
<Attribute FrameworkAlternate="net-8.0-pp"> | ||
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName> | ||
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
<Docs> | ||
<summary> | ||
An <see cref="T:Microsoft.Extensions.AI.Evaluation.IEvaluator" /> that evaluates the 'Coherence' of a response produced by an AI model. | ||
</summary> | ||
<remarks>To be added.</remarks> | ||
</Docs> | ||
<Members> | ||
<Member MemberName=".ctor"> | ||
<MemberSignature Language="C#" Value="public CoherenceEvaluator ();" /> | ||
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /> | ||
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.#ctor" /> | ||
<MemberSignature Language="VB.NET" Value="Public Sub New ()" /> | ||
<MemberSignature Language="C++ CLI" Value="public:
 CoherenceEvaluator();" /> | ||
<MemberType>Constructor</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<Parameters /> | ||
<Docs> | ||
<summary>To be added.</summary> | ||
<remarks>To be added.</remarks> | ||
</Docs> | ||
</Member> | ||
<Member MemberName="CoherenceMetricName"> | ||
<MemberSignature Language="C#" Value="public static string CoherenceMetricName { get; }" /> | ||
<MemberSignature Language="ILAsm" Value=".property string CoherenceMetricName" /> | ||
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.CoherenceMetricName" /> | ||
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Property CoherenceMetricName As String" /> | ||
<MemberSignature Language="F#" Value="static member CoherenceMetricName : string" Usage="Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.CoherenceMetricName" /> | ||
<MemberSignature Language="C++ CLI" Value="public:
 static property System::String ^ CoherenceMetricName { System::String ^ get(); };" /> | ||
<MemberType>Property</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<ReturnValue> | ||
<ReturnType>System.String</ReturnType> | ||
</ReturnValue> | ||
<Docs> | ||
<summary> | ||
The <see cref="P:Microsoft.Extensions.AI.Evaluation.EvaluationMetric.Name" /> of the <see cref="T:Microsoft.Extensions.AI.Evaluation.NumericMetric" /> returned by | ||
<see cref="T:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator" />. | ||
</summary> | ||
<value>To be added.</value> | ||
<remarks>To be added.</remarks> | ||
</Docs> | ||
</Member> | ||
<Member MemberName="IgnoresHistory"> | ||
<MemberSignature Language="C#" Value="protected override bool IgnoresHistory { get; }" /> | ||
<MemberSignature Language="ILAsm" Value=".property instance bool IgnoresHistory" /> | ||
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.IgnoresHistory" /> | ||
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property IgnoresHistory As Boolean" /> | ||
<MemberSignature Language="F#" Value="member this.IgnoresHistory : bool" Usage="Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.IgnoresHistory" /> | ||
<MemberSignature Language="C++ CLI" Value="protected:
 virtual property bool IgnoresHistory { bool get(); };" /> | ||
<MemberType>Property</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<ReturnValue> | ||
<ReturnType>System.Boolean</ReturnType> | ||
</ReturnValue> | ||
<Docs> | ||
<summary>To be added.</summary> | ||
<value>To be added.</value> | ||
<remarks>To be added.</remarks> | ||
<inheritdoc /> | ||
</Docs> | ||
</Member> | ||
<Member MemberName="MetricName"> | ||
<MemberSignature Language="C#" Value="protected override string MetricName { get; }" /> | ||
<MemberSignature Language="ILAsm" Value=".property instance string MetricName" /> | ||
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.MetricName" /> | ||
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property MetricName As String" /> | ||
<MemberSignature Language="F#" Value="member this.MetricName : string" Usage="Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.MetricName" /> | ||
<MemberSignature Language="C++ CLI" Value="protected:
 virtual property System::String ^ MetricName { System::String ^ get(); };" /> | ||
<MemberType>Property</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<ReturnValue> | ||
<ReturnType>System.String</ReturnType> | ||
</ReturnValue> | ||
<Docs> | ||
<summary>To be added.</summary> | ||
<value>To be added.</value> | ||
<remarks>To be added.</remarks> | ||
<inheritdoc /> | ||
</Docs> | ||
</Member> | ||
<Member MemberName="RenderEvaluationPromptAsync"> | ||
<MemberSignature Language="C#" Value="protected override System.Threading.Tasks.ValueTask<string> RenderEvaluationPromptAsync (Microsoft.Extensions.AI.ChatMessage? userRequest, Microsoft.Extensions.AI.ChatMessage modelResponse, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage>? includedHistory, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.Evaluation.EvaluationContext>? additionalContext, System.Threading.CancellationToken cancellationToken);" /> | ||
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Threading.Tasks.ValueTask`1<string> RenderEvaluationPromptAsync(class Microsoft.Extensions.AI.ChatMessage userRequest, class Microsoft.Extensions.AI.ChatMessage modelResponse, class System.Collections.Generic.IEnumerable`1<class Microsoft.Extensions.AI.ChatMessage> includedHistory, class System.Collections.Generic.IEnumerable`1<class Microsoft.Extensions.AI.Evaluation.EvaluationContext> additionalContext, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> | ||
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.AI.Evaluation.Quality.CoherenceEvaluator.RenderEvaluationPromptAsync(Microsoft.Extensions.AI.ChatMessage,Microsoft.Extensions.AI.ChatMessage,System.Collections.Generic.IEnumerable{Microsoft.Extensions.AI.ChatMessage},System.Collections.Generic.IEnumerable{Microsoft.Extensions.AI.Evaluation.EvaluationContext},System.Threading.CancellationToken)" /> | ||
<MemberSignature Language="VB.NET" Value="Protected Overrides Function RenderEvaluationPromptAsync (userRequest As ChatMessage, modelResponse As ChatMessage, includedHistory As IEnumerable(Of ChatMessage), additionalContext As IEnumerable(Of EvaluationContext), cancellationToken As CancellationToken) As ValueTask(Of String)" /> | ||
<MemberSignature Language="F#" Value="override this.RenderEvaluationPromptAsync : Microsoft.Extensions.AI.ChatMessage * Microsoft.Extensions.AI.ChatMessage * seq<Microsoft.Extensions.AI.ChatMessage> * seq<Microsoft.Extensions.AI.Evaluation.EvaluationContext> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>" Usage="coherenceEvaluator.RenderEvaluationPromptAsync (userRequest, modelResponse, includedHistory, additionalContext, cancellationToken)" /> | ||
<MemberSignature Language="C++ CLI" Value="protected:
 override System::Threading::Tasks::ValueTask<System::String ^> RenderEvaluationPromptAsync(Microsoft::Extensions::AI::ChatMessage ^ userRequest, Microsoft::Extensions::AI::ChatMessage ^ modelResponse, System::Collections::Generic::IEnumerable<Microsoft::Extensions::AI::ChatMessage ^> ^ includedHistory, System::Collections::Generic::IEnumerable<Microsoft::Extensions::AI::Evaluation::EvaluationContext ^> ^ additionalContext, System::Threading::CancellationToken cancellationToken);" /> | ||
<MemberType>Method</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<ReturnValue> | ||
<ReturnType>System.Threading.Tasks.ValueTask<System.String></ReturnType> | ||
<Attributes> | ||
<Attribute FrameworkAlternate="net-8.0-pp"> | ||
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })]</AttributeName> | ||
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>]</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
</ReturnValue> | ||
<Parameters> | ||
<Parameter Name="userRequest" Type="Microsoft.Extensions.AI.ChatMessage"> | ||
<Attributes> | ||
<Attribute FrameworkAlternate="net-8.0-pp"> | ||
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName> | ||
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
</Parameter> | ||
<Parameter Name="modelResponse" Type="Microsoft.Extensions.AI.ChatMessage" /> | ||
<Parameter Name="includedHistory" Type="System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.ChatMessage>"> | ||
<Attributes> | ||
<Attribute FrameworkAlternate="net-8.0-pp"> | ||
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })]</AttributeName> | ||
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>]</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
</Parameter> | ||
<Parameter Name="additionalContext" Type="System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.Evaluation.EvaluationContext>"> | ||
<Attributes> | ||
<Attribute FrameworkAlternate="net-8.0-pp"> | ||
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })]</AttributeName> | ||
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>]</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
</Parameter> | ||
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> | ||
</Parameters> | ||
<Docs> | ||
<param name="userRequest">To be added.</param> | ||
<param name="modelResponse">To be added.</param> | ||
<param name="includedHistory">To be added.</param> | ||
<param name="additionalContext">To be added.</param> | ||
<param name="cancellationToken">To be added.</param> | ||
<summary>To be added.</summary> | ||
<returns>To be added.</returns> | ||
<remarks>To be added.</remarks> | ||
<inheritdoc /> | ||
</Docs> | ||
</Member> | ||
</Members> | ||
</Type> |
90 changes: 90 additions & 0 deletions
90
xml/Microsoft.Extensions.AI.Evaluation.Quality/EquivalenceEvaluator+Context.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<Type Name="EquivalenceEvaluator+Context" FullName="Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator+Context"> | ||
<TypeSignature Language="C#" Value="public sealed class EquivalenceEvaluator.Context : Microsoft.Extensions.AI.Evaluation.EvaluationContext" /> | ||
<TypeSignature Language="ILAsm" Value=".class nested public auto ansi sealed beforefieldinit EquivalenceEvaluator/Context extends Microsoft.Extensions.AI.Evaluation.EvaluationContext" /> | ||
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context" /> | ||
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class EquivalenceEvaluator.Context
Inherits EvaluationContext" /> | ||
<TypeSignature Language="F#" Value="type EquivalenceEvaluator.Context = class
 inherit EvaluationContext" /> | ||
<TypeSignature Language="C++ CLI" Value="public: ref class EquivalenceEvaluator::Context sealed : Microsoft::Extensions::AI::Evaluation::EvaluationContext" /> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<Base> | ||
<BaseTypeName>Microsoft.Extensions.AI.Evaluation.EvaluationContext</BaseTypeName> | ||
</Base> | ||
<Interfaces /> | ||
<Attributes> | ||
<Attribute FrameworkAlternate="net-8.0-pp"> | ||
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName> | ||
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName> | ||
</Attribute> | ||
</Attributes> | ||
<Docs> | ||
<param name="groundTruth"> | ||
The ground truth response against which the response that is being evaluated is compared. | ||
</param> | ||
<summary> | ||
Contextual information required to evaluate the 'Equivalence' of a response. | ||
</summary> | ||
<remarks> | ||
The <see cref="T:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator" /> measures the degree to which the response being evaluated is similar to | ||
the response supplied via <paramref name="groundTruth" />. | ||
</remarks> | ||
</Docs> | ||
<Members> | ||
<Member MemberName=".ctor"> | ||
<MemberSignature Language="C#" Value="public Context (string groundTruth);" /> | ||
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string groundTruth) cil managed" /> | ||
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context.#ctor(System.String)" /> | ||
<MemberSignature Language="VB.NET" Value="Public Sub New (groundTruth As String)" /> | ||
<MemberSignature Language="F#" Value="new Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context : string -> Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context" Usage="new Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context groundTruth" /> | ||
<MemberSignature Language="C++ CLI" Value="public:
 Context(System::String ^ groundTruth);" /> | ||
<MemberType>Constructor</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<Parameters> | ||
<Parameter Name="groundTruth" Type="System.String" /> | ||
</Parameters> | ||
<Docs> | ||
<param name="groundTruth"> | ||
The ground truth response against which the response that is being evaluated is compared. | ||
</param> | ||
<summary> | ||
Contextual information required to evaluate the 'Equivalence' of a response. | ||
</summary> | ||
<remarks> | ||
The <see cref="T:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator" /> measures the degree to which the response being evaluated is similar to | ||
the response supplied via <paramref name="groundTruth" />. | ||
</remarks> | ||
</Docs> | ||
</Member> | ||
<Member MemberName="GroundTruth"> | ||
<MemberSignature Language="C#" Value="public string GroundTruth { get; }" /> | ||
<MemberSignature Language="ILAsm" Value=".property instance string GroundTruth" /> | ||
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context.GroundTruth" /> | ||
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property GroundTruth As String" /> | ||
<MemberSignature Language="F#" Value="member this.GroundTruth : string" Usage="Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context.GroundTruth" /> | ||
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ GroundTruth { System::String ^ get(); };" /> | ||
<MemberType>Property</MemberType> | ||
<AssemblyInfo> | ||
<AssemblyName>Microsoft.Extensions.AI.Evaluation.Quality</AssemblyName> | ||
<AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
</AssemblyInfo> | ||
<ReturnValue> | ||
<ReturnType>System.String</ReturnType> | ||
</ReturnValue> | ||
<Docs> | ||
<summary> | ||
The ground truth response against which the response that is being evaluated is compared. | ||
</summary> | ||
<value>To be added.</value> | ||
<remarks> | ||
The <see cref="T:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator" /> measures the degree to which the response being evaluated is | ||
similar to the response supplied via <see cref="P:Microsoft.Extensions.AI.Evaluation.Quality.EquivalenceEvaluator.Context.GroundTruth" />. | ||
</remarks> | ||
</Docs> | ||
</Member> | ||
</Members> | ||
</Type> |
Oops, something went wrong.