Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Feedback loop for text analysis

Updated on July 5, 2022

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:

Feedback loop in the NLP Sample application
Providing feedback for a sentiment analysis model with an unexpected sentiment value.

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:

Feedback loop data model
Properties of the Data-Decision-Model-Training class.
  • Previous topic Intelligent interaction in text analytics
  • Next topic Training data size considerations for building text analytics models

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us