Package com.google.genai.types
Class ReinforcementTuningAutoraterScorer
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ReinforcementTuningAutoraterScorer
Reinforcement tuning autorater scorer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ReinforcementTuningAutoraterScorer. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Optional<AutoraterConfig>Autorater config for evaluation.The prompt for an autorater to scorer the parsed sample response.Parses autorater returned response for scoring.builder()Instantiates a builder for ReinforcementTuningAutoraterScorer.Scores autorater responses by using string match reward scorer.Deserializes a JSON string to a ReinforcementTuningAutoraterScorer object.Scores autorater responses by directly converting parsed autorater response to a float reward.Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
ReinforcementTuningAutoraterScorer
public ReinforcementTuningAutoraterScorer()
-
-
Method Details
-
autoraterConfig
Autorater config for evaluation. -
autoraterPrompt
The prompt for an autorater to scorer the parsed sample response. This field supports the following placeholders that will be replaced before scoring: - {{prompt}} - {{response}} - {{system_instruction}} - {{references.key}} -
autoraterResponseParseConfig
Parses autorater returned response for scoring. For example, if the autorater response has reward stored in the `2.0` block, defining a parsing response config using regex `".*(.*?)"` will return a score `"2.0"`. -
parsedResponseConversionScorer
public abstract Optional<ReinforcementTuningAutoraterScorerParsedResponseConversionScorer> parsedResponseConversionScorer()Scores autorater responses by directly converting parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. -
exactMatchScorer
Scores autorater responses by using string match reward scorer. -
builder
Instantiates a builder for ReinforcementTuningAutoraterScorer. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ReinforcementTuningAutoraterScorer object.
-