3 instantiations of EvaluationDiagnostic
Microsoft.Extensions.AI.Evaluation (3)
EvaluationDiagnostic.cs (3)
45=> new EvaluationDiagnostic(EvaluationDiagnosticSeverity.Informational, message); 57=> new EvaluationDiagnostic(EvaluationDiagnosticSeverity.Warning, message); 69=> new EvaluationDiagnostic(EvaluationDiagnosticSeverity.Error, message);
144 references to EvaluationDiagnostic
Microsoft.Extensions.AI.Evaluation (47)
CompositeEvaluator.cs (1)
161metric.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)
58/// Gets or sets a collection of zero or more <see cref="EvaluationDiagnostic"/>s associated with the current 61public IList<EvaluationDiagnostic>? Diagnostics { get; set; }
EvaluationMetricExtensions.cs (13)
50/// <see cref="EvaluationDiagnostic"/> matching the supplied <paramref name="predicate"/>. 54/// A predicate that returns <see langword="true"/> if a matching <see cref="EvaluationDiagnostic"/> is found; 59/// <see cref="EvaluationDiagnostic"/> matching the supplied <paramref name="predicate"/>; <see langword="false"/> 64Func<EvaluationDiagnostic, bool>? predicate = null) 76/// Adds the supplied <see cref="EvaluationDiagnostic"/>s to the supplied <see cref="EvaluationMetric"/>'s 80/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s to be added.</param> 81public static void AddDiagnostics(this EvaluationMetric metric, IEnumerable<EvaluationDiagnostic> diagnostics) 88metric.Diagnostics ??= new List<EvaluationDiagnostic>(); 90foreach (EvaluationDiagnostic diagnostic in diagnostics) 98/// Adds the supplied <see cref="EvaluationDiagnostic"/>s to the supplied <see cref="EvaluationMetric"/>'s 102/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s to be added.</param> 103public static void AddDiagnostics(this EvaluationMetric metric, params EvaluationDiagnostic[] diagnostics) 104=> metric.AddDiagnostics(diagnostics as IEnumerable<EvaluationDiagnostic>);
EvaluationResultExtensions.cs (9)
54/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s that are to be added.</param> 55public static void AddDiagnosticsToAllMetrics(this EvaluationResult result, IEnumerable<EvaluationDiagnostic> diagnostics) 72/// <param name="diagnostics">The <see cref="EvaluationDiagnostic"/>s that are to be added.</param> 73public static void AddDiagnosticsToAllMetrics(this EvaluationResult result, params EvaluationDiagnostic[] diagnostics) 74=> AddDiagnosticsToAllMetrics(result, diagnostics as IEnumerable<EvaluationDiagnostic>); 78/// <paramref name="result"/> contains an <see cref="EvaluationDiagnostic"/> matching the supplied 83/// A predicate that returns <see langword="true"/> if a matching <see cref="EvaluationDiagnostic"/> is found; 88/// <paramref name="result"/> contains an <see cref="EvaluationDiagnostic"/> matching the supplied 93Func<EvaluationDiagnostic, bool>? predicate = null)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (39)
ResultsTests.cs (39)
423metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 424metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 425metric1.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 426metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 427metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 431metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 432metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 433metric2.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 437metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 438metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 443metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 444metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 448metric5.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 476metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 477metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 478metric1.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 479metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 480metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 484metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 485metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 486metric2.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 490metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 491metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 496metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 497metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 501metric5.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 535metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 536metric1.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 537metric1.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 538metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1")); 539metric1.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 543metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 544metric2.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 545metric2.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 2")); 549metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 1")); 550metric3.AddDiagnostics(EvaluationDiagnostic.Error("Error 2")); 555metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 1")); 556metric4.AddDiagnostics(EvaluationDiagnostic.Warning("Warning 2")); 560metric5.AddDiagnostics(EvaluationDiagnostic.Informational("Informational 1"));
Microsoft.Extensions.AI.Evaluation.Quality (22)
CoherenceEvaluator.cs (1)
83EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty."));
CompletenessEvaluator.cs (2)
80EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty.")); 89EvaluationDiagnostic.Error(
EquivalenceEvaluator.cs (2)
79EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty.")); 88EvaluationDiagnostic.Error(
EvaluationMetricExtensions.cs (4)
59metric.AddDiagnostics(EvaluationDiagnostic.Informational( 71EvaluationDiagnostic.Error( 119EvaluationDiagnostic.Error( 137EvaluationDiagnostic.Error(
FluencyEvaluator.cs (1)
77EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty."));
GroundednessEvaluator.cs (2)
78EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty.")); 87EvaluationDiagnostic.Error(
RelevanceEvaluator.cs (2)
82EvaluationDiagnostic.Error( 91EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty."));
RelevanceTruthAndCompletenessEvaluator.cs (6)
99EvaluationDiagnostic.Error( 108EvaluationDiagnostic.Error($"The {nameof(modelResponse)} supplied for evaluation was null or empty.")); 281EvaluationDiagnostic.Error("The model failed to produce a valid evaluation response.")); 303EvaluationDiagnostic.Error( 318EvaluationDiagnostic.Error( 382result.AddDiagnosticsToAllMetrics(EvaluationDiagnostic.Error(rating.Error!));
RetrievalEvaluator.cs (2)
87EvaluationDiagnostic.Error( 97EvaluationDiagnostic.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)
40booleanMetric.AddDiagnostics(EvaluationDiagnostic.Error("error")); 41booleanMetric.AddDiagnostics(EvaluationDiagnostic.Warning("warning")); 51numericMetric.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 59metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Error("error")); 60metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 131booleanMetric.AddDiagnostics(EvaluationDiagnostic.Error("error")); 132booleanMetric.AddDiagnostics(EvaluationDiagnostic.Warning("warning")); 142numericMetric.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 150metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Error("error")); 151metricWithNoValue.AddDiagnostics(EvaluationDiagnostic.Informational("info")); 377private class DiagnosticComparer : IEqualityComparer<EvaluationDiagnostic> 381public bool Equals(EvaluationDiagnostic? x, EvaluationDiagnostic? y) 384public int GetHashCode(EvaluationDiagnostic obj)
Microsoft.Extensions.AI.Evaluation.Safety (17)
ContentSafetyEvaluator.cs (1)
132(string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) =
ContentSafetyServicePayloadUtilities.cs (15)
15internal static (string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) GetPayload( 78private static (string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) 94List<EvaluationDiagnostic>? diagnostics; 166private static (string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) 188List<EvaluationDiagnostic>? diagnostics; 249private static (string payload, IReadOnlyList<EvaluationDiagnostic>? diagnostics) GetConversationPayload( 266List<EvaluationDiagnostic>? diagnostics; 390List<EvaluationDiagnostic>? diagnostics, 490List<EvaluationDiagnostic>? diagnostics = null; 495EvaluationDiagnostic.Warning( 505EvaluationDiagnostic.Warning( 517EvaluationDiagnostic.Warning( 526EvaluationDiagnostic.Warning( 541EvaluationDiagnostic.Warning( 555EvaluationDiagnostic.Warning(
EvaluationMetricExtensions.cs (1)
100metric.AddDiagnostics(EvaluationDiagnostic.Informational(serializedData));