Table of Contents

Class SingleReinforcementTuningRewardConfig

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Single reinforcement tuning reward config.

public record SingleReinforcementTuningRewardConfig : IEquatable<SingleReinforcementTuningRewardConfig>
Inheritance
SingleReinforcementTuningRewardConfig
Implements
Inherited Members

Properties

AutoraterScorer

Scores parsed responses for autorater use cases by using a model to compute the reward.

[JsonPropertyName("autoraterScorer")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReinforcementTuningAutoraterScorer? AutoraterScorer { get; set; }

Property Value

ReinforcementTuningAutoraterScorer

CloudRunRewardScorer

Scores parsed responses by calling a Cloud Run service.

[JsonPropertyName("cloudRunRewardScorer")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReinforcementTuningCloudRunRewardScorer? CloudRunRewardScorer { get; set; }

Property Value

ReinforcementTuningCloudRunRewardScorer

CodeExecutionRewardScorer

Scores parsed responses for code execution use cases.

[JsonPropertyName("codeExecutionRewardScorer")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReinforcementTuningCodeExecutionRewardScorer? CodeExecutionRewardScorer { get; set; }

Property Value

ReinforcementTuningCodeExecutionRewardScorer

ParseResponseConfig

Defines how to parse sample response.

[JsonPropertyName("parseResponseConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReinforcementTuningParseResponseConfig? ParseResponseConfig { get; set; }

Property Value

ReinforcementTuningParseResponseConfig

RewardName

A unique reward name used to identify each single reinforcement tuning reward.

[JsonPropertyName("rewardName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? RewardName { get; set; }

Property Value

string

StringMatchRewardScorer

Scores parsed responses for simple string matching use cases against reference answer without writing python code.

[JsonPropertyName("stringMatchRewardScorer")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReinforcementTuningStringMatchRewardScorer? StringMatchRewardScorer { get; set; }

Property Value

ReinforcementTuningStringMatchRewardScorer

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a SingleReinforcementTuningRewardConfig object.

public static SingleReinforcementTuningRewardConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

SingleReinforcementTuningRewardConfig

The deserialized SingleReinforcementTuningRewardConfig object, or null if deserialization fails.