22 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.Quality (1)
ToolCallAccuracyEvaluator.cs (1)
86var metric = new BooleanMetric(ToolCallAccuracyMetricName);
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") 126var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1")
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (2)
93metric = new BooleanMetric(metricName, booleanValue, reason); 104metric = new BooleanMetric(metricName, booleanValue, reason);
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInEvaluatorUtilitiesTests.cs (1)
34var metric = new BooleanMetric("name");
77 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 (47)
AgentQualityEvaluatorTests.cs (2)
159Assert.True(result.TryGet(ToolCallAccuracyEvaluator.ToolCallAccuracyMetricName, out BooleanMetric? _)); 199Assert.True(result.TryGet(ToolCallAccuracyEvaluator.ToolCallAccuracyMetricName, out BooleanMetric? _));
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)
216Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 218Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes)); 219Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 307Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 309Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes)); 310Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 352Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 353Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 354Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 355Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 356Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 388Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 389Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 390Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 391Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 392Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 437Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 438Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 439Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 440Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 441Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 499Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 500Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 501Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 502Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 503Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 532Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _)); 573Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _));
Microsoft.Extensions.AI.Evaluation.Quality (5)
EvaluationMetricExtensions.cs (2)
37this BooleanMetric metric, 147case BooleanMetric booleanMetric:
ToolCallAccuracyEvaluator.cs (3)
32/// <see cref="ToolCallAccuracyEvaluator"/> returns a <see cref="BooleanMetric"/> that contains a score for 'Tool Call 56/// Gets the <see cref="EvaluationMetric.Name"/> of the <see cref="BooleanMetric"/> returned by 86var metric = new BooleanMetric(ToolCallAccuracyMetricName);
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") 126var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 235BooleanMetric booleanMetric = first.Get<BooleanMetric>("boolean"); 236BooleanMetric 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)
175BooleanMetric 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
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInEvaluatorUtilitiesTests.cs (1)
34var metric = new BooleanMetric("name");