24 instantiations of NumericMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (20)
ResultsTests.cs (20)
325
var metricA = new
NumericMetric
("Metric with value 0", 0);
326
var metricB = new
NumericMetric
("Metric with value 1", 1);
327
var metricC = new
NumericMetric
("Metric with value 2", 2);
328
var metricD = new
NumericMetric
("Metric with value 3", 3);
329
var metricE = new
NumericMetric
("Metric with value 4", 4);
330
var metricF = new
NumericMetric
("Metric with value 5", 5);
331
var metricG = new
NumericMetric
("Metric with value 6", 6);
332
var metricH = new
NumericMetric
("Metric with no value");
360
var metricA = new
NumericMetric
("Metric with value 0", 0);
361
var metricB = new
NumericMetric
("Metric with value 1", 1);
362
var metricC = new
NumericMetric
("Metric with value 2", 2);
363
var metricD = new
NumericMetric
("Metric with value 3", 3);
364
var metricE = new
NumericMetric
("Metric with value 4", 4);
365
var metricF = new
NumericMetric
("Metric with value 5", 5);
366
var metricG = new
NumericMetric
("Metric with value 6", 6);
367
var metricH = new
NumericMetric
("Metric with no value");
423
var metric5 = new
NumericMetric
("Metric with informational diagnostics only");
470
var metric5 = new
NumericMetric
("Metric with informational diagnostics only");
514
var metric3 = new
NumericMetric
("Metric with error diagnostics only", value: 5);
523
var metric5 = new
NumericMetric
("Metric with informational diagnostics only", value: 4);
Microsoft.Extensions.AI.Evaluation.Quality (1)
SingleNumericMetricEvaluator.cs (1)
54
var metric = new
NumericMetric
(MetricName);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
ResultStoreTester.cs (1)
24
NumericMetric numericMetric = new
NumericMetric
("numeric", value: 3);
ScenarioRunResultTests.cs (2)
24
NumericMetric numericMetric = new
NumericMetric
("numeric", value: 3);
63
NumericMetric 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)
74
result.TryGet(EquivalenceEvaluator.EquivalenceMetricName, out
NumericMetric
? _).Should().BeFalse();
76
NumericMetric
groundedness = result.Get<
NumericMetric
>(GroundednessEvaluator.GroundednessMetricName);
127
NumericMetric
equivalence = result.Get<
NumericMetric
>(EquivalenceEvaluator.EquivalenceMetricName);
130
NumericMetric
groundedness = result.Get<
NumericMetric
>(GroundednessEvaluator.GroundednessMetricName);
EndToEndTests.cs (20)
81
NumericMetric
relevance = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName);
82
NumericMetric
truth = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName);
83
NumericMetric
completeness = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName);
89
NumericMetric
coherence = result.Get<
NumericMetric
>(CoherenceEvaluator.CoherenceMetricName);
92
NumericMetric
fluency = result.Get<
NumericMetric
>(FluencyEvaluator.FluencyMetricName);
132
NumericMetric
relevance = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName);
133
NumericMetric
truth = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName);
134
NumericMetric
completeness = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName);
140
NumericMetric
coherence = result.Get<
NumericMetric
>(CoherenceEvaluator.CoherenceMetricName);
143
NumericMetric
fluency = result.Get<
NumericMetric
>(FluencyEvaluator.FluencyMetricName);
RelevanceTruthAndCompletenessEvaluatorTests.cs (12)
78
NumericMetric
relevance = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName);
79
NumericMetric
truth = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName);
80
NumericMetric
completeness = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName);
111
NumericMetric
relevance = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.RelevanceMetricName);
112
NumericMetric
truth = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.TruthMetricName);
113
NumericMetric
completeness = result.Get<
NumericMetric
>(RelevanceTruthAndCompletenessEvaluator.CompletenessMetricName);
ResultsTests.cs (22)
64
case
NumericMetric
numericMetric:
100
(m is
NumericMetric
s && s.Value is not null) ||
325
var
metricA = new NumericMetric("Metric with value 0", 0);
326
var
metricB = new NumericMetric("Metric with value 1", 1);
327
var
metricC = new NumericMetric("Metric with value 2", 2);
328
var
metricD = new NumericMetric("Metric with value 3", 3);
329
var
metricE = new NumericMetric("Metric with value 4", 4);
330
var
metricF = new NumericMetric("Metric with value 5", 5);
331
var
metricG = new NumericMetric("Metric with value 6", 6);
332
var
metricH = new NumericMetric("Metric with no value");
360
var
metricA = new NumericMetric("Metric with value 0", 0);
361
var
metricB = new NumericMetric("Metric with value 1", 1);
362
var
metricC = new NumericMetric("Metric with value 2", 2);
363
var
metricD = new NumericMetric("Metric with value 3", 3);
364
var
metricE = new NumericMetric("Metric with value 4", 4);
365
var
metricF = new NumericMetric("Metric with value 5", 5);
366
var
metricG = new NumericMetric("Metric with value 6", 6);
367
var
metricH = new NumericMetric("Metric with no value");
423
var
metric5 = new NumericMetric("Metric with informational diagnostics only");
470
var
metric5 = new NumericMetric("Metric with informational diagnostics only");
514
var
metric3 = new NumericMetric("Metric with error diagnostics only", value: 5);
523
var
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)
8
internal 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
69
var
relevance = new NumericMetric(RelevanceMetricName);
70
var
truth = new NumericMetric(TruthMetricName);
71
var
completeness = new NumericMetric(CompletenessMetricName);
182
NumericMetric
relevance = result.Get<
NumericMetric
>(RelevanceMetricName);
190
NumericMetric
truth = result.Get<
NumericMetric
>(TruthMetricName);
198
NumericMetric
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
54
var
metric = new NumericMetric(MetricName);
76
NumericMetric
metric = result.Get<
NumericMetric
>(MetricName);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
ResultStoreTester.cs (1)
24
NumericMetric
numericMetric = new NumericMetric("numeric", value: 3);
ScenarioRunResultTests.cs (6)
24
NumericMetric
numericMetric = new NumericMetric("numeric", value: 3);
63
NumericMetric
numericMetric = new NumericMetric("numeric", value: 3);
132
NumericMetric
numericMetric = first.Get<
NumericMetric
>("numeric");
133
NumericMetric
deserializedNumericMetric = second.Get<
NumericMetric
>("numeric");