31 instantiations of StringMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (25)
ResultsTests.cs (25)
230
var metricA = new
StringMetric
("Measurement System: None", "None");
231
var metricB = new
StringMetric
("Measurement System: Unknown", "Unknown");
232
var metricC = new
StringMetric
("Measurement System: Metric", "Metric");
233
var metricD = new
StringMetric
("Measurement System: Imperial", "Imperial");
234
var metricE = new
StringMetric
("Measurement System: USCustomary", "UsCustomary");
235
var metricF = new
StringMetric
("Measurement System: Nautical", "Nautical");
236
var metricG = new
StringMetric
("Measurement System: Astronomical", "Astronomical");
237
var metricH = new
StringMetric
("Measurement System: Multiple", "Multiple");
238
var metricI = new
StringMetric
("Measurement System: Blah", "Blah", reason: "Value was unexpected");
239
var metricJ = new
StringMetric
("Measurement System: Empty", "", reason: "Value was empty");
240
var metricK = new
StringMetric
("Measurement System: Null", reason: "Value was null");
286
var metricA = new
StringMetric
("Measurement System: None", "None");
287
var metricB = new
StringMetric
("Measurement System: Unknown", "Unknown");
288
var metricC = new
StringMetric
("Measurement System: Metric", "Metric");
289
var metricD = new
StringMetric
("Measurement System: Imperial", "Imperial");
290
var metricE = new
StringMetric
("Measurement System: USCustomary", "USCustomary");
291
var metricF = new
StringMetric
("Measurement System: Nautical", "Nautical");
292
var metricG = new
StringMetric
("Measurement System: Astronomical", "Astronomical");
293
var metricH = new
StringMetric
("Measurement System: Multiple", "Multiple");
294
var metricI = new
StringMetric
("Measurement System: Blah", "Blah", reason: "Value was unexpected");
295
var metricJ = new
StringMetric
("Measurement System: Empty", "", reason: "Value was empty");
296
var metricK = new
StringMetric
("Measurement System: Null", reason: "Value was null");
440
var metric4 = new
StringMetric
("Metric with warning diagnostics only");
493
var metric4 = new
StringMetric
("Metric with warning diagnostics only");
552
var metric4 = new
StringMetric
("Metric with warning diagnostics only", value: "A");
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
ResultStoreTester.cs (1)
27
StringMetric stringMetric = new
StringMetric
("string", value: "Good");
ScenarioRunResultTests.cs (2)
55
var stringMetric = new
StringMetric
("string", value: "A", reason: string.Empty);
147
var stringMetric = new
StringMetric
("string", value: "A", reason: string.Empty);
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (2)
98
metric = new
StringMetric
(metricName, stringValue, reason);
104
metric = new
StringMetric
(metricName, labelElement.ToString(), reason);
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInMetricUtilitiesTests.cs (1)
45
var metric = new
StringMetric
("name");
40 references to StringMetric
Microsoft.Extensions.AI.Evaluation (5)
EvaluationMetric.cs (1)
19
[JsonDerivedType(typeof(
StringMetric
), "string")]
StringMetric.cs (4)
10
/// A common use case for <see cref="
StringMetric
"/> is to represent a single value in an enumeration (or to represent
13
/// <param name="name">The name of the <see cref="
StringMetric
"/>.</param>
14
/// <param name="value">The value of the <see cref="
StringMetric
"/>.</param>
17
/// <see cref="
StringMetric
"/>.
Microsoft.Extensions.AI.Evaluation.Integration.Tests (27)
ResultsTests.cs (27)
109
(m is
StringMetric
e && e.Value is not null)
128
if (m is not
StringMetric
e)
230
var
metricA = new StringMetric("Measurement System: None", "None");
231
var
metricB = new StringMetric("Measurement System: Unknown", "Unknown");
232
var
metricC = new StringMetric("Measurement System: Metric", "Metric");
233
var
metricD = new StringMetric("Measurement System: Imperial", "Imperial");
234
var
metricE = new StringMetric("Measurement System: USCustomary", "UsCustomary");
235
var
metricF = new StringMetric("Measurement System: Nautical", "Nautical");
236
var
metricG = new StringMetric("Measurement System: Astronomical", "Astronomical");
237
var
metricH = new StringMetric("Measurement System: Multiple", "Multiple");
238
var
metricI = new StringMetric("Measurement System: Blah", "Blah", reason: "Value was unexpected");
239
var
metricJ = new StringMetric("Measurement System: Empty", "", reason: "Value was empty");
240
var
metricK = new StringMetric("Measurement System: Null", reason: "Value was null");
286
var
metricA = new StringMetric("Measurement System: None", "None");
287
var
metricB = new StringMetric("Measurement System: Unknown", "Unknown");
288
var
metricC = new StringMetric("Measurement System: Metric", "Metric");
289
var
metricD = new StringMetric("Measurement System: Imperial", "Imperial");
290
var
metricE = new StringMetric("Measurement System: USCustomary", "USCustomary");
291
var
metricF = new StringMetric("Measurement System: Nautical", "Nautical");
292
var
metricG = new StringMetric("Measurement System: Astronomical", "Astronomical");
293
var
metricH = new StringMetric("Measurement System: Multiple", "Multiple");
294
var
metricI = new StringMetric("Measurement System: Blah", "Blah", reason: "Value was unexpected");
295
var
metricJ = new StringMetric("Measurement System: Empty", "", reason: "Value was empty");
296
var
metricK = new StringMetric("Measurement System: Null", reason: "Value was null");
440
var
metric4 = new StringMetric("Metric with warning diagnostics only");
493
var
metric4 = new StringMetric("Metric with warning diagnostics only");
552
var
metric4 = new StringMetric("Metric with warning diagnostics only", value: "A");
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
ResultStoreTester.cs (1)
27
StringMetric
stringMetric = new StringMetric("string", value: "Good");
ScenarioRunResultTests.cs (6)
55
var
stringMetric = new StringMetric("string", value: "A", reason: string.Empty);
147
var
stringMetric = new StringMetric("string", value: "A", reason: string.Empty);
245
StringMetric
stringMetric = first.Get<
StringMetric
>("string");
246
StringMetric
deserializedStringMetric = second.Get<
StringMetric
>("string");
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInMetricUtilitiesTests.cs (1)
45
var
metric = new StringMetric("name");