public sealed class PairwiseMetricSpec : IMessage<PairwiseMetricSpec>, IEquatable<PairwiseMetricSpec>, IDeepCloneable<PairwiseMetricSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1beta1 API class PairwiseMetricSpec.
public CustomOutputFormatConfig CustomOutputFormatConfig { get; set; }
Optional. CustomOutputFormatConfig allows customization of metric output.
When this config is set, the default output is replaced with
the raw output string.
If a custom format is chosen, the pairwise_choice and explanation
fields in the corresponding metric result will be empty.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ePairwiseMetricSpec\u003c/code\u003e class in the Google.Cloud.AIPlatform.V1Beta1 namespace is used to define specifications for pairwise metrics within the Vertex AI v1beta1 API.\u003c/p\u003e\n"],["\u003cp\u003eIt supports two constructors: a default constructor and one that accepts another \u003ccode\u003ePairwiseMetricSpec\u003c/code\u003e object for creating a new instance.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties such as \u003ccode\u003eBaselineResponseFieldName\u003c/code\u003e, \u003ccode\u003eCandidateResponseFieldName\u003c/code\u003e, \u003ccode\u003eMetricPromptTemplate\u003c/code\u003e, and \u003ccode\u003eSystemInstruction\u003c/code\u003e to configure different aspects of the pairwise metric, including the metric prompt template, candidate, baseline, and instructions.\u003c/p\u003e\n"],["\u003cp\u003eIt implements several interfaces, such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, indicating its integration with the Google Protobuf library and its support for deep cloning and equality comparisons.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the reference documentation for the class \u003ccode\u003ePairwiseMetricSpec\u003c/code\u003e is version \u003ccode\u003e1.0.0-beta21\u003c/code\u003e, and previous version \u003ccode\u003e1.0.0-beta20\u003c/code\u003e is also available.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class PairwiseMetricSpec (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PairwiseMetricSpec)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.PairwiseMetricSpec) \n\n public sealed class PairwiseMetricSpec : IMessage\u003cPairwiseMetricSpec\u003e, IEquatable\u003cPairwiseMetricSpec\u003e, IDeepCloneable\u003cPairwiseMetricSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class PairwiseMetricSpec.\n\nSpec for pairwise metric. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PairwiseMetricSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PairwiseMetricSpec](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PairwiseMetricSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PairwiseMetricSpec](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PairwiseMetricSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PairwiseMetricSpec](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.PairwiseMetricSpec), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### PairwiseMetricSpec()\n\n public PairwiseMetricSpec()\n\n### PairwiseMetricSpec(PairwiseMetricSpec)\n\n public PairwiseMetricSpec(PairwiseMetricSpec other)\n\nProperties\n----------\n\n### BaselineResponseFieldName\n\n public string BaselineResponseFieldName { get; set; }\n\nOptional. The field name of the baseline response.\n\n### CandidateResponseFieldName\n\n public string CandidateResponseFieldName { get; set; }\n\nOptional. The field name of the candidate response.\n\n### CustomOutputFormatConfig\n\n public CustomOutputFormatConfig CustomOutputFormatConfig { get; set; }\n\nOptional. CustomOutputFormatConfig allows customization of metric output.\nWhen this config is set, the default output is replaced with\nthe raw output string.\nIf a custom format is chosen, the `pairwise_choice` and `explanation`\nfields in the corresponding metric result will be empty.\n\n### HasMetricPromptTemplate\n\n public bool HasMetricPromptTemplate { get; }\n\nGets whether the \"metric_prompt_template\" field is set\n\n### HasSystemInstruction\n\n public bool HasSystemInstruction { get; }\n\nGets whether the \"system_instruction\" field is set\n\n### MetricPromptTemplate\n\n public string MetricPromptTemplate { get; set; }\n\nRequired. Metric prompt template for pairwise metric.\n\n### SystemInstruction\n\n public string SystemInstruction { get; set; }\n\nOptional. System instructions for pairwise metric."]]