Class ReinforcementTuningStringMatchRewardScorer

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ReinforcementTuningStringMatchRewardScorer

public abstract class ReinforcementTuningStringMatchRewardScorer extends JsonSerializable
ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for string matching use cases. For example, for math problems, users can use string match scorer to check if the correct exact answer is generated. Note: Reward returned by the string match reward function is clipped to be within `[-1, 1]` if wrongAnswerReward or correctAnswerReward are beyond the range, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API.