REST Resource: projects.answerRecords

Resource: 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:

  • sessions.detectIntent intent matching
  • sessions.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 suggestions.list API. Together with the answers, AnswerRecord.name are returned to the customers.
  2. The customer uses the AnswerRecord.name to call the [answerRecords.patch][] method to send feedback about a specific answer that they believe is wrong.
JSON representation
{
  "name": string,
  "answerFeedback": {
    object (AnswerFeedback)
  },
  "agentAssistantRecord": {
    object (AgentAssistantRecord)
  }
}
Fields
name

string

The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>.

answerFeedback

object (AnswerFeedback)

Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer.

agentAssistantRecord

object (AgentAssistantRecord)

Output only. The record for human agent assistant.

AnswerFeedback

Represents feedback the customer has about the quality & correctness of a certain answer in a conversation.

JSON representation
{
  "correctnessLevel": enum (CorrectnessLevel),
  "clicked": boolean,
  "clickTime": string,
  "displayed": boolean,
  "displayTime": string,
  "agentAssistantDetailFeedback": {
    object (AgentAssistantFeedback)
  }
}
Fields
correctnessLevel

enum (CorrectnessLevel)

The correctness level of the specific answer.

clicked

boolean

Indicates whether the answer/item was clicked by the human agent or not. Default to false.

clickTime

string (Timestamp format)

Time when the answer/item was clicked.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

displayed

boolean

Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.

displayTime

string (Timestamp format)

Time when the answer/item was displayed.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

agentAssistantDetailFeedback

object (AgentAssistantFeedback)

Optional. Detail feedback of agent assistant suggestions.

CorrectnessLevel

The correctness level of an answer.

Enums
CORRECTNESS_LEVEL_UNSPECIFIED Correctness level unspecified.
NOT_CORRECT Answer is totally wrong.
PARTIALLY_CORRECT Answer is partially correct.
FULLY_CORRECT Answer is fully correct.

AgentAssistantFeedback

Detail feedback of Agent Assistant result.

JSON representation
{
  "answerRelevance": enum (AnswerRelevance),
  "documentCorrectness": enum (DocumentCorrectness),
  "documentEfficiency": enum (DocumentEfficiency),
  "summarizationFeedback": {
    object (SummarizationFeedback)
  }
}
Fields
answerRelevance

enum (AnswerRelevance)

Optional. Whether or not the suggested answer is relevant.

For example:

documentCorrectness

enum (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."
documentEfficiency

enum (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, documentEfficiency is DocumentEfficiency.INEFFICIENT.

summarizationFeedback

object (SummarizationFeedback)

Feedback for conversation summarization.

AnswerRelevance

Relevance of an answer.

Enums
ANSWER_RELEVANCE_UNSPECIFIED Answer relevance unspecified.
IRRELEVANT Answer is irrelevant to query.
RELEVANT Answer is relevant to query.

DocumentCorrectness

Correctness of document.

Enums
DOCUMENT_CORRECTNESS_UNSPECIFIED Document correctness unspecified.
INCORRECT Information in document is incorrect.
CORRECT Information in document is correct.

DocumentEfficiency

Efficiency of document.

Enums
DOCUMENT_EFFICIENCY_UNSPECIFIED Document efficiency unspecified.
INEFFICIENT Document is inefficient.
EFFICIENT Document is efficient.

SummarizationFeedback

Feedback for conversation summarization.

JSON representation
{
  "startTimestamp": string,
  "submitTimestamp": string,
  "summaryText": string
}
Fields
startTimestamp

string (Timestamp format)

Timestamp when composing of the summary starts.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

submitTimestamp

string (Timestamp format)

Timestamp when the summary was submitted.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

summaryText

string

Text of actual submitted summary.

AgentAssistantRecord

Represents a record of a human agent assistant answer.

JSON representation
{

  // Union field answer can be only one of the following:
  "articleSuggestionAnswer": {
    object (ArticleAnswer)
  },
  "faqAnswer": {
    object (FaqAnswer)
  }
  // End of list of possible types for union field answer.
}
Fields
Union field answer. Output only. The agent assistant answer. answer can be only one of the following:
articleSuggestionAnswer

object (ArticleAnswer)

Output only. The article suggestion answer.

faqAnswer

object (FaqAnswer)

Output only. The FAQ answer.

ArticleAnswer

Represents article answer.

JSON representation
{
  "title": string,
  "uri": string,
  "snippets": [
    string
  ],
  "metadata": {
    string: string,
    ...
  },
  "answerRecord": string
}
Fields
title

string

The article title.

uri

string

The article URI.

snippets[]

string

Output only. Article snippets.

metadata

map (key: string, value: string)

A map that contains metadata about the answer and the document from which it originates.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

answerRecord

string

The name of answer record, in the format of "projects//locations//answerRecords/"

FaqAnswer

Represents answer from "frequently asked questions".

JSON representation
{
  "answer": string,
  "confidence": number,
  "question": string,
  "source": string,
  "metadata": {
    string: string,
    ...
  },
  "answerRecord": string
}
Fields
answer

string

The piece of text from the source knowledge base document.

confidence

number

The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).

question

string

The corresponding FAQ question.

source

string

Indicates which Knowledge Document this answer was extracted from. Format: projects/<Project ID>/locations/<Location ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>.

metadata

map (key: string, value: string)

A map that contains metadata about the answer and the document from which it originates.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

answerRecord

string

The name of answer record, in the format of "projects//locations//answerRecords/"

Methods

get
(deprecated)

Deprecated.

list

Returns the list of all answer records in the specified project in reverse chronological order.

patch

Updates the specified answer record.