Sample Query captures metadata to be used for evaluation.
JSON representation
{"name": string,"createTime": string,// Union field content can be only one of the following:"queryEntry": {object (QueryEntry)}// End of list of possible types for union field content.}
Fields
name
string
Identifier. The full resource name of the sample query, in the format of projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}.
This field must be a UTF-8 encoded string with a length limit of 1024 characters.
Output only. Timestamp the SampleQuery was created at.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Union field content. The content of the sample query. content can be only one of the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eSampleQuery captures metadata for evaluation, including a name, creation timestamp, and a union field \u003ccode\u003econtent\u003c/code\u003e which can contain a \u003ccode\u003equeryEntry\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eQueryEntry details the query string and a list of expected \u003ccode\u003etargets\u003c/code\u003e for search evaluation, where the query field is mandatory.\u003c/p\u003e\n"],["\u003cp\u003eTarget specifies the expected outcome of a query with fields for URI, page numbers, and a relevance score, all helping to define the expected search results.\u003c/p\u003e\n"],["\u003cp\u003eAvailable methods include create, delete, get, import, list, and patch, which collectively manage the lifecycle and operations of SampleQuery resources.\u003c/p\u003e\n"]]],[],null,["- [Resource: SampleQuery](#SampleQuery)\n - [JSON representation](#SampleQuery.SCHEMA_REPRESENTATION)\n- [QueryEntry](#QueryEntry)\n - [JSON representation](#QueryEntry.SCHEMA_REPRESENTATION)\n- [Target](#Target)\n - [JSON representation](#Target.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: SampleQuery Sample Query captures metadata to be used for evaluation.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"createTime\": string, // Union field `content` can be only one of the following: \"queryEntry\": { object (/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#QueryEntry) } // End of list of possible types for union field `content`. } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Identifier. The full resource name of the sample query, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. |\n| `createTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Output only. Timestamp the [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery) was created at. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| Union field `content`. The content of the sample query. `content` can be only one of the following: ||\n| `queryEntry` | `object (`[QueryEntry](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#QueryEntry)`)` The query entry. |\n\nQueryEntry Query Entry captures metadata to be used for search evaluation.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"query\": string, \"targets\": [ { object (/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#Target) } ] } ``` |\n\n| Fields ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `query` | `string` Required. The query. |\n| `targets[]` | `object (`[Target](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#Target)`)` List of targets for the query. |\n\nTarget Defines the parameters of the query's expected outcome.\n\n| JSON representation |\n|------------------------------------------------------------------------|\n| ``` { \"uri\": string, \"pageNumbers\": [ integer ], \"score\": number } ``` |\n\n| Fields ||\n|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `uri` | `string` Expected uri of the target. This field must be a UTF-8 encoded string with a length limit of 2048 characters. Example of valid uris: `https://example.com/abc`, `gcs://example/example.pdf`. |\n| `pageNumbers[]` | `integer` Expected page numbers of the target. Each page number must be non negative. |\n| `score` | `number` Relevance score of the target. |\n\n| Methods ||\n|--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [create](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/create) | Creates a [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery) |\n| [delete](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/delete) | Deletes a [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery). |\n| [get](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/get) | Gets a [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery). |\n| [import](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/import) | Bulk import of multiple [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery)s. |\n| [list](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/list) | Gets a list of [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery)s. |\n| [patch](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries/patch) | Updates a [SampleQuery](/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.sampleQuerySets.sampleQueries#SampleQuery). |"]]