Sentiment analysis using ChatGPT: Boost your research using AI

by | Mar 27, 2023 | How to, User Experience | 0 comments

Reading Time: 4 minutes

Sentiment analysis (or opinion mining) is a crucial aspect of the user research process that allows UX designers and researchers to gain valuable insights into customer feedback, user testing data, and other forms of text data. However, manually analyzing large amounts of text data for sentiment can be time-consuming and labor-intensive, making it difficult for UX professionals to extract meaningful insights quickly. In this article, we’ll explore how to use the Information Labeling feature of Chat-GPT, along with other language models, to analyze sentiment in text data from user research quickly and efficiently. With these techniques, you’ll be able to analyze the sentiment of large amounts of data within seconds, allowing you to make more informed decisions in your UX research and design projects.

Character limit challenge: Overcoming the 4096-character limit

Chat-GPT has an incredible number of language models at its disposal, many of which are most suited for sentiment analysis. Analyzing the sentiment of a text is an easy task but it can be quickly turned into a struggle when trying to analyze a huge amount of data

The issue is not about its general capabilities, but rather about its characters’ limit of 4096 in a single sendable message from you. This number may seem a lot at first glance but it’s not that much if you think about the volume of the average data you would need to process when running user research.

So this is the problem, you can’t break down your 1000 users’ responses into smaller messages and treat them separately because you need to analyze the data in its entirety. Here is where its Information Labeling feature comes in help.

Information labeling: Utilizing the Information labeling feature

The information Labeling is not exactly a hidden feature per se, but rather one that Chat-GPT does not talk spontaneously about. It’s the ability to send a text message in chat, give it a name for future reference, and act upon it later. This way you can have Chat-GPT work on it simply by referring to it. The whole point is creating multiple labeled information, merging them into one big labeled information, and running the sentiment analysis (or other analysis in general) on the new piece of information.

Chat-GPT will not be able to show the content of all the information you just labeled into a single message since it will exceed the number of total characters but don’t ’worry, it’s still able to process it and run every possible action on it. Your data is safe.

Data preparation: Breaking down and labeling data

The process is quite simple, you just need to go step-by-step.

First, divide your data into smaller pieces, let’s say something around 3000-3500 characters per message. Then start by sending your first set of data in the chat enclosed in quotation marks, for example:

“This is what your message would look like, only longer”

followed by the command in the same message:

I want to label this information as label_name_part_1. Confirm both the acquisition and the labeling.

The request for a confirmation is not mandatory, but it is better to be safe than sorry. The name given to your label must use the underscore symbol instead of spaces and you must mention that the information you are labeling is a “part_1”, meaning that you are about to create a file composed of multiple parts.

At this point, keep sending the other pieces of data following the same script. The only difference is that you will name each part with a different number. So there will be “part_2” and then “part_3” and so on.

Merging labeled data: Combining data for analysis

Now you have sent all the different pieces of data, let’s say they were 3 different pieces. Write another message where you ask Chat-GPT to merge them into one single piece. Use this command:

Merge label_name_part_1, label_name_part_2, label_name_part_3 into label_name. Confirm the labeling.

Done, you have created a document to use at your will. From now on you can ask Chat-GPT to run whatever task on the document. From sentiment analysis to text summarizing. You could even ask Chat-GPT to write the report for you later

Language model selection: Choosing the right language model for sentiment analysis

Finally, you have done all the preparation and you need to run the sentiment analysis. You can use the GPT-4 language model if you’re using the plus version, but in case you’re on the free version the best 3 language models for sentiment analysis are: BERT-Base, RoBERTa-Large, and XLNet-Large.

Sentiment analysis criteria: Factors to consider in language model selection

All three language models have their strengths and weaknesses, to choose the best language model in every case and situation, these are the criteria you should keep in mind:

Dataset size:

If you have a smaller dataset, BERT-Base may be a better choice because it is a smaller model and requires less training data. On the other hand, if you have a large dataset, RoBERTa-Large or XLNet-Large may be more effective because they have been trained on larger amounts of data.

Performance metrics:

If you are optimizing for accuracy, RoBERTa-Large may be the best choice because it has been shown to achieve state-of-the-art performance on several NLP tasks, including sentiment analysis. However, if you are optimizing for speed or memory usage, BERT-Base may be a better choice because it is a smaller model and requires fewer computational resources.

Computational resources:

If you have limited computational resources, BERT-Base may be the best choice because it requires less memory and processing power than RoBERTa-Large or XLNet-Large. However, if you have access to powerful hardware, RoBERTa-Large or XLNet-Large may be more effective because they are larger models and can benefit from more computational resources.

Task complexity:

If your sentiment analysis task involves capturing the nuances and subtleties of natural language text, RoBERTa-Large or XLNet-Large may be the best choice because they are effective at capturing these nuances. However, if your task involves simpler sentiment analysis, BERT-Base may be a more efficient choice.

Running the analysis: Executing sentiment analysis with the chosen language model

Once you have done all the preparation required, type in chat: “Use [language model you have chosen] and run a sentiment analysis on [name of your labeled information]”. This command is pretty simple and you can use it for every other analysis you might need.

At this point, Chat-GPT will give you the report and you will have all the work ready to use.


Sentiment analysis is a vital component of user research, enabling UX professionals to gain valuable insights into customer feedback and user testing data. However, the manual analysis of large text data sets can be labor-intensive and time-consuming. By leveraging the Information Labeling feature of Chat-GPT and choosing the appropriate language models, you can efficiently analyze sentiment in large volumes of text data within seconds. This approach not only saves time but also empowers you to make more informed decisions in your UX research and design projects. With the techniques outlined in this article, you can harness the power of Chat-GPT and other language models to streamline sentiment analysis and uncover valuable insights from user research data.

5 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments