Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ namespace Microsoft.Extensions.AI.Evaluation.NLP;
/// </summary>
/// <remarks>
/// <para>
/// The <see cref="BLEUEvaluator"/> computes the BLEU score of a response ("hypothesis") compared to a reference
/// supplied via <see cref="BLEUEvaluatorContext.References"/>. The score is returned in a <see cref="NumericMetric"/>
/// with a value between 0.0 and 1.0 where 0.0 represents no match at all and 1.0 indicates a perfect match.
/// By default, the score is interpreted with a pass/fail cutoff of 0.5. So a score of 0.5 or higher is
/// passing and a score below 0.5 is failing.
/// The <see cref="BLEUEvaluator"/> computes the BLEU score of a response ("hypothesis") compared to one or more
/// reference responses supplied via <see cref="BLEUEvaluatorContext.References"/>. The score is returned in a
/// <see cref="NumericMetric"/> with a value between 0.0 and 1.0 where 0.0 represents no match at all and 1.0 indicates
/// a perfect match. By default, the score is interpreted with a pass/fail cutoff of 0.5. So a score of 0.5 or higher
/// is passing and a score below 0.5 is failing.
/// </para>
/// </remarks>
public sealed class BLEUEvaluator : IEvaluator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ namespace Microsoft.Extensions.AI.Evaluation.NLP;
/// Contextual information that the <see cref="BLEUEvaluator"/> uses to compute the BLEU score for a response.
/// </summary>
/// <remarks>
/// <see cref="BLEUEvaluator"/> measures the BLEU score of a response compared to a reference. BLEU (Bilingual Evaluation Understudy)
/// is a metric used to evaluate the quality of machine-generated text.
/// <see cref="BLEUEvaluator"/> measures the BLEU score of a response compared to one or more reference responses
/// supplied via <see cref="References"/>. BLEU (Bilingual Evaluation Understudy) is a metric used to evaluate the
/// quality of machine-generated text.
/// </remarks>
public sealed class BLEUEvaluatorContext : EvaluationContext
{
Expand All @@ -31,7 +32,7 @@ public sealed class BLEUEvaluatorContext : EvaluationContext
/// </summary>
/// <remarks>
/// The <see cref="BLEUEvaluator"/> measures the degree to which the response being evaluated is similar to
/// the response supplied via <see cref="References"/>. The metric will be reported as a BLEU score.
/// the responses supplied via <see cref="References"/>. The metric will be reported as a BLEU score.
/// </remarks>
public IReadOnlyList<string> References { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ namespace Microsoft.Extensions.AI.Evaluation.NLP;
/// </summary>
/// <remarks>
/// <para>
/// The <see cref="GLEUEvaluator"/> computes the GLEU score of a response ("hypothesis") compared to a reference
/// supplied via <see cref="GLEUEvaluatorContext.References"/>. The score is returned in a <see cref="NumericMetric"/>
/// with a value between 0.0 and 1.0 where 0.0 represents no match at all and 1.0 indicates a perfect match.
/// By default, the score is interpreted with a pass/fail cutoff of 0.5. So a score of 0.5 or higher is
/// passing and a score below 0.5 is failing.
/// The <see cref="GLEUEvaluator"/> computes the GLEU score of a response ("hypothesis") compared to one or more
/// reference responses supplied via <see cref="GLEUEvaluatorContext.References"/>. The score is returned in a
/// <see cref="NumericMetric"/> with a value between 0.0 and 1.0 where 0.0 represents no match at all and 1.0 indicates
/// a perfect match. By default, the score is interpreted with a pass/fail cutoff of 0.5. So a score of 0.5 or higher
/// is passing and a score below 0.5 is failing.
/// </para>
/// </remarks>
public sealed class GLEUEvaluator : IEvaluator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ namespace Microsoft.Extensions.AI.Evaluation.NLP;
/// </summary>
/// <remarks>
/// <see cref="GLEUEvaluator"/> measures the GLEU score of a response compared to one or more reference responses
/// supplied via <see cref="References"/>. GLEU (Google-BLEU) is a metric used to evaluate the quality of machine-generated text.
/// supplied via <see cref="References"/>. GLEU (Google-BLEU) is a metric used to evaluate the quality of
/// machine-generated text.
/// </remarks>
public sealed class GLEUEvaluatorContext : EvaluationContext
{
Expand All @@ -27,11 +28,11 @@ public sealed class GLEUEvaluatorContext : EvaluationContext
public static string ReferencesContextName => "References (GLEU)";

/// <summary>
/// Gets the reference against which the provided response will be scored.
/// Gets the references against which the provided response will be scored.
/// </summary>
/// <remarks>
/// The <see cref="GLEUEvaluator"/> measures the degree to which the response being evaluated is similar to
/// the response supplied via <see cref="References"/>. The metric will be reported as a GLEU score.
/// the responses supplied via <see cref="References"/>. The metric will be reported as a GLEU score.
/// </remarks>
public IReadOnlyList<string> References { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed class IntentResolutionEvaluatorContext : EvaluationContext
/// </para>
/// </param>
public IntentResolutionEvaluatorContext(params AITool[] toolDefinitions)
: base(name: IntentResolutionContextName, contents: [new TextContent(toolDefinitions.RenderAsJson())])
: base(name: ToolDefinitionsContextName, contents: [new TextContent(toolDefinitions.RenderAsJson())])
{
ToolDefinitions = [.. toolDefinitions];
}
Expand All @@ -67,7 +67,7 @@ public IntentResolutionEvaluatorContext(IEnumerable<AITool> toolDefinitions)
/// Gets the unique <see cref="EvaluationContext.Name"/> that is used for
/// <see cref="IntentResolutionEvaluatorContext"/>.
/// </summary>
public static string IntentResolutionContextName => "Tool Definitions (Intent Resolution)";
public static string ToolDefinitionsContextName => "Tool Definitions (Intent Resolution)";

/// <summary>
/// Gets set of tool definitions (see <see cref="ChatOptions.Tools"/>) that were used when generating the model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class TaskAdherenceEvaluatorContext : EvaluationContext
/// </para>
/// </param>
public TaskAdherenceEvaluatorContext(params AITool[] toolDefinitions)
: base(name: TaskAdherenceContextName, contents: [new TextContent(toolDefinitions.RenderAsJson())])
: base(name: ToolDefinitionsContextName, contents: [new TextContent(toolDefinitions.RenderAsJson())])
{
ToolDefinitions = [.. toolDefinitions];
}
Expand All @@ -68,7 +68,7 @@ public TaskAdherenceEvaluatorContext(IEnumerable<AITool> toolDefinitions)
/// Gets the unique <see cref="EvaluationContext.Name"/> that is used for
/// <see cref="TaskAdherenceEvaluatorContext"/>.
/// </summary>
public static string TaskAdherenceContextName => "Tool Definitions (Task Adherence)";
public static string ToolDefinitionsContextName => "Tool Definitions (Task Adherence)";

/// <summary>
/// Gets set of tool definitions (see <see cref="ChatOptions.Tools"/>) that were used when generating the model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public sealed class ToolCallAccuracyEvaluatorContext : EvaluationContext
/// </para>
/// </param>
public ToolCallAccuracyEvaluatorContext(params AITool[] toolDefinitions)
: base(name: ToolCallAccuracyContextName, contents: [new TextContent(toolDefinitions.RenderAsJson())])
: base(name: ToolDefinitionsContextName, contents: [new TextContent(toolDefinitions.RenderAsJson())])
{
ToolDefinitions = [.. toolDefinitions];
}
Expand All @@ -69,7 +69,7 @@ public ToolCallAccuracyEvaluatorContext(IEnumerable<AITool> toolDefinitions)
/// Gets the unique <see cref="EvaluationContext.Name"/> that is used for
/// <see cref="ToolCallAccuracyEvaluatorContext"/>.
/// </summary>
public static string ToolCallAccuracyContextName => "Tool Definitions (Tool Call Accuracy)";
public static string ToolDefinitionsContextName => "Tool Definitions (Tool Call Accuracy)";

/// <summary>
/// Gets set of tool definitions (see <see cref="ChatOptions.Tools"/>) that were used when generating the model
Expand Down
Loading