120 references to EvaluationDiagnostic
Microsoft.Extensions.AI.Evaluation (47)
CompositeEvaluator.cs (1)
162metric.AddDiagnostics(EvaluationDiagnostic.Error(message));
EvaluationDiagnostic.cs (18)
17/// <see cref="EvaluationDiagnostic"/>. 20/// An error, warning or informational message describing the <see cref="EvaluationDiagnostic"/>. 26/// <see cref="EvaluationDiagnostic"/>. 31/// Gets or sets an error, warning or informational message describing the <see cref="EvaluationDiagnostic"/>. 36/// Returns an <see cref="EvaluationDiagnostic"/> with the supplied <paramref name="message"/> and with 39/// <param name="message">An informational message describing the <see cref="EvaluationDiagnostic"/>.</param> 41/// An <see cref="EvaluationDiagnostic"/> with <see cref="Severity"/> set to 44public static EvaluationDiagnostic Informational(string message) 48/// Returns an <see cref="EvaluationDiagnostic"/> with the supplied <paramref name="message"/> and with 51/// <param name="message">A warning message describing the <see cref="EvaluationDiagnostic"/>.</param> 53/// An <see cref="EvaluationDiagnostic"/> with <see cref="Severity"/> set to 56public static EvaluationDiagnostic Warning(string message) 60/// Returns an <see cref="EvaluationDiagnostic"/> with the supplied <paramref name="message"/> and with 63/// <param name="message">An error message describing the <see cref="EvaluationDiagnostic"/>.</param> 65/// An <see cref="EvaluationDiagnostic"/> with <see cref="Severity"/> set to 68public static EvaluationDiagnostic Error(string message) 71/// <summary>Returns a string representation of the <see cref="EvaluationDiagnostic"/>.</summary> 72/// <returns>A string representation of the <see cref="EvaluationDiagnostic"/>.</returns>
EvaluationDiagnosticSeverity.cs (4)
7/// An enumeration that identifies the set of possible values for <see cref="EvaluationDiagnostic.Severity"/>. 12/// A value that indicates that the <see cref="EvaluationDiagnostic"/> is informational. 17/// A value that indicates that the <see cref="EvaluationDiagnostic"/> represents a warning. 22/// A value that indicates that the <see cref="EvaluationDiagnostic"/> represents an error.
EvaluationMetric.cs (2)
66/// Gets or sets a collection of zero or more <see cref="EvaluationDiagnostic"/>s associated with the current 69public IList<EvaluationDiagnostic>? Diagnostics { get; set; }
EvaluationMetricExtensions.cs (13)
43/// <see cref="EvaluationDiagnostic"/> matching the supplied <paramref name="predicate"/>. 47/// A predicate that returns <see langword="true"/> if a matching <see cref="EvaluationDiagnostic"/> is found; 52/// <see cref="EvaluationDiagnostic"/> matching the supplied <paramref name="predicate"/>; <see langword="false"/> 57Func<EvaluationDiagnostic, bool>? predicate = null) 69/// Adds the supplied <see cref="EvaluationDiagnostic"/>s to the supplied <see cref="EvaluationMetric"/>'s 73/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s to be added.</param> 74public static void AddDiagnostics(this EvaluationMetric metric, IEnumerable<EvaluationDiagnostic> diagnostics) 81metric.Diagnostics ??= new List<EvaluationDiagnostic>(); 83foreach (EvaluationDiagnostic diagnostic in diagnostics) 91/// Adds the supplied <see cref="EvaluationDiagnostic"/>s to the supplied <see cref="EvaluationMetric"/>'s 95/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s to be added.</param> 96public static void AddDiagnostics(this EvaluationMetric metric, params EvaluationDiagnostic[] diagnostics) 97=> metric.AddDiagnostics(diagnostics as IEnumerable<EvaluationDiagnostic>);
EvaluationResultExtensions.cs (9)
60/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s that are to be added.</param> 61public static void AddDiagnosticsToAllMetrics(this EvaluationResult result, IEnumerable<EvaluationDiagnostic> diagnostics) 78/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s that are to be added.</param> 79public static void AddDiagnosticsToAllMetrics(this EvaluationResult result, params EvaluationDiagnostic[] diagnostics) 80=> AddDiagnosticsToAllMetrics(result, diagnostics as IEnumerable<EvaluationDiagnostic>); 84/// <paramref name="result"/> contains an <see cref="EvaluationDiagnostic"/> matching the supplied 89/// A predicate that returns <see langword="true"/> if a matching <see cref="EvaluationDiagnostic"/> is found; 94/// <paramref name="result"/> contains an <see cref="EvaluationDiagnostic"/> matching the supplied 99Func<EvaluationDiagnostic, bool>? predicate = null)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (39)
ResultsTests.cs (39)
422metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 423metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 424metric1.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 425metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 426metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 430metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 431metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 432metric2.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 436metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 437metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 442metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 443metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 447metric5.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 475metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 476metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 477metric1.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 478metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 479metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 483metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 484metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 485metric2.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 489metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 490metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 495metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 496metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 500metric5.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 534metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 535metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 536metric1.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 537metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 538metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 542metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 543metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 544metric2.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 548metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 549metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 554metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 555metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 559metric5.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1"));
Microsoft.Extensions.AI.Evaluation.Quality (10)
ChatConversationEvaluator.cs (4)
52EvaluationDiagnostic.Error( 71EvaluationDiagnostic tokenBudgetExceeded = 72EvaluationDiagnostic.Error( 179EvaluationDiagnostic.Warning(
RelevanceTruthAndCompletenessEvaluator.cs (4)
149EvaluationDiagnostic.Error( 172EvaluationDiagnostic.Error( 187EvaluationDiagnostic.Error( 284result.AddDiagnosticsToAllMetrics(EvaluationDiagnostic.Error(rating.Error!));
SingleNumericMetricEvaluator.cs (2)
109EvaluationDiagnostic.Error( 119EvaluationDiagnostic.Error(
Microsoft.Extensions.AI.Evaluation.Reporting (4)
ScenarioRunResultExtensions.cs (4)
16/// <paramref name="result"/> contains an <see cref="EvaluationDiagnostic"/> matching the supplied 21/// A predicate that returns <see langword="true"/> if a matching <see cref="EvaluationDiagnostic"/> is found; 26/// <paramref name="result"/> contains an <see cref="EvaluationDiagnostic"/> matching the supplied 31Func<EvaluationDiagnostic, bool>? predicate = null)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (15)
ResultStoreTester.cs (1)
25numericMetric.AddDiagnostics(EvaluationDiagnostic.Informational("Informational Message"));
ScenarioRunResultTests.cs (14)
21booleanMetric.AddDiagnostics(EvaluationDiagnostic.Error("error")); 22booleanMetric.AddDiagnostics(EvaluationDiagnostic.Warning("warning")); 25numericMetric.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 30metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Error("error")); 31metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 85booleanMetric.AddDiagnostics(EvaluationDiagnostic.Error("error")); 86booleanMetric.AddDiagnostics(EvaluationDiagnostic.Warning("warning")); 89numericMetric.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 94metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Error("error")); 95metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 240private class DiagnosticComparer : IEqualityComparer<EvaluationDiagnostic> 244public bool Equals(EvaluationDiagnostic? x, EvaluationDiagnostic? y) 247public int GetHashCode(EvaluationDiagnostic obj)
Microsoft.Extensions.AI.Evaluation.Safety (5)
ContentSafetyEvaluator.cs (1)
103IReadOnlyList<EvaluationDiagnostic>? diagnostics;
ContentSafetyServicePayloadUtilities.cs (3)
15internal static (string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) GetPayload( 78private static (string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) 94List<EvaluationDiagnostic>? diagnostics;
EvaluationMetricExtensions.cs (1)
100metric.AddDiagnostics(EvaluationDiagnostic.Informational(serializedData));