Interpret prediction results from text sentiment analysis models

After requesting a prediction, Vertex AI returns results based on your model's objective. Predictions from sentiment analysis models return the overall sentiment for a document. The sentiment is represented by an integer from 0 to the model's max sentiment score, which can be equal to or less than 10. The maximum sentiment value for a model is set during training. For example, if a model was trained on a dataset with a maximum sentiment score of 2, predicted sentiment scores can be 0 (negative), 1 (neutral), or 2 (positive).

Example batch prediction output

The following sample is the predicted result for a single document. Because the model's maximum sentiment score is 8, the predicted sentiment for this sample is clearly positive.

{
  "instance": {"content": "gs://bucket/text.txt", "mimeType": "text/plain"},
  "prediction": {"sentiment": 8}
}