20 instantiations of BooleanMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (15)
ResultsTests.cs (15)
160
var metricA = new
BooleanMetric
("Metric with value false", false);
161
var metricB = new
BooleanMetric
("Metric with value true", true);
162
var metricC = new
BooleanMetric
("Metric without value");
163
var metricD = new
BooleanMetric
("Metric with reason", false, reason: "The reason");
188
var metricA = new
BooleanMetric
("Metric with value false", false);
189
var metricB = new
BooleanMetric
("Metric with value true", true);
190
var metricC = new
BooleanMetric
("Metric without value");
191
var metricD = new
BooleanMetric
("Metric with reason", false, reason: "The reason");
422
var metric1 = new
BooleanMetric
("Metric with all diagnostic severities");
430
var metric2 = new
BooleanMetric
("Metric with warning and informational diagnostics");
475
var metric1 = new
BooleanMetric
("Metric with all diagnostic severities");
483
var metric2 = new
BooleanMetric
("Metric with warning and informational diagnostics");
534
var metric1 = new
BooleanMetric
("Metric with all diagnostic severities", value: true);
542
var metric2 = new
BooleanMetric
("Metric with warning and informational diagnostics", value: true);
593
var metric = new
BooleanMetric
("Condition", true);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
ResultStoreTester.cs (1)
22
BooleanMetric booleanMetric = new
BooleanMetric
("boolean", value: true);
ScenarioRunResultTests.cs (2)
34
var booleanMetric = new
BooleanMetric
("boolean", value: true, reason: "reason1")
125
var booleanMetric = new
BooleanMetric
("boolean", value: true, reason: "reason1")
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (2)
90
metric = new
BooleanMetric
(metricName, booleanValue, reason);
101
metric = new
BooleanMetric
(metricName, booleanValue, reason);
70 references to BooleanMetric
Microsoft.Extensions.AI.Evaluation (4)
BooleanMetric.cs (3)
10
/// <param name="name">The name of the <see cref="
BooleanMetric
"/>.</param>
11
/// <param name="value">The value of the <see cref="
BooleanMetric
"/>.</param>
14
/// <see cref="
BooleanMetric
"/>.
EvaluationMetric.cs (1)
23
[JsonDerivedType(typeof(
BooleanMetric
), "boolean")]
Microsoft.Extensions.AI.Evaluation.Integration.Tests (45)
ResultsTests.cs (17)
47
case
BooleanMetric
booleanMetric:
110
(m is
BooleanMetric
b && b.Value is not null) ||
160
var
metricA = new BooleanMetric("Metric with value false", false);
161
var
metricB = new BooleanMetric("Metric with value true", true);
162
var
metricC = new BooleanMetric("Metric without value");
163
var
metricD = new BooleanMetric("Metric with reason", false, reason: "The reason");
188
var
metricA = new BooleanMetric("Metric with value false", false);
189
var
metricB = new BooleanMetric("Metric with value true", true);
190
var
metricC = new BooleanMetric("Metric without value");
191
var
metricD = new BooleanMetric("Metric with reason", false, reason: "The reason");
422
var
metric1 = new BooleanMetric("Metric with all diagnostic severities");
430
var
metric2 = new BooleanMetric("Metric with warning and informational diagnostics");
475
var
metric1 = new BooleanMetric("Metric with all diagnostic severities");
483
var
metric2 = new BooleanMetric("Metric with warning and informational diagnostics");
534
var
metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true);
542
var
metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true);
593
var
metric = new BooleanMetric("Condition", true);
SafetyEvaluatorTests.cs (28)
169
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out
BooleanMetric
? _));
171
Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out
BooleanMetric
? ungroundedAttributes));
172
Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out
BooleanMetric
? _));
244
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out
BooleanMetric
? _));
246
Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out
BooleanMetric
? ungroundedAttributes));
247
Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out
BooleanMetric
? _));
289
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out
BooleanMetric
? _));
290
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out
BooleanMetric
? _));
291
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out
BooleanMetric
? _));
292
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out
BooleanMetric
? _));
293
Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out
BooleanMetric
? _));
325
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out
BooleanMetric
? _));
326
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out
BooleanMetric
? _));
327
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out
BooleanMetric
? _));
328
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out
BooleanMetric
? _));
329
Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out
BooleanMetric
? _));
374
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out
BooleanMetric
? _));
375
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out
BooleanMetric
? _));
376
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out
BooleanMetric
? _));
377
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out
BooleanMetric
? _));
378
Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out
BooleanMetric
? _));
436
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out
BooleanMetric
? _));
437
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out
BooleanMetric
? _));
438
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out
BooleanMetric
? _));
439
Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out
BooleanMetric
? _));
440
Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out
BooleanMetric
? _));
469
Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out
BooleanMetric
? _));
510
Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out
BooleanMetric
? _));
Microsoft.Extensions.AI.Evaluation.Quality (1)
EvaluationMetricExtensions.cs (1)
128
case
BooleanMetric
booleanMetric:
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
ResultStoreTester.cs (1)
22
BooleanMetric
booleanMetric = new BooleanMetric("boolean", value: true);
ScenarioRunResultTests.cs (6)
34
var
booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1")
125
var
booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1")
233
BooleanMetric
booleanMetric = first.Get<
BooleanMetric
>("boolean");
234
BooleanMetric
deserializedBooleanMetric = second.Get<
BooleanMetric
>("boolean");
Microsoft.Extensions.AI.Evaluation.Safety (13)
CodeVulnerabilityEvaluator.cs (2)
22
/// <see cref="CodeVulnerabilityEvaluator"/> returns a <see cref="
BooleanMetric
"/> with a value of
40
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by
ContentSafetyEvaluator.cs (1)
174
BooleanMetric
booleanMetric => booleanMetric.InterpretContentSafetyScore(),
EvaluationMetricExtensions.cs (1)
61
this
BooleanMetric
metric,
IndirectAttackEvaluator.cs (2)
36
/// <see cref="IndirectAttackEvaluator"/> returns a <see cref="
BooleanMetric
"/> with a value of <see langword="true"/>
51
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by
ProtectedMaterialEvaluator.cs (5)
24
/// <see cref="ProtectedMaterialEvaluator"/> returns a <see cref="
BooleanMetric
"/> with a value of
42
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by
48
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by
54
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by
60
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by
UngroundedAttributesEvaluator.cs (2)
22
/// information about the protected class or emotional state of a person. It returns a <see cref="
BooleanMetric
"/>
45
/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="
BooleanMetric
"/> returned by