public sealed class SuggestTrialsRequest : IMessage<SuggestTrialsRequest>, IEquatable<SuggestTrialsRequest>, IDeepCloneable<SuggestTrialsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1beta1 API class SuggestTrialsRequest.
Request message for
[VizierService.SuggestTrials][google.cloud.aiplatform.v1beta1.VizierService.SuggestTrials].
Required. The identifier of the client that is requesting the suggestion.
If multiple SuggestTrialsRequests have the same client_id,
the service will return the identical suggested Trial if the Trial is
pending, and provide a new Trial if the last suggested Trial was completed.
public RepeatedField<TrialContext> Contexts { get; }
Optional. This allows you to specify the "context" for a Trial; a context
is a slice (a subspace) of the search space.
Typical uses for contexts:
1) You are using Vizier to tune a server for best performance, but there's
a strong weekly cycle. The context specifies the day-of-week.
This allows Tuesday to generalize from Wednesday without assuming that
everything is identical.
2) Imagine you're optimizing some medical treatment for people.
As they walk in the door, you know certain facts about them
(e.g. sex, weight, height, blood-pressure). Put that information in the
context, and Vizier will adapt its suggestions to the patient.
3) You want to do a fair A/B test efficiently. Specify the "A" and "B"
conditions as contexts, and Vizier will generalize between "A" and "B"
conditions. If they are similar, this will allow Vizier to converge
to the optimum faster than if "A" and "B" were separate Studies.
NOTE: You can also enter contexts as REQUESTED Trials, e.g. via the
CreateTrial() RPC; that's the asynchronous option where you don't need a
close association between contexts and suggestions.
NOTE: All the Parameters you set in a context MUST be defined in the
Study.
NOTE: You must supply 0 or $suggestion_count contexts.
If you don't supply any contexts, Vizier will make suggestions
from the full search space specified in the StudySpec; if you supply
a full set of context, each suggestion will match the corresponding
context.
NOTE: A Context with no features set matches anything, and allows
suggestions from the full search space.
NOTE: Contexts MUST lie within the search space specified in the
StudySpec. It's an error if they don't.
NOTE: Contexts preferentially match ACTIVE then REQUESTED trials before
new suggestions are generated.
NOTE: Generation of suggestions involves a match between a Context and
(optionally) a REQUESTED trial; if that match is not fully specified, a
suggestion will be geneated in the merged subspace.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eSuggestTrialsRequest\u003c/code\u003e is a class within the Vertex AI v1beta1 API, used as a request message for the \u003ccode\u003eVizierService.SuggestTrials\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities such as deep cloning and buffer message handling.\u003c/p\u003e\n"],["\u003cp\u003eIt contains properties such as \u003ccode\u003eClientId\u003c/code\u003e, \u003ccode\u003eContexts\u003c/code\u003e, \u003ccode\u003eParent\u003c/code\u003e, \u003ccode\u003eParentAsStudyName\u003c/code\u003e, and \u003ccode\u003eSuggestionCount\u003c/code\u003e to define the parameters of a trial suggestion request, like client identification, trial context, study location, and the number of suggestions needed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eContexts\u003c/code\u003e property allows for the specification of a slice or subspace of the search space, enabling suggestions to be tailored to specific conditions or parameters, and it can match ACTIVE or REQUESTED trials.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eParent\u003c/code\u003e and \u003ccode\u003eParentAsStudyName\u003c/code\u003e properties specify the location and the project that the study belongs to in the format \u003ccode\u003eprojects/{project}/locations/{location}/studies/{study}\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class SuggestTrialsRequest (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.SuggestTrialsRequest)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.SuggestTrialsRequest) \n\n public sealed class SuggestTrialsRequest : IMessage\u003cSuggestTrialsRequest\u003e, IEquatable\u003cSuggestTrialsRequest\u003e, IDeepCloneable\u003cSuggestTrialsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class SuggestTrialsRequest.\n\nRequest message for\n\\[VizierService.SuggestTrials\\]\\[google.cloud.aiplatform.v1beta1.VizierService.SuggestTrials\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SuggestTrialsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SuggestTrialsRequest](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.SuggestTrialsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SuggestTrialsRequest](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.SuggestTrialsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SuggestTrialsRequest](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.SuggestTrialsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### SuggestTrialsRequest()\n\n public SuggestTrialsRequest()\n\n### SuggestTrialsRequest(SuggestTrialsRequest)\n\n public SuggestTrialsRequest(SuggestTrialsRequest other)\n\nProperties\n----------\n\n### ClientId\n\n public string ClientId { get; set; }\n\nRequired. The identifier of the client that is requesting the suggestion.\n\nIf multiple SuggestTrialsRequests have the same `client_id`,\nthe service will return the identical suggested Trial if the Trial is\npending, and provide a new Trial if the last suggested Trial was completed.\n\n### Contexts\n\n public RepeatedField\u003cTrialContext\u003e Contexts { get; }\n\nOptional. This allows you to specify the \"context\" for a Trial; a context\nis a slice (a subspace) of the search space.\n\nTypical uses for contexts:\n1) You are using Vizier to tune a server for best performance, but there's\na strong weekly cycle. The context specifies the day-of-week.\nThis allows Tuesday to generalize from Wednesday without assuming that\neverything is identical.\n2) Imagine you're optimizing some medical treatment for people.\nAs they walk in the door, you know certain facts about them\n(e.g. sex, weight, height, blood-pressure). Put that information in the\ncontext, and Vizier will adapt its suggestions to the patient.\n3) You want to do a fair A/B test efficiently. Specify the \"A\" and \"B\"\nconditions as contexts, and Vizier will generalize between \"A\" and \"B\"\nconditions. If they are similar, this will allow Vizier to converge\nto the optimum faster than if \"A\" and \"B\" were separate Studies.\nNOTE: You can also enter contexts as REQUESTED Trials, e.g. via the\nCreateTrial() RPC; that's the asynchronous option where you don't need a\nclose association between contexts and suggestions.\n\nNOTE: All the Parameters you set in a context MUST be defined in the\nStudy.\nNOTE: You must supply 0 or $suggestion_count contexts.\nIf you don't supply any contexts, Vizier will make suggestions\nfrom the full search space specified in the StudySpec; if you supply\na full set of context, each suggestion will match the corresponding\ncontext.\nNOTE: A Context with no features set matches anything, and allows\nsuggestions from the full search space.\nNOTE: Contexts MUST lie within the search space specified in the\nStudySpec. It's an error if they don't.\nNOTE: Contexts preferentially match ACTIVE then REQUESTED trials before\nnew suggestions are generated.\nNOTE: Generation of suggestions involves a match between a Context and\n(optionally) a REQUESTED trial; if that match is not fully specified, a\nsuggestion will be geneated in the merged subspace.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The project and location that the Study belongs to.\nFormat: `projects/{project}/locations/{location}/studies/{study}`\n\n### ParentAsStudyName\n\n public StudyName ParentAsStudyName { get; set; }\n\n[StudyName](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.StudyName)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.SuggestTrialsRequest#Google_Cloud_AIPlatform_V1Beta1_SuggestTrialsRequest_Parent) resource name property.\n\n### SuggestionCount\n\n public int SuggestionCount { get; set; }\n\nRequired. The number of suggestions requested. It must be positive."]]