URI: /api/conversation/v1/ratings
CreateExchangeRating
The Feedback API provides and manages user feedback for a given exchange and response answer. This collects user input assessing the accuracy of the question/answer pair, which powers the Verified Answer feature of the platform.
Input model
Field Name | Type | Description | Example Value |
rating_id required |
int32 | UUID that uniquely identifies a particular exchange rating. Automatically generated on create. | 1 |
exchange_id required |
int32 | This is an ExchangeResponseData's exchange_id from Exchange API's response. ExchangeRatings can only be created for exchanges matching active domains. | abe96862-7700-4547-978d-213085d1e1cc |
output_id required |
string | The ID of the output that this feedback is for. Relevant to n-best exchange responses. Defaults to "best_1". | best_1 |
creator_id |
string | Output field only, automatically populated. User ID (e.g. email address) that provided this feedback. | email@pryoninc.com |
question |
string | Output field only, automatically populated. The question that was recorded for the exchange that is being rated. | What is ML? |
rank required |
int32 | The rank value given by the user. Range from 1 to 5 with 5 being the most positive rating. | 1 |
message optional |
string | User comment that provides additional context on the rating. | 5: The answer was on topic and helpful. |
freeform_text optional |
string |
Freeform text for the feedback provider. |
I found the information very helpful. |
Request sample
Show code
{ "data": { "rating_id": "string", "exchange_id": "string", "output_id": "string", "creator_id": "string", "question": "string", "rank": 0, "message": "string", "freeform_text": "string" } }
Response sample
Show code
{ "metadata": { "uuid": "string", "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "response_time_millis": 0 }, "data": { "rating_id": "string", "exchange_id": "string", "output_id": "string", "creator_id": "string", "question": "string", "rank": 0, "message": "string", "freeform_text": "string" } }
ListExchangeRatingReviews
Request sample
Show code
{
"data": {
"rating_id": "string",
"exchange_id": "string",
"output_id": "string",
"creator_id": "string",
"question": "string",
"rank": 0,
"message": "string",
"freeform_text": "string"
}
}
Response sample
Show code
{
"metadata": {
"uuid": "string",
"response_time_millis": 0
},
"items": [
{
"metadata": {
"uuid": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"response_time_millis": 0
},
"data": {
"rating": {
"rating_id": "string",
"exchange_id": "string",
"output_id": "string",
"creator_id": "string",
"question": "string",
"rank": 0,
"message": "string",
"freeform_text": "string"
},
"collection_id": "string",
"knowledge_domain_id": "string",
"reviewer_ids": [
"string"
],
"flagged": true,
"approval_id": "string",
"status": "UNSPECIFIED"
}
}
],
"next_page_token": "string",
"total_size": 0,
"page_size": 0,
"order_by": "string"
}
UpdateExchangeRating
Field Name | Type | Description | Example Value |
rating_id required |
int32 | UUID that uniquely identifies a particular exchange rating. Automatically generated on create. | 1 |
exchange_id required |
int32 | This is an ExchangeResponseData's exchange_id from Exchange API's response. ExchangeRatings can only be created for exchanges matching active domains. | 2 |
output_id required |
string | The ID of the output that this feedback is for. Relevant to n-best exchange responses. Defaults to best_1. | best_1 |
creator_id |
string | Output field only, automatically populated. User ID (e.g. email address) that provided this feedback. | email@pryoninc.com |
question |
string | Output field only, automatically populated. The question that was recorded for the exchange that is being rated. | What is ML? |
rank required |
int32 | The rank value given by the user. Range from 1 to 5 with 5 being the most positive rating. | 2 |
message optional |
string | User comment that provides additional context on the rating. | 5: The answer was on topic and helpful. |
freeform_text optional |
string |
Freeform text for the feedback provider. |
I found the information very helpful. |
Request sample
Show code
{
"data": {
"rating_id": "string",
"exchange_id": "string",
"output_id": "string",
"creator_id": "string",
"question": "string",
"rank": 0,
"message": "string",
"freeform_text": "string"
},
"update_mask": [
"string"
]
}
Response sample
Show code
{
"metadata": {
"uuid": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"response_time_millis": 0
},
"data": {
"rating_id": "string",
"exchange_id": "string",
"output_id": "string",
"creator_id": "string",
"question": "string",
"rank": 0,
"message": "string",
"freeform_text": "string"
}
}
UpdateExchangeRatingReview
Field Name | Type | Description | Example Value |
rating_id required |
int32 | UUID that uniquely identifies a particular exchange rating. Automatically generated on create. | 1 |
exchange_id required |
int32 | This is an ExchangeResponseData's exchange_id from Exchange API's response. ExchangeRatings can only be created for exchanges matching active domains. | 2 |
output_id required |
string | The ID of the output that this feedback is for. Relevant to n-best exchange responses. Defaults to best_1. | best_1 |
creator_id |
string | Output field only, automatically populated. User ID (e.g. email address) that provided this feedback. | 5 |
question |
string | Output field only, automatically populated. The question that was recorded for the exchange that is being rated. | What is ML? |
rank required |
int32 | The rank value given by the user. Range from 1 to 5 with 5 being the most positive rating. | 2 |
message optional |
string | User comment that provides additional context on the rating. For example, a rating of 5 means "The answer was on topic and helpful." | 5: The answer was on topic and helpful. |
freeform_text optional |
string |
Freeform text for the feedback provider. |
I found the information very helpful. |
collection_id required
|
int32 |
Filter list output to only include ratings for a knowledge collection. In REST form the parameter is expressed as collection_id. |
2204dpad-b3f8-46y7-h944-0000a8f4bd9d |
knowledge_domain_id |
string |
UUID of the knowledge domain from which the exchange being rated came. Automatically populated on create. Immutable. |
5572cd8-65e9-46y7-9733-d2d7d123zz5z |
reviewer_ids |
array of strings |
Output field only, automatically populated. IDs of the reviewing authorities that viewed/inspected this item. |
|
flagged |
boolean |
Reviewing authorities can flag this rating item upon inspection. The exact meaning of flagging is intentionally vague and is left to the API to use as necessary. |
flagged |
approval_id |
string |
Output field only, automatically populated. The approval item related to this exchange rating. May be empty. |
1 |
status optional |
string |
Filter list output to only include ratings that are in requested review status. Defaults to UNSPECIFIED which disables this filter. In REST form the parameter is expressed as status; with valid values PENDING and COMPLETE.
|
Default: "UNSPECIFIED"
Enum: "UNSPECIFIED"
"PENDING" "COMPLETE"
|
update_mask required |
array of strings |
The data path corresponding to the fields being updated in this request. Exchange Rating Reviewer can update the following fields:
|
format: updateMask: "data.flagged"
|
Request sample
Show code
{
"data": {
"rating_id": "string",
"exchange_id": "string",
"output_id": "string",
"creator_id": "string",
"question": "string",
"rank": 0,
"message": "string",
"freeform_text": "string"
}
}
Response sample
Show code
{
"metadata": {
"uuid": "string",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"response_time_millis": 0
},
"data": {
"rating": {
"rating_id": "string",
"exchange_id": "string",
"output_id": "string",
"creator_id": "string",
"question": "string",
"rank": 0,
"message": "string",
"freeform_text": "string"
},
"collection_id": "string",
"knowledge_domain_id": "string",
"reviewer_ids": [
"string"
],
"flagged": true,
"approval_id": "string",
"status": "UNSPECIFIED"
}
}