public static final class EvaluationParserConfig.CustomCodeParserConfig extends GeneratedMessage implements EvaluationParserConfig.CustomCodeParserConfigOrBuilder
Configuration for parsing the LLM response using custom code.
Protobuf type
google.cloud.aiplatform.v1beta1.EvaluationParserConfig.CustomCodeParserConfig
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
public static final int PARSING_FUNCTION_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
public static EvaluationParserConfig.CustomCodeParserConfig getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static EvaluationParserConfig.CustomCodeParserConfig.Builder newBuilder()
public static EvaluationParserConfig.CustomCodeParserConfig.Builder newBuilder(EvaluationParserConfig.CustomCodeParserConfig prototype)
public static EvaluationParserConfig.CustomCodeParserConfig parseDelimitedFrom(InputStream input)
public static EvaluationParserConfig.CustomCodeParserConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(ByteString data)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(CodedInputStream input)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(InputStream input)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(ByteBuffer data)
public static EvaluationParserConfig.CustomCodeParserConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<EvaluationParserConfig.CustomCodeParserConfig> parser()
Methods
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
public EvaluationParserConfig.CustomCodeParserConfig getDefaultInstanceForType()
public Parser<EvaluationParserConfig.CustomCodeParserConfig> getParserForType()
Overrides
public String getParsingFunction()
Required. Python function for parsing results. The function should be
defined within this string.
The function takes a list of strings (LLM responses) and should return
either a list of dictionaries (for rubrics) or a single dictionary
(for a metric result).
Example function signature:
def parse(responses: list[str]) -> list[dict[str, Any]] | dict[str, Any]:
When parsing rubrics, return a list of dictionaries, where each
dictionary represents a Rubric.
Example for rubrics:
[
{
"content": {"property": {"description": "The response is
factual."}},
"type": "FACTUALITY",
"importance": "HIGH"
},
{
"content": {"property": {"description": "The response is
fluent."}},
"type": "FLUENCY",
"importance": "MEDIUM"
}
]
When parsing critique results, return a dictionary representing a
MetricResult.
Example for a metric result:
{
"score": 0.8,
"explanation": "The model followed most instructions.",
"rubric_verdicts": [...]
}
... code for result extraction and aggregation
optional string parsing_function = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
String |
The parsingFunction.
|
public ByteString getParsingFunctionBytes()
Required. Python function for parsing results. The function should be
defined within this string.
The function takes a list of strings (LLM responses) and should return
either a list of dictionaries (for rubrics) or a single dictionary
(for a metric result).
Example function signature:
def parse(responses: list[str]) -> list[dict[str, Any]] | dict[str, Any]:
When parsing rubrics, return a list of dictionaries, where each
dictionary represents a Rubric.
Example for rubrics:
[
{
"content": {"property": {"description": "The response is
factual."}},
"type": "FACTUALITY",
"importance": "HIGH"
},
{
"content": {"property": {"description": "The response is
fluent."}},
"type": "FLUENCY",
"importance": "MEDIUM"
}
]
When parsing critique results, return a dictionary representing a
MetricResult.
Example for a metric result:
{
"score": 0.8,
"explanation": "The model followed most instructions.",
"rubric_verdicts": [...]
}
... code for result extraction and aggregation
optional string parsing_function = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
ByteString |
The bytes for parsingFunction.
|
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
public boolean hasParsingFunction()
Required. Python function for parsing results. The function should be
defined within this string.
The function takes a list of strings (LLM responses) and should return
either a list of dictionaries (for rubrics) or a single dictionary
(for a metric result).
Example function signature:
def parse(responses: list[str]) -> list[dict[str, Any]] | dict[str, Any]:
When parsing rubrics, return a list of dictionaries, where each
dictionary represents a Rubric.
Example for rubrics:
[
{
"content": {"property": {"description": "The response is
factual."}},
"type": "FACTUALITY",
"importance": "HIGH"
},
{
"content": {"property": {"description": "The response is
fluent."}},
"type": "FLUENCY",
"importance": "MEDIUM"
}
]
When parsing critique results, return a dictionary representing a
MetricResult.
Example for a metric result:
{
"score": 0.8,
"explanation": "The model followed most instructions.",
"rubric_verdicts": [...]
}
... code for result extraction and aggregation
optional string parsing_function = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
boolean |
Whether the parsingFunction field is set.
|
| Returns |
| Type |
Description |
int |
|
Overrides
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public EvaluationParserConfig.CustomCodeParserConfig.Builder newBuilderForType()
protected EvaluationParserConfig.CustomCodeParserConfig.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
public EvaluationParserConfig.CustomCodeParserConfig.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides