Service Client: Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerRecordsClient
Client stub representing the remote AnswerRecords gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to dialogflow.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Dialogflow::V2::AnswerRecord - Compiled Protocol Buffers messages for google/cloud/dialogflow/v2/answer_record.proto
SYNOPSIS
use Google::Cloud::Dialogflow::V2::AnswerRecord;
my $msg = Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerRecord->new({
name => $name,
answer_feedback => $answer_feedback,
agent_assistant_record => $agent_assistant_record,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerRecord->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/v2/answer_record.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerRecord
Answer records are records to manage answer history and feedbacks for Dialogflow.
Currently, answer record includes:
- human agent assistant article suggestion - human agent assistant faq article
It doesn't include:
- `DetectIntent` intent matching - `DetectIntent` knowledge
Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated.
A typical workflow for customers provide feedback to an answer is:
1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are returned to the customers. 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] method to send feedback about a specific answer that they believe is wrong.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe unique identifier of this answer record. Format: `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>`.
$msg->answer_feedback()/$msg->answer_feedback($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerFeedback)Required. The AnswerFeedback for this record. You can set this with [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about this answer.
$msg->agent_assistant_record()/$msg->agent_assistant_record($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantRecord)Output only. The record for human agent assistant.
Google::Cloud::Dialogflow::V2::AnswerRecord::ListAnswerRecordsRequest
Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project to list all answer records for in reverse chronological order. Format: `projects/<Project ID>/locations/<Location ID>`.
$msg->filter()/$msg->filter($value)Type:
StringOptional. Filters to restrict results to specific answer records. The expression has the following syntax:
<field> <operator> <value> [AND <field> <operator> <value>] ...The following fields and operators are supported: * conversation_id with equals(=) operator
Examples:
* `conversation_id=bar` matches answer records in the `projects/foo/locations/global/conversations/bar` conversation (assuming the parent is `projects/foo/locations/global`).
For more information about filtering, see [API Filtering](https://aip.dev/160).
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. The [ListAnswerRecordsResponse.next_page_token][google.cloud.dialogflow.v2.ListAnswerRecordsResponse.next_page_token] value returned from a previous list request used to continue listing on the next page.
Google::Cloud::Dialogflow::V2::AnswerRecord::ListAnswerRecordsResponse
Response message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
Inherits from Protobuf::Message.
Accessors
$msg->answer_records()/$msg->answer_records($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerRecord)The list of answer records.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA token to retrieve next page of results. Or empty if there are no more results. Pass this value in the [ListAnswerRecordsRequest.page_token][google.cloud.dialogflow.v2.ListAnswerRecordsRequest.page_token] field in the subsequent call to `ListAnswerRecords` method to retrieve the next page of results.
Google::Cloud::Dialogflow::V2::AnswerRecord::UpdateAnswerRecordRequest
Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord].
Inherits from Protobuf::Message.
Accessors
$msg->answer_record()/$msg->answer_record($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerRecord)Required. Answer record to update.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Required. The mask to control which fields get updated.
Google::Cloud::Dialogflow::V2::AnswerRecord::AnswerFeedback
Represents feedback the customer has about the quality & correctness of a certain answer in a conversation.
Inherits from Protobuf::Message.
Accessors
$msg->correctness_level()/$msg->correctness_level($value)Type:
Enum(Google::Cloud::Dialogflow::V2::AnswerFeedback::CorrectnessLevel)The correctness level of the specific answer.
$msg->agent_assistant_detail_feedback()/$msg->agent_assistant_detail_feedback($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantFeedback)Detail feedback of agent assist suggestions.
$msg->clicked()/$msg->clicked($value)Type:
BoolIndicates whether the answer/item was clicked by the human agent or not. Default to false. For knowledge search and knowledge assist, the answer record is considered to be clicked if the answer was copied or any URI was clicked.
$msg->click_time()/$msg->click_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time when the answer/item was clicked.
$msg->displayed()/$msg->displayed($value)Type:
BoolIndicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
$msg->display_time()/$msg->display_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time when the answer/item was displayed.
Enum: AnswerFeedback::CorrectnessLevel
CORRECTNESS_LEVEL_UNSPECIFIED=>0NOT_CORRECT=>1PARTIALLY_CORRECT=>2FULLY_CORRECT=>3
Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantFeedback
Detail feedback of Agent Assist result.
Inherits from Protobuf::Message.
Accessors
$msg->answer_relevance()/$msg->answer_relevance($value)Type:
Enum(Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::AnswerRelevance)Optional. Whether or not the suggested answer is relevant.
For example:
* Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * [answer_relevance][google.cloud.dialogflow.v2.AgentAssistantFeedback.answer_relevance]: [AnswerRelevance.IRRELEVANT][google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance.IRRELEVANT]
$msg->document_correctness()/$msg->document_correctness($value)Type:
Enum(Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::DocumentCorrectness)Optional. Whether or not the information in the document is correct.
For example:
* Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_correctness]: [INCORRECT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness.INCORRECT]
$msg->document_efficiency()/$msg->document_efficiency($value)Type:
Enum(Google::Cloud::Dialogflow::V2::AgentAssistantFeedback::DocumentEfficiency)Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT].
$msg->summarization_feedback()/$msg->summarization_feedback($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantFeedback::SummarizationFeedback)Optional. Feedback for conversation summarization.
$msg->knowledge_search_feedback()/$msg->knowledge_search_feedback($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantFeedback::KnowledgeSearchFeedback)Optional. Feedback for knowledge search.
$msg->knowledge_assist_feedback()/$msg->knowledge_assist_feedback($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantFeedback::KnowledgeAssistFeedback)Optional. Feedback for knowledge assist.
$msg->companion_feedback()/$msg->companion_feedback($value)Type:
Message(Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantFeedback::CompanionFeedback)Optional. Feedback for companion agent.
Enum: AgentAssistantFeedback::AnswerRelevance
ANSWER_RELEVANCE_UNSPECIFIED=>0IRRELEVANT=>1RELEVANT=>2
Enum: AgentAssistantFeedback::DocumentCorrectness
DOCUMENT_CORRECTNESS_UNSPECIFIED=>0INCORRECT=>1CORRECT=>2
Enum: AgentAssistantFeedback::DocumentEfficiency
DOCUMENT_EFFICIENCY_UNSPECIFIED=>0INEFFICIENT=>1EFFICIENT=>2
Google::Cloud::Dialogflow::V2::AnswerRecord::AgentAssistantRecord
Represents a record of a human agent assist answer.
Inherits from Protobuf::Message.
Accessors
$msg->article_suggestion_answer()/$msg->article_suggestion_answer($value)Type:
Message(Google::Cloud::Dialogflow::V2::Participant::ArticleAnswer)Output only. The article suggestion answer.
$msg->faq_answer()/$msg->faq_answer($value)Type:
Message(Google::Cloud::Dialogflow::V2::Participant::FaqAnswer)Output only. The FAQ answer.
$msg->dialogflow_assist_answer()/$msg->dialogflow_assist_answer($value)Type:
Message(Google::Cloud::Dialogflow::V2::Participant::DialogflowAssistAnswer)Output only. Dialogflow assist answer.
$msg->generator_suggestion()/$msg->generator_suggestion($value)Type:
Message(Google::Cloud::Dialogflow::V2::Generator::GeneratorSuggestion)Output only. The generator suggestion.
$msg->companion_suggestion()/$msg->companion_suggestion($value)Type:
Message(Google::Cloud::Dialogflow::V2::Participant::CompanionSuggestion)Output only. The companion suggestion.
$msg->reactive_companion_suggestion()/$msg->reactive_companion_suggestion($value)Type:
Message(Google::Cloud::Dialogflow::V2::Participant::StreamingReactiveCompanionSuggestionsResponse::ReactiveModeResponse)Output only. The reactive companion suggestion.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::V2::AnswerRecord::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.