**Full name**: projects.locations.tuningJobs.validateReinforcementTuningReward

Validates a reward on a given example.

### Endpoint

post `https://{service-endpoint}/v1beta1/{parent}/tuningJobs:validateReinforcementTuningReward`   
Where `{service-endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest#rest_endpoints).

### Path parameters

`parent` `string` Required. The resource name of the Location to validate the reward in Format: `projects/{project}/locations/{location}`

### Request body

The request body contains data with the following structure:
Fields `sampleResponse` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/Shared.Types/Content`)`` Required. The sample response for validating the reward configuration.
`example` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#ReinforcementTuningExample`)`` Required. The example to validate the reward configuration.
`reward_config` `Union type` The reward configuration to validate. This can be a single or a composite reward configuration. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: `singleRewardConfig` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#SingleReinforcementTuningRewardConfig`)`` Optional. Single Reward function configuration for reinforcement tuning.
`compositeRewardConfig` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#CompositeReinforcementTuningRewardConfig`)`` Optional. Composite reward function configuration for reinforcement tuning.
End of mutually exclusive fields.

### Response body

Response message for `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs/validateReinforcementTuningReward#google.cloud.aiplatform.v1beta1.GenAiTuningService.ValidateReinforcementTuningReward`.

If successful, the response body contains data with the following structure:
Fields `rewardDetails
(deprecated)` `map (key: string, value: number)`

> [!WARNING]
> This item is deprecated!

Output only. Deprecated: Use `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs/validateReinforcementTuningReward#body.ValidateReinforcementTuningRewardResponse.FIELDS.reward_info_details` instead. A map from reward name to the calculated reward for the reward function. This field will only be populated when a `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#CompositeReinforcementTuningRewardConfig` is provided in the request. It will not be set for a `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#SingleReinforcementTuningRewardConfig`.
`errorStatus` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/Shared.Types/ListOperationsResponse#Status`)`` Output only. In case of an error, this field will be populated with a detailed error message for overall rewards to help with debugging.
`rewardInfoDetails` ``map (key: string, value: object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs/validateReinforcementTuningReward#ReinforcementTuningRewardInfo`))`` A map from reward name to reward info.
`overallReward` `number` Output only. The overall weighted reward. For a `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#CompositeReinforcementTuningRewardConfig`, this is the weighted average of all rewards. For a `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#SingleReinforcementTuningRewardConfig`, this will be the value of the single reward.
`error
(deprecated)` `string`

> [!WARNING]
> This item is deprecated!

Output only. Deprecated: Use `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs/validateReinforcementTuningReward#body.ValidateReinforcementTuningRewardResponse.FIELDS.error_status` instead. In case of an error, this field will be populated with a detailed error message to help with debugging.

| JSON representation |
|---|
| ``` { "rewardDetails": { string: number, ... }, "errorStatus": { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/Shared.Types/ListOperationsResponse#Status`) }, "rewardInfoDetails": { string: { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs/validateReinforcementTuningReward#ReinforcementTuningRewardInfo`) }, ... }, "overallReward": number, "error": string } ``` |

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `aiplatform.tuningJobs.validateReinforcementTuningReward`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## ReinforcementTuningRewardInfo

The reward info for a reward function.
Fields `userRequestedAuxInfo` `string` Output only. The user-requested auxiliary info for the reward function. This field is set only if the Cloud Run reward function configured by user returns a "user_requested_aux_info". Refer to `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1beta1/projects.locations.tuningJobs#ReinforcementTuningCloudRunRewardScorer` for more details.
`errorStatus` ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/Shared.Types/ListOperationsResponse#Status`)`` Output only. In case of an error for this reward, this field will be populated with a detailed error status.
`reward` `number` Output only. The calculated reward for the reward function.

| JSON representation |
|---|
| ``` { "userRequestedAuxInfo": string, "errorStatus": { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/Shared.Types/ListOperationsResponse#Status`) }, "reward": number } ``` |