RecommendResponse
Stay organized with collections
Save and categorize content based on your preferences.
Response message for Recommend method.
JSON representation |
{
"results": [
{
object (RecommendationResult )
}
],
"attributionToken": string,
"missingIds": [
string
],
"validateOnly": boolean
} |
Fields |
results[] |
object (RecommendationResult )
A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).
|
attributionToken |
string
A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
|
missingIds[] |
string
IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.
|
validateOnly |
boolean
True if RecommendRequest.validate_only was set.
|
RecommendationResult
RecommendationResult represents a generic recommendation result with associated metadata.
JSON representation |
{
"id": string,
"document": {
object (Document )
},
"metadata": {
string: value,
...
}
} |
Fields |
id |
string
Resource ID of the recommended Document.
|
document |
object (Document )
Set if returnDocument is set to true in RecommendRequest.params .
|
metadata |
map (key: string, value: value (Value format))
Additional Document metadata or annotations. Possible values:
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-03 UTC."],[[["The `Recommend` method returns a response message that includes a list of recommended documents, an attribution token, a list of missing document IDs, and a boolean flag indicating if it was a validate-only request."],["`RecommendationResult` provides details about each recommended document, including its ID, associated document object (if requested), and metadata such as recommendation score."],["The `attributionToken` is essential for logging user events and tracking recommendation model performance."],["The `missingIds` field in the response indicates any document IDs that were requested but not found within the default Branch."],["The `validateOnly` field in the `Recommend` method response indicates whether or not `RecommendRequest.validate_only` has been set to true."]]],[]]