- Resource: Answer
- JSON representation
- State
- Citation
- CitationSource
- GroundingSupport
- Reference
- UnstructuredDocumentInfo
- ChunkContent
- ChunkInfo
- DocumentMetadata
- StructuredDocumentInfo
- Step
- State
- Action
- SearchAction
- Observation
- SearchResult
- SnippetInfo
- ChunkInfo
- QueryUnderstandingInfo
- QueryClassificationInfo
- Type
- AnswerSkippedReason
- Methods
Resource: Answer
Defines an answer.
JSON representation |
---|
{ "name": string, "state": enum ( |
Fields | |
---|---|
name |
Immutable. Fully qualified name |
state |
The state of the answer generation. |
answer |
The textual answer. |
citations[] |
Citations. |
grounding |
Optional. Grounding supports. |
references[] |
References. |
related |
Suggested related questions. |
steps[] |
Answer generation steps. |
query |
Query understanding information. |
answer |
Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. |
create |
Output only. Answer creation timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
complete |
Output only. Answer completed timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
grounding |
A score in the range of [0, 1] describing how grounded the answer is by the reference chunks. |
State
Enumeration of the state of the answer generation.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unknown. |
IN_PROGRESS |
Answer generation is currently in progress. |
FAILED |
Answer generation currently failed. |
SUCCEEDED |
Answer generation has succeeded. |
STREAMING |
Answer generation is currently in progress. |
Citation
Citation info for a segment.
JSON representation |
---|
{
"startIndex": string,
"endIndex": string,
"sources": [
{
object ( |
Fields | |
---|---|
start |
Index indicates the start of the segment, measured in bytes (UTF-8 unicode). |
end |
End of the attributed segment, exclusive. |
sources[] |
Citation sources for the attributed segment. |
CitationSource
Citation source.
JSON representation |
---|
{ "referenceId": string } |
Fields | |
---|---|
reference |
ID of the citation source. |
GroundingSupport
Grounding support for a claim in answerText
.
JSON representation |
---|
{
"startIndex": string,
"endIndex": string,
"sources": [
{
object ( |
Fields | |
---|---|
start |
Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode). |
end |
Required. End of the claim, exclusive. |
sources[] |
Optional. Citation sources for the claim. |
grounding |
A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks. |
grounding |
Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore |
Reference
Reference.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field content . Search result content. content can be only one of the following: |
|
unstructured |
Unstructured document information. |
chunk |
Chunk information. |
structured |
Structured document information. |
UnstructuredDocumentInfo
Unstructured document information.
JSON representation |
---|
{
"document": string,
"uri": string,
"title": string,
"chunkContents": [
{
object ( |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. |
title |
Title. |
chunk |
List of cited chunk contents derived from document content. |
struct |
The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result. |
ChunkContent
Chunk content.
JSON representation |
---|
{ "content": string, "pageIdentifier": string, "relevanceScore": number } |
Fields | |
---|---|
content |
Chunk textual content. |
page |
Page identifier. |
relevance |
The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation. |
ChunkInfo
Chunk information.
JSON representation |
---|
{
"chunk": string,
"content": string,
"documentMetadata": {
object ( |
Fields | |
---|---|
chunk |
Chunk resource name. |
content |
Chunk textual content. |
document |
Document metadata. |
relevance |
The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation. |
DocumentMetadata
Document metadata.
JSON representation |
---|
{ "document": string, "uri": string, "title": string, "pageIdentifier": string, "structData": { object } } |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. |
title |
Title. |
page |
Page identifier. |
struct |
The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result. |
StructuredDocumentInfo
Structured search information.
JSON representation |
---|
{ "document": string, "structData": { object } } |
Fields | |
---|---|
document |
Document resource name. |
struct |
Structured search data. |
Step
Step information.
JSON representation |
---|
{ "state": enum ( |
Fields | |
---|---|
state |
The state of the step. |
description |
The description of the step. |
thought |
The thought of the step. |
actions[] |
Actions. |
State
Enumeration of the state of the step.
Enums | |
---|---|
STATE_UNSPECIFIED |
Unknown. |
IN_PROGRESS |
Step is currently in progress. |
FAILED |
Step currently failed. |
SUCCEEDED |
Step has succeeded. |
Action
Action.
JSON representation |
---|
{ "observation": { object ( |
Fields | |
---|---|
observation |
Observation. |
Union field action . The action. action can be only one of the following: |
|
search |
Search action. |
SearchAction
Search action.
JSON representation |
---|
{ "query": string } |
Fields | |
---|---|
query |
The query to search. |
Observation
Observation.
JSON representation |
---|
{
"searchResults": [
{
object ( |
Fields | |
---|---|
search |
Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user. |
SearchResult
JSON representation |
---|
{ "document": string, "uri": string, "title": string, "snippetInfo": [ { object ( |
Fields | |
---|---|
document |
Document resource name. |
uri |
URI for the document. |
title |
Title. |
snippet |
If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets. |
chunk |
If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info. |
struct |
Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result. |
SnippetInfo
Snippet information.
JSON representation |
---|
{ "snippet": string, "snippetStatus": string } |
Fields | |
---|---|
snippet |
Snippet content. |
snippet |
Status of the snippet defined by the search team. |
ChunkInfo
Chunk information.
JSON representation |
---|
{ "chunk": string, "content": string, "relevanceScore": number } |
Fields | |
---|---|
chunk |
Chunk resource name. |
content |
Chunk textual content. |
relevance |
The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation. |
QueryUnderstandingInfo
Query understanding information.
JSON representation |
---|
{
"queryClassificationInfo": [
{
object ( |
Fields | |
---|---|
query |
Query classification information. |
QueryClassificationInfo
Query classification information.
JSON representation |
---|
{
"type": enum ( |
Fields | |
---|---|
type |
Query classification type. |
positive |
Classification output. |
Type
Query classification types.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Unspecified query classification type. |
ADVERSARIAL_QUERY |
Adversarial query classification type. |
NON_ANSWER_SEEKING_QUERY |
Non-answer-seeking query classification type, for chit chat. |
JAIL_BREAKING_QUERY |
Jail-breaking query classification type. |
NON_ANSWER_SEEKING_QUERY_V2 |
Non-answer-seeking query classification type, for no clear intent. |
AnswerSkippedReason
An enum for answer skipped reasons.
Enums | |
---|---|
ANSWER_SKIPPED_REASON_UNSPECIFIED |
Default value. The answer skipped reason is not specified. |
ADVERSARIAL_QUERY_IGNORED |
The adversarial query ignored case. |
NON_ANSWER_SEEKING_QUERY_IGNORED |
The non-answer seeking query ignored case Google skips the answer if the query is chit chat. |
OUT_OF_DOMAIN_QUERY_IGNORED |
The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results. |
POTENTIAL_POLICY_VIOLATION |
The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic. |
NO_RELEVANT_CONTENT |
The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results. |
JAIL_BREAKING_QUERY_IGNORED |
The jail-breaking query ignored case. For example, "Reply in the tone of a competing company's CEO". Google skips the answer if the query is classified as a jail-breaking query. |
CUSTOMER_POLICY_VIOLATION |
The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer. |
NON_ANSWER_SEEKING_QUERY_IGNORED_V2 |
The non-answer seeking query ignored case. Google skips the answer if the query doesn't have clear intent. |
LOW_GROUNDED_ANSWER |
The low-grounded answer case. Google skips the answer if a well grounded answer was unable to be generated. |
Methods |
|
---|---|
|
Gets a Answer. |