Reinforcement Tuning String Match Reward Scorer String Match Expression
Evaluates parsed response using match type against the expression. Returns true if MatchOperation(target, expression) evaluates to true, and false otherwise. This data type is not supported in Gemini API.
Properties
A string or a regular expression to match against for evaluating rewards. Users can also provide a references map of {key: value} whose value will be used to replace the placeholder {{references.key}} in the expression. For example, if the following references are defined in the training / validation dataset: `` { "systemInstruction": ..., "contents": ..., "references": { "concise_answer": "Yes", "verbose_answer": "The answer is Yes" } } `` and if users define the following StringMatchExpression: { "matchOperation": "REGEX_CONTAINS", "expression": ".{{references.concise_answer}}." } On evaluating the reward for each sample response, this StringMatchExpression will be substituted as: `` { "matchOperation": "REGEX_CONTAINS", "expression": ".*Yes.*" } ``
Match operation to use for evaluating rewards.