QueryUnderstandingSpec

Query understanding specification.

JSON representation
{
  "queryClassificationSpec": {
    object (QueryClassificationSpec)
  },
  "queryRephraserSpec": {
    object (QueryRephraserSpec)
  },
  "disableSpellCorrection": boolean
}
Fields
queryClassificationSpec

object (QueryClassificationSpec)

Query classification specification.

queryRephraserSpec

object (QueryRephraserSpec)

Query rephraser specification.

disableSpellCorrection

boolean

Optional. Whether to disable spell correction. The default value is false.

QueryClassificationSpec

Query classification specification.

JSON representation
{
  "types": [
    enum (Type)
  ]
}
Fields
types[]

enum (Type)

Enabled query classification types.

Type

Query classification types.

Enums
TYPE_UNSPECIFIEDUnspecified query classification type.
ADVERSARIAL_QUERYAdversarial query classification type.
NON_ANSWER_SEEKING_QUERYNon-answer-seeking query classification type, for chit chat.
JAIL_BREAKING_QUERYJail-breaking query classification type.
NON_ANSWER_SEEKING_QUERY_V2Non-answer-seeking query classification type, for no clear intent.
USER_DEFINED_CLASSIFICATION_QUERYUser defined query classification type.

QueryRephraserSpec

Query rephraser specification.

JSON representation
{
  "disable": boolean,
  "maxRephraseSteps": integer,
  "modelSpec": {
    object (ModelSpec)
  }
}
Fields
disable

boolean

Disable query rephraser.

maxRephraseSteps

integer

Max rephrase steps. The max number is 5 steps. If not set or set to < 1, it will be set to 1 by default.

modelSpec

object (ModelSpec)

Optional. Query Rephraser Model specification.

ModelSpec

Query Rephraser Model specification.

JSON representation
{
  "modelType": enum (ModelType)
}
Fields
modelType

enum (ModelType)

Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.

ModelType

Query rephraser types. Currently only supports single-hop (maxRephraseSteps = 1) model selections. For multi-hop (maxRephraseSteps > 1), there is only one default model.

Enums
MODEL_TYPE_UNSPECIFIEDUnspecified model type.
SMALLSmall query rephraser model. Gemini 1.0 XS model.
LARGELarge query rephraser model. Gemini 1.0 Pro model.