Create a Feedback Example

Adds a feedback example to the dataset associated with the specified model. Available in Einstein Vision API version 2.0 and later.

Request Parameters

Name

Type

Description

Available Version

data

string

Local image file to upload.

2.0

expectedLabel

string

Correct label for the example. Must be a label that exists in the dataset.

2.0

modelId

string

ID of the model that misclassified the image. The feedback example is added to the dataset associated with this model.

2.0

name

string

Name of the example. Optional. Maximum length is 180 characters.

2.0

If a model returns an incorrect prediction for an image, you can use that image to improve the model. You do this by adding the image to the dataset and retraining it to update the model. The misclassified images that you add to the dataset are known as feedback. Use this API to add a misclassified image with the correct label to the dataset from which the model was created.

This call supports only datasets that have a type of image or image-multi-label.

Keep the following points in mind when creating feedback examples.

  • You pass in a modelId parameter, but the example is added to the dataset from which the specified model was created.

  • If you omit the name request parameter, the API uses the file name for the example name.

  • Feedback examples must have unique names. If an example with the same name exists in the dataset, you'll receive an error. This rule applies whether the API uses the file name as the example name or whether you pass in an example name in the name parameter.

  • After you add a feedback example, you can return information about it, along with a URL to access the image. The URL expires in 30 minutes.

  • Add a feedback example to only one label per call.

  • For datasets of type image and image-multi-label, the maximum image file size is 1 MB. For datasets of type image-detection, the maximum image file size is 5 MB.

  • The supported image file types are PNG, JPG, and JPEG.

Response Body

Name

Type

Description

Available Version

createdAt

date

Date and time that the feedback example was created.

2.0

id

long

ID of the feedback example.

2.0

label

object

Contains information about the label that the feedback example is associated with.

2.0

location

string

URL of the image in the dataset. This is a temporary URL that expires in 30 minutes. This URL can be used to display images that were uploaded to a dataset in a UI.

2.0

name

string

Name of the feedback example.

2.0

object

string

Object returned; in this case, example.

2.0

Label Response Body

Name

Type

Description

Available Version

datasetId

long

ID of the dataset to which the feedback example’s label belongs.

2.0

id

long

ID of the feedback example’s label.

2.0

name

string

Name of the feedback example’s label.

2.0

numExamples

int

Number of examples that have the label.

2.0

Language