Feedback loop for text analysis
In Pega Platform, you can improve the accuracy of text analytics models in your application by manually correcting unexpected or inaccurate text analysis results.
Using the pxCaptureTAFeedback activity, you can create a feedback loop for your models. For example, you can change a sentiment value from positive to negative. You can then update the model that performed the analysis by feeding it the corrected outcomes. By continuously gathering and feeding feedback data to your machine-learning models, you can gradually improve the accuracy of text analysis in your application.Consider the following sample text:
I love @Company, we always have this random battle where I fight for internet connection for an hour or so.
Sarcastic comments like this are often a challenge for machine classifiers because, in natural language, people can express negative emotions through positive words.
You can specify the expected outcome of the analysis and submit it to the machine-learning model so that the model can learn from that outcome. See the following figure for reference:
That outcome is then stored in the internal pr_data_model_training table until you feed it to the model in your application, for example, through the Prediction Studio.
For more information, see Feeding the feedback data to text analytics models.
Feedback loop data model
The data model for the feedback loop is defined in the Data-Decision-Model-Training class. This class contains several properties, the most important of which are the following:
- pyType
- Defines the type of data that the text input represents, for example, Train or Test.
- pxModelType
- Defines the type of text analysis model, for example, Sentiment, Intent, Entity, and so on.
- pyMachineOutcome
- Contains the predicted outcome of machine analysis, for example, a sentiment value, an intent match, or a detected category.
- pyActualResult
- The expected outcome of the text analysis. You can manually specify this property. For example, you can specify a different sentiment value, detected category, entity, intent match, and so on.
- pxVersion
- The model version. Whenever a text analytics model is updated with new feedback, the model's version number increases.
The properties can be seen in the following figure:
Previous topic Intelligent interaction in text analytics Next topic Training data size considerations for building text analytics models