Skip to main content

qa_questions

Creates, updates, deletes, gets or lists a qa_questions resource.

Overview

Nameqa_questions
TypeResource
Idgoogle.contactcenterinsights.qa_questions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the question. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question}
abbreviationstringShort, descriptive string, used in the UI where it's not practical to display the full question body. E.g., "Greeting".
answerChoicesarrayA list of valid answers to the question, which the LLM must choose from.
answerInstructionsstringInstructions describing how to determine the answer.
createTimestring (google-datetime)Output only. The time at which this question was created.
metricsobjectMetrics 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)
orderinteger (int32)Defines the order of the question within its parent scorecard revision.
predefinedQuestionConfigobjectThe configuration of the predefined question. This field will only be set if the Question Type is predefined. (id: GoogleCloudContactcenterinsightsV1QaQuestionPredefinedQuestionConfig)
questionBodystringQuestion text. E.g., "Did the agent greet the customer?"
questionTypestringThe type of question.
tagsarrayQuestions 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.
tuningMetadataobjectMetadata 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)
updateTimestring (google-datetime)Output only. The most recent time at which the question was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, qaScorecardsId, revisionsId, qaQuestionsIdGets a QaQuestion.
listselectprojectsId, locationsId, qaScorecardsId, revisionsIdpageSize, pageTokenLists QaQuestions.
createinsertprojectsId, locationsId, qaScorecardsId, revisionsIdqaQuestionIdCreate a QaQuestion.
patchupdateprojectsId, locationsId, qaScorecardsId, revisionsId, qaQuestionsIdupdateMaskUpdates a QaQuestion.
deletedeleteprojectsId, locationsId, qaScorecardsId, revisionsId, qaQuestionsIdDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
qaQuestionsIdstring
qaScorecardsIdstring
revisionsIdstring
pageSizeinteger (int32)
pageTokenstring
qaQuestionIdstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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;