ReinforcementTuningParseResponseConfig

@Serializable
data class ReinforcementTuningParseResponseConfig(val parseType: ResponseParseType? = null, val regexExtractExpression: String? = null)

Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: "Perform step-by-step thoughts first to problem A, finally output answer in the block." The sample response from the model under tuning might look like: "Yes" Here, users can define the following parse config: `` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } `` The resulting parsed response would be "Yes" and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API.

Constructors

Link copied to clipboard
constructor(parseType: ResponseParseType? = null, regexExtractExpression: String? = null)

Properties

Link copied to clipboard

Defines the type for parsing sample response.

Link copied to clipboard

Defines the regex for extracting the important part of sample response. This field is only used when parse_type is ResponseParseType.REGEX_EXTRACT.