qa_questions
Creates, updates, deletes, gets or lists a qa_questions
resource.
Overview
Name | qa_questions |
Type | Resource |
Id | google.contactcenterinsights.qa_questions |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the question. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question} |
abbreviation | string | Short, descriptive string, used in the UI where it's not practical to display the full question body. E.g., "Greeting". |
answerChoices | array | A list of valid answers to the question, which the LLM must choose from. |
answerInstructions | string | Instructions describing how to determine the answer. |
createTime | string (google-datetime) | Output only. The time at which this question was created. |
metrics | object | Metrics of the underlying tuned LLM over a holdout/test set while fine tuning the underlying LLM for the given question. This field will only be populated if and only if the question is part of a scorecard revision that has been tuned. (id: GoogleCloudContactcenterinsightsV1QaQuestionMetrics) |
order | integer (int32) | Defines the order of the question within its parent scorecard revision. |
predefinedQuestionConfig | object | The configuration of the predefined question. This field will only be set if the Question Type is predefined. (id: GoogleCloudContactcenterinsightsV1QaQuestionPredefinedQuestionConfig) |
questionBody | string | Question text. E.g., "Did the agent greet the customer?" |
questionType | string | The type of question. |
tags | array | Questions are tagged for categorization and scoring. Tags can either be: - Default Tags: These are predefined categories. They are identified by their string value (e.g., "BUSINESS", "COMPLIANCE", and "CUSTOMER"). - Custom Tags: These are user-defined categories. They are identified by their full resource name (e.g., projects/{project}/locations/{location}/qaQuestionTags/{qa_question_tag}). Both default and custom tags are used to group questions and to influence the scoring of each question. |
tuningMetadata | object | Metadata about the tuning operation for the question.This field will only be populated if and only if the question is part of a scorecard revision that has been tuned. (id: GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata) |
updateTime | string (google-datetime) | Output only. The most recent time at which the question was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the question. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question} |
abbreviation | string | Short, descriptive string, used in the UI where it's not practical to display the full question body. E.g., "Greeting". |
answerChoices | array | A list of valid answers to the question, which the LLM must choose from. |
answerInstructions | string | Instructions describing how to determine the answer. |
createTime | string (google-datetime) | Output only. The time at which this question was created. |
metrics | object | Metrics of the underlying tuned LLM over a holdout/test set while fine tuning the underlying LLM for the given question. This field will only be populated if and only if the question is part of a scorecard revision that has been tuned. (id: GoogleCloudContactcenterinsightsV1QaQuestionMetrics) |
order | integer (int32) | Defines the order of the question within its parent scorecard revision. |
predefinedQuestionConfig | object | The configuration of the predefined question. This field will only be set if the Question Type is predefined. (id: GoogleCloudContactcenterinsightsV1QaQuestionPredefinedQuestionConfig) |
questionBody | string | Question text. E.g., "Did the agent greet the customer?" |
questionType | string | The type of question. |
tags | array | Questions are tagged for categorization and scoring. Tags can either be: - Default Tags: These are predefined categories. They are identified by their string value (e.g., "BUSINESS", "COMPLIANCE", and "CUSTOMER"). - Custom Tags: These are user-defined categories. They are identified by their full resource name (e.g., projects/{project}/locations/{location}/qaQuestionTags/{qa_question_tag}). Both default and custom tags are used to group questions and to influence the scoring of each question. |
tuningMetadata | object | Metadata about the tuning operation for the question.This field will only be populated if and only if the question is part of a scorecard revision that has been tuned. (id: GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata) |
updateTime | string (google-datetime) | Output only. The most recent time at which the question was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , qaScorecardsId , revisionsId , qaQuestionsId | Gets a QaQuestion. | |
list | select | projectsId , locationsId , qaScorecardsId , revisionsId | pageSize , pageToken | Lists QaQuestions. |
create | insert | projectsId , locationsId , qaScorecardsId , revisionsId | qaQuestionId | Create a QaQuestion. |
patch | update | projectsId , locationsId , qaScorecardsId , revisionsId , qaQuestionsId | updateMask | Updates a QaQuestion. |
delete | delete | projectsId , locationsId , qaScorecardsId , revisionsId , qaQuestionsId | Deletes a QaQuestion. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
qaQuestionsId | string | |
qaScorecardsId | string | |
revisionsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
qaQuestionId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets a QaQuestion.
SELECT
name,
abbreviation,
answerChoices,
answerInstructions,
createTime,
metrics,
order,
predefinedQuestionConfig,
questionBody,
questionType,
tags,
tuningMetadata,
updateTime
FROM google.contactcenterinsights.qa_questions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND qaScorecardsId = '{{ qaScorecardsId }}' -- required
AND revisionsId = '{{ revisionsId }}' -- required
AND qaQuestionsId = '{{ qaQuestionsId }}' -- required;
Lists QaQuestions.
SELECT
name,
abbreviation,
answerChoices,
answerInstructions,
createTime,
metrics,
order,
predefinedQuestionConfig,
questionBody,
questionType,
tags,
tuningMetadata,
updateTime
FROM google.contactcenterinsights.qa_questions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND qaScorecardsId = '{{ qaScorecardsId }}' -- required
AND revisionsId = '{{ revisionsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Create a QaQuestion.
INSERT INTO google.contactcenterinsights.qa_questions (
data__name,
data__abbreviation,
data__questionType,
data__predefinedQuestionConfig,
data__questionBody,
data__answerInstructions,
data__answerChoices,
data__tags,
data__order,
data__metrics,
data__tuningMetadata,
projectsId,
locationsId,
qaScorecardsId,
revisionsId,
qaQuestionId
)
SELECT
'{{ name }}',
'{{ abbreviation }}',
'{{ questionType }}',
'{{ predefinedQuestionConfig }}',
'{{ questionBody }}',
'{{ answerInstructions }}',
'{{ answerChoices }}',
'{{ tags }}',
{{ order }},
'{{ metrics }}',
'{{ tuningMetadata }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ qaScorecardsId }}',
'{{ revisionsId }}',
'{{ qaQuestionId }}'
RETURNING
name,
abbreviation,
answerChoices,
answerInstructions,
createTime,
metrics,
order,
predefinedQuestionConfig,
questionBody,
questionType,
tags,
tuningMetadata,
updateTime
;
# Description fields are for documentation purposes
- name: qa_questions
props:
- name: projectsId
value: string
description: Required parameter for the qa_questions resource.
- name: locationsId
value: string
description: Required parameter for the qa_questions resource.
- name: qaScorecardsId
value: string
description: Required parameter for the qa_questions resource.
- name: revisionsId
value: string
description: Required parameter for the qa_questions resource.
- name: name
value: string
description: >
Identifier. The resource name of the question. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question}
- name: abbreviation
value: string
description: >
Short, descriptive string, used in the UI where it's not practical to display the full question body. E.g., "Greeting".
- name: questionType
value: string
description: >
The type of question.
valid_values: ['QA_QUESTION_TYPE_UNSPECIFIED', 'CUSTOMIZABLE', 'PREDEFINED']
- name: predefinedQuestionConfig
value: object
description: >
The configuration of the predefined question. This field will only be set if the Question Type is predefined.
- name: questionBody
value: string
description: >
Question text. E.g., "Did the agent greet the customer?"
- name: answerInstructions
value: string
description: >
Instructions describing how to determine the answer.
- name: answerChoices
value: array
description: >
A list of valid answers to the question, which the LLM must choose from.
- name: tags
value: array
description: >
Questions are tagged for categorization and scoring. Tags can either be: - Default Tags: These are predefined categories. They are identified by their string value (e.g., "BUSINESS", "COMPLIANCE", and "CUSTOMER"). - Custom Tags: These are user-defined categories. They are identified by their full resource name (e.g., projects/{project}/locations/{location}/qaQuestionTags/{qa_question_tag}). Both default and custom tags are used to group questions and to influence the scoring of each question.
- name: order
value: integer
description: >
Defines the order of the question within its parent scorecard revision.
- name: metrics
value: object
description: >
Metrics of the underlying tuned LLM over a holdout/test set while fine tuning the underlying LLM for the given question. This field will only be populated if and only if the question is part of a scorecard revision that has been tuned.
- name: tuningMetadata
value: object
description: >
Metadata about the tuning operation for the question.This field will only be populated if and only if the question is part of a scorecard revision that has been tuned.
- name: qaQuestionId
value: string
UPDATE
examples
- patch
Updates a QaQuestion.
UPDATE google.contactcenterinsights.qa_questions
SET
data__name = '{{ name }}',
data__abbreviation = '{{ abbreviation }}',
data__questionType = '{{ questionType }}',
data__predefinedQuestionConfig = '{{ predefinedQuestionConfig }}',
data__questionBody = '{{ questionBody }}',
data__answerInstructions = '{{ answerInstructions }}',
data__answerChoices = '{{ answerChoices }}',
data__tags = '{{ tags }}',
data__order = {{ order }},
data__metrics = '{{ metrics }}',
data__tuningMetadata = '{{ tuningMetadata }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND qaScorecardsId = '{{ qaScorecardsId }}' --required
AND revisionsId = '{{ revisionsId }}' --required
AND qaQuestionsId = '{{ qaQuestionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
abbreviation,
answerChoices,
answerInstructions,
createTime,
metrics,
order,
predefinedQuestionConfig,
questionBody,
questionType,
tags,
tuningMetadata,
updateTime;
DELETE
examples
- delete
Deletes a QaQuestion.
DELETE FROM google.contactcenterinsights.qa_questions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND qaScorecardsId = '{{ qaScorecardsId }}' --required
AND revisionsId = '{{ revisionsId }}' --required
AND qaQuestionsId = '{{ qaQuestionsId }}' --required;