24 instantiations of NumericMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (20)
ResultsTests.cs (20)
325var metricA = new NumericMetric("Metric with value 0", 0); 326var metricB = new NumericMetric("Metric with value 1", 1); 327var metricC = new NumericMetric("Metric with value 2", 2); 328var metricD = new NumericMetric("Metric with value 3", 3); 329var metricE = new NumericMetric("Metric with value 4", 4); 330var metricF = new NumericMetric("Metric with value 5", 5); 331var metricG = new NumericMetric("Metric with value 6", 6); 332var metricH = new NumericMetric("Metric with no value"); 360var metricA = new NumericMetric("Metric with value 0", 0); 361var metricB = new NumericMetric("Metric with value 1", 1); 362var metricC = new NumericMetric("Metric with value 2", 2); 363var metricD = new NumericMetric("Metric with value 3", 3); 364var metricE = new NumericMetric("Metric with value 4", 4); 365var metricF = new NumericMetric("Metric with value 5", 5); 366var metricG = new NumericMetric("Metric with value 6", 6); 367var metricH = new NumericMetric("Metric with no value"); 423var metric5 = new NumericMetric("Metric with informational diagnostics only"); 470var metric5 = new NumericMetric("Metric with informational diagnostics only"); 514var metric3 = new NumericMetric("Metric with error diagnostics only", value: 5); 523var metric5 = new NumericMetric("Metric with informational diagnostics only", value: 4);
Microsoft.Extensions.AI.Evaluation.Quality (1)
SingleNumericMetricEvaluator.cs (1)
54var metric = new NumericMetric(MetricName);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
ResultStoreTester.cs (1)
24NumericMetric numericMetric = new NumericMetric("numeric", value: 3);
ScenarioRunResultTests.cs (2)
24NumericMetric numericMetric = new NumericMetric("numeric", value: 3); 63NumericMetric numericMetric = new NumericMetric("numeric", value: 3);
103 references to NumericMetric
Microsoft.Extensions.AI.Evaluation (6)
EvaluationMetric.cs (1)
18[JsonDerivedType(typeof(NumericMetric), "numeric")]
NumericMetric.cs (5)
11/// <see cref="NumericMetric"/> can be used to represent any numeric value. The underlying type of a 12/// <see cref="NumericMetric"/>'s value is <see langword="double"/>. However, it can be used to represent any type of 16/// A common use case for <see cref="NumericMetric"/> is to represent numeric scores that fall within a well defined 21/// <param name="name">The name of the <see cref="NumericMetric"/>.</param> 22/// <param name="value">The value of the <see cref="NumericMetric"/>.</param>
Microsoft.Extensions.AI.Evaluation.Integration.Tests (61)
AdditionalContextTests.cs (7)
74result.TryGet(EquivalenceEvaluator.EquivalenceMetricName, out NumericMetric? _).Should().BeFalse(); 76NumericMetric groundedness = result.Get<NumericMetric>(GroundednessEvaluator.GroundednessMetricName); 127NumericMetric equivalence = result.Get<NumericMetric>(EquivalenceEvaluator.EquivalenceMetricName); 130NumericMetric groundedness = result.Get<NumericMetric>(GroundednessEvaluator.GroundednessMetricName);
EndToEndTests.cs (20)
81NumericMetric relevance = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName); 82NumericMetric truth = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName); 83NumericMetric completeness = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName); 89NumericMetric coherence = result.Get<NumericMetric>(CoherenceEvaluator.CoherenceMetricName); 92NumericMetric fluency = result.Get<NumericMetric>(FluencyEvaluator.FluencyMetricName); 132NumericMetric relevance = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName); 133NumericMetric truth = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName); 134NumericMetric completeness = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName); 140NumericMetric coherence = result.Get<NumericMetric>(CoherenceEvaluator.CoherenceMetricName); 143NumericMetric fluency = result.Get<NumericMetric>(FluencyEvaluator.FluencyMetricName);
RelevanceTruthAndCompletenessEvaluatorTests.cs (12)
78NumericMetric relevance = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName); 79NumericMetric truth = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName); 80NumericMetric completeness = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName); 111NumericMetric relevance = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName); 112NumericMetric truth = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName); 113NumericMetric completeness = result.Get<NumericMetric>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName);
ResultsTests.cs (22)
64case NumericMetric numericMetric: 100(m is NumericMetric s && s.Value is not null) || 325var metricA = new NumericMetric("Metric with value 0", 0); 326var metricB = new NumericMetric("Metric with value 1", 1); 327var metricC = new NumericMetric("Metric with value 2", 2); 328var metricD = new NumericMetric("Metric with value 3", 3); 329var metricE = new NumericMetric("Metric with value 4", 4); 330var metricF = new NumericMetric("Metric with value 5", 5); 331var metricG = new NumericMetric("Metric with value 6", 6); 332var metricH = new NumericMetric("Metric with no value"); 360var metricA = new NumericMetric("Metric with value 0", 0); 361var metricB = new NumericMetric("Metric with value 1", 1); 362var metricC = new NumericMetric("Metric with value 2", 2); 363var metricD = new NumericMetric("Metric with value 3", 3); 364var metricE = new NumericMetric("Metric with value 4", 4); 365var metricF = new NumericMetric("Metric with value 5", 5); 366var metricG = new NumericMetric("Metric with value 6", 6); 367var metricH = new NumericMetric("Metric with no value"); 423var metric5 = new NumericMetric("Metric with informational diagnostics only"); 470var metric5 = new NumericMetric("Metric with informational diagnostics only"); 514var metric3 = new NumericMetric("Metric with error diagnostics only", value: 5); 523var metric5 = new NumericMetric("Metric with informational diagnostics only", value: 4);
Microsoft.Extensions.AI.Evaluation.Quality (29)
CoherenceEvaluator.cs (2)
14/// <see cref="CoherenceEvaluator"/> returns a <see cref="NumericMetric"/> that contains a score for 'Coherence'. The 20/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by
EquivalenceEvaluator.cs (2)
18/// <see cref="NumericMetric"/> that contains a score for the 'Equivalence'. The score is a number between 1 and 5, 24/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by
EvaluationMetricExtensions.cs (1)
8internal static EvaluationMetricInterpretation InterpretScore(this NumericMetric metric)
FluencyEvaluator.cs (2)
14/// <see cref="FluencyEvaluator"/> returns a <see cref="NumericMetric"/> that contains a score for 'Fluency'. The score 20/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by
GroundednessEvaluator.cs (2)
18/// <see cref="NumericMetric"/> that contains a score for the 'Groundedness'. The score is a number between 1 and 5, 24/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by
RelevanceTruthAndCompletenessEvaluator.cs (13)
23/// <see cref="RelevanceTruthAndCompletenessEvaluator"/> returns three <see cref="NumericMetric"/>s that contain scores 32/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by 38/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by 44/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> returned by 69var relevance = new NumericMetric(RelevanceMetricName); 70var truth = new NumericMetric(TruthMetricName); 71var completeness = new NumericMetric(CompletenessMetricName); 182NumericMetric relevance = result.Get<NumericMetric>(RelevanceMetricName); 190NumericMetric truth = result.Get<NumericMetric>(TruthMetricName); 198NumericMetric completeness = result.Get<NumericMetric>(CompletenessMetricName);
RelevanceTruthAndCompletenessEvaluatorOptions.cs (2)
18/// part of the returned <see cref="NumericMetric"/>s for 'Relevance' 'Truth' and 'Completeness' that explain the 37/// <see cref="NumericMetric"/>s for 'Relevance' 'Truth' and 'Completeness' to explain the reasoning behind the
SingleNumericMetricEvaluator.cs (5)
13/// produces an <see cref="EvaluationResult"/> containing a single <see cref="NumericMetric"/>. 21/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="NumericMetric"/> produced by this 54var metric = new NumericMetric(MetricName); 76NumericMetric metric = result.Get<NumericMetric>(MetricName);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
ResultStoreTester.cs (1)
24NumericMetric numericMetric = new NumericMetric("numeric", value: 3);
ScenarioRunResultTests.cs (6)
24NumericMetric numericMetric = new NumericMetric("numeric", value: 3); 63NumericMetric numericMetric = new NumericMetric("numeric", value: 3); 132NumericMetric numericMetric = first.Get<NumericMetric>("numeric"); 133NumericMetric deserializedNumericMetric = second.Get<NumericMetric>("numeric");