20 instantiations of BooleanMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (15)
ResultsTests.cs (15)
160var metricA = new BooleanMetric("Metric with value false", false); 161var metricB = new BooleanMetric("Metric with value true", true); 162var metricC = new BooleanMetric("Metric without value"); 163var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 188var metricA = new BooleanMetric("Metric with value false", false); 189var metricB = new BooleanMetric("Metric with value true", true); 190var metricC = new BooleanMetric("Metric without value"); 191var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 422var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 430var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 475var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 483var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 534var metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true); 542var metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true); 593var metric = new BooleanMetric("Condition", true);
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
ResultStoreTester.cs (1)
22BooleanMetric booleanMetric = new BooleanMetric("boolean", value: true);
ScenarioRunResultTests.cs (2)
34var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 125var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1")
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (2)
90metric = new BooleanMetric(metricName, booleanValue, reason); 101metric = 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)
47case BooleanMetric booleanMetric: 110(m is BooleanMetric b && b.Value is not null) || 160var metricA = new BooleanMetric("Metric with value false", false); 161var metricB = new BooleanMetric("Metric with value true", true); 162var metricC = new BooleanMetric("Metric without value"); 163var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 188var metricA = new BooleanMetric("Metric with value false", false); 189var metricB = new BooleanMetric("Metric with value true", true); 190var metricC = new BooleanMetric("Metric without value"); 191var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 422var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 430var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 475var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 483var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 534var metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true); 542var metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true); 593var metric = new BooleanMetric("Condition", true);
SafetyEvaluatorTests.cs (28)
169Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 171Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes)); 172Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 244Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 246Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes)); 247Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 289Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 290Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 291Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 292Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 293Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 325Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 326Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 327Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 328Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 329Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 374Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 375Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 376Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 377Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 378Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 436Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 437Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 438Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 439Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 440Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 469Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _)); 510Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _));
Microsoft.Extensions.AI.Evaluation.Quality (1)
EvaluationMetricExtensions.cs (1)
128case BooleanMetric booleanMetric:
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (7)
ResultStoreTester.cs (1)
22BooleanMetric booleanMetric = new BooleanMetric("boolean", value: true);
ScenarioRunResultTests.cs (6)
34var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 125var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 233BooleanMetric booleanMetric = first.Get<BooleanMetric>("boolean"); 234BooleanMetric 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)
174BooleanMetric booleanMetric => booleanMetric.InterpretContentSafetyScore(),
EvaluationMetricExtensions.cs (1)
61this 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