25 instantiations of BooleanMetric
Microsoft.Extensions.AI.Evaluation.Integration.Tests (15)
ResultsTests.cs (15)
158var metricA = new BooleanMetric("Metric with value false", false); 159var metricB = new BooleanMetric("Metric with value true", true); 160var metricC = new BooleanMetric("Metric without value"); 161var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 186var metricA = new BooleanMetric("Metric with value false", false); 187var metricB = new BooleanMetric("Metric with value true", true); 188var metricC = new BooleanMetric("Metric without value"); 189var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 420var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 428var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 473var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 481var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 532var metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true); 540var metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true); 591var metric = new BooleanMetric("Condition", true);
Microsoft.Extensions.AI.Evaluation.Quality (1)
ToolCallAccuracyEvaluator.cs (1)
86var metric = new BooleanMetric(ToolCallAccuracyMetricName);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.BooleanMetric.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.BooleanMetric((string)args[0], (bool?)args[1], (string)args[2]),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.BooleanMetric.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.Evaluation.BooleanMetric((string)args[0], (bool?)args[1], (string)args[2]),
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (4)
ResultStoreTester.cs (1)
21BooleanMetric booleanMetric = new BooleanMetric("boolean", value: true);
ScenarioRunResultTests.cs (3)
35var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 127var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 216var nullableBooleanMetric = new BooleanMetric("nullableBoolean");
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (2)
83metric = new BooleanMetric(metricName, booleanValue, reason); 94metric = new BooleanMetric(metricName, booleanValue, reason);
Microsoft.Extensions.AI.Evaluation.Tests (1)
BuiltInMetricUtilitiesTests.cs (1)
34var metric = new BooleanMetric("name");
102 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)
18[JsonDerivedType(typeof(BooleanMetric), "boolean")]
Microsoft.Extensions.AI.Evaluation.Integration.Tests (47)
AgentQualityEvaluatorTests.cs (2)
158Assert.True(result.TryGet(ToolCallAccuracyEvaluator.ToolCallAccuracyMetricName, out BooleanMetric? _)); 198Assert.True(result.TryGet(ToolCallAccuracyEvaluator.ToolCallAccuracyMetricName, out BooleanMetric? _));
ResultsTests.cs (17)
45case BooleanMetric booleanMetric: 108(m is BooleanMetric b && b.Value is not null) || 158var metricA = new BooleanMetric("Metric with value false", false); 159var metricB = new BooleanMetric("Metric with value true", true); 160var metricC = new BooleanMetric("Metric without value"); 161var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 186var metricA = new BooleanMetric("Metric with value false", false); 187var metricB = new BooleanMetric("Metric with value true", true); 188var metricC = new BooleanMetric("Metric without value"); 189var metricD = new BooleanMetric("Metric with reason", false, reason: "The reason"); 420var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 428var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 473var metric1 = new BooleanMetric("Metric with all diagnostic severities"); 481var metric2 = new BooleanMetric("Metric with warning and informational diagnostics"); 532var metric1 = new BooleanMetric("Metric with all diagnostic severities", value: true); 540var metric2 = new BooleanMetric("Metric with warning and informational diagnostics", value: true); 591var metric = new BooleanMetric("Condition", true);
SafetyEvaluatorTests.cs (28)
218Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 220Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes)); 221Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 309Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 311Assert.True(result.TryGet(UngroundedAttributesEvaluator.UngroundedAttributesMetricName, out BooleanMetric? ungroundedAttributes)); 312Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 354Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 355Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 356Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 357Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 358Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 390Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 391Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 392Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 393Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 394Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 439Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 440Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 441Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 442Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 443Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 501Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedMaterialMetricName, out BooleanMetric? _)); 502Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedArtworkMetricName, out BooleanMetric? _)); 503Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedFictionalCharactersMetricName, out BooleanMetric? _)); 504Assert.True(result.TryGet(ProtectedMaterialEvaluator.ProtectedLogosAndBrandsMetricName, out BooleanMetric? _)); 505Assert.True(result.TryGet(IndirectAttackEvaluator.IndirectAttackMetricName, out BooleanMetric? _)); 534Assert.True(result.TryGet(CodeVulnerabilityEvaluator.CodeVulnerabilityMetricName, out BooleanMetric? _)); 575Assert.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 (12)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.BooleanMetric.g.cs (11)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>? _BooleanMetric; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> BooleanMetric 24get => _BooleanMetric ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.Evaluation.BooleanMetric)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> Create_BooleanMetric(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.BooleanMetric).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(bool?), typeof(string)}, modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>(options, objectInfo); 200private void BooleanMetricSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.Evaluation.BooleanMetric? value)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.GetJsonTypeInfo.g.cs (1)
100if (type == typeof(global::Microsoft.Extensions.AI.Evaluation.BooleanMetric))
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (12)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.BooleanMetric.g.cs (11)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>? _BooleanMetric; 21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> BooleanMetric 24get => _BooleanMetric ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.Evaluation.BooleanMetric)); 27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> Create_BooleanMetric(global::System.Text.Json.JsonSerializerOptions options) 29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> jsonTypeInfo)) 31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric> 37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.Evaluation.BooleanMetric).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(bool?), typeof(string)}, modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.Evaluation.BooleanMetric>(options, objectInfo); 200private void BooleanMetricSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.Extensions.AI.Evaluation.BooleanMetric? value)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.GetJsonTypeInfo.g.cs (1)
100if (type == typeof(global::Microsoft.Extensions.AI.Evaluation.BooleanMetric))
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (8)
ResultStoreTester.cs (1)
21BooleanMetric booleanMetric = new BooleanMetric("boolean", value: true);
ScenarioRunResultTests.cs (7)
35var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 127var booleanMetric = new BooleanMetric("boolean", value: true, reason: "reason1") 216var nullableBooleanMetric = new BooleanMetric("nullableBoolean"); 351BooleanMetric booleanMetric = first.Get<BooleanMetric>("boolean"); 352BooleanMetric 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)
166BooleanMetric 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)
BuiltInMetricUtilitiesTests.cs (1)
34var metric = new BooleanMetric("name");