AI-powered text analysis is revolutionizing how researchers categorize open-ended responses—making it faster, more accurate, and easier to scale. That's why it is now an integral part of Displayr's text analysis capabilities. To maximize efficiency, we leverage advanced Artificial Intelligence (AI) and Natural Language Processing (NLP) to identify themes and automatically categorize your text data.
However, we know that every survey is different, and therefore, the analysis requirements will vary. That's why we've made it easy for you to customize the prompts and optimize results.
Here is a guide on some of the different ways you can customize your prompts to suit the data you are analyzing.
How To Customize Prompts in Displayr
The custom prompt functionality is built into the Displayr text analysis workflow. To access it, simply enable Displayr AI, then tick the Custom prompt option after you select either Create or Classify.
You can delete the existing prompt in the text box, and then enter your custom prompt.
Remember, you can customize the prompt used to create themes, the prompt used to classify responses, or both.
Customize The Prompt When Creating Themes
Whether it's the number of themes you use or if you want to create topic-specific themes, there are so many different ways you can build out your themes when analyzing text. Here are some examples:
Automatic selection of the number of themes:
A common challenge when creating themes is deciding on the appropriate number of themes. There is never any magical 'right' number of themes to select. Smaller sample sizes might need between 3-5, and larger studies more, but determining the correct number is usually a process of trial and error. However, a well-constructed custom prompt can automate this process.
Example prompt: The task of the bot is to group similar responses from the survey into an appropriate number of categories. The number of categories should be determined based on the variety of themes present in the responses, ensuring the grouping is neither too broad nor overly specific. Aim for a balanced categorization that accurately reflects the diversity of opinions while maintaining clarity and coherence.
Themes that combine sentiment and topic
Take a survey that asked tourists about their thoughts on France. For such a broad question, it's likely the responses will cover a range of themes, such as food, culture, fashion, and so on. To get a more detailed understanding on the opinions of the tourists, the responses can be categorized into themes that cover both sentiment and topic. See below.
Example prompt: The task of the bot is to group similar responses from the survey question "Thoughts about France" into exactly 10 categories. Each category must begin with the sentiment (Negative, Positive, or Neutral), followed by a hyphen (-) and a concise theme that summarizes the main topic of the responses. Ensure that the categories cover a diverse range of themes while maintaining clarity and relevance.
Format for each category:
- Sentiment: Negative/Positive/Neutral
- Theme: A brief description of the main topic of the response.
Example category:
Negative - The locals' attitude is bad.
Hierarchical themes
Many researchers use a hierarchical approach to theme creation, in which broader codes are used to provide an overview, while detailed lower order themes can be used for more specific analysis. With custom prompts, you can easily get this mix of breadth and granularity in your analysis.
Example prompt: The bot's task is to group the survey responses, which are generated from the question "Thoughts about France," into exactly 10 categories. Each category must begin with the main theme, followed by a “-” and the sub-theme. Ensure that the categories are distinct, meaningful, and logically structured, capturing the diversity of opinions while avoiding redundancy.
Format for each category:
- Main Theme: A broad category that represents the general topic of the responses.
- Sub-themes: Specific reasons that contribute to or elaborate on the main theme.
Example category:
Culture and Heritage - Art and Architecture
Topic-specific themes
Another way to utilize the custom prompt feature is to tailor the analysis to focus on topics that are relevant to your industry. To use the example of the survey data about France again, creating tourism-specific topics would help better inform local business decisions moving forward.
Example prompt: The job of the bot is to group similar text into exactly 10 categories. The text has been generated from a survey. The survey asks "Thoughts about France".
Context: I am analyzing a survey for my client, a tourism business based in France (https://www.france.fr/en/). The goal is to gain insights into people's opinions, interests, and preferences about France, allowing me to recommend the most relevant tourism activities and experiences. The categories should capture key themes and specific interests, providing actionable insights that can guide business decisions. This analysis will help identify the most appealing activities and experiences for potential visitors, ultimately shaping strategies to better serve clients in the tourism sector.
Customize The Prompt For Classifying Responses Into Themes
Once your themes are set, it’s time to classify. Custom prompts make it easy to capture nuance, improve accuracy, and adapt the classification to match your themes. You can use custom prompts whether the themes have been created manually or with AI.
Confidence-based classification
In some cases, you may end up dealing with lots of ambiguous open-ended survey responses, risking misclassification and skewed results. Confidence-based classification allows you to set a minimum confidence level (e.g., 90%) so that only responses the AI is highly sure about are assigned to a theme. You can see how this strategy can be used when working with data about differences in cola drinkers.
Example prompt: The job of the bot is to group similar text into the supplied categories. The text has been generated from a survey. The survey asks "Differences in Cola Drinkers: Jan-Feb Only".
Instruction:
- Your primary objective is to accurately classify the text into the appropriate categories based on the responses.
- If the confidence level for classifying a response is below 80%, leave it unclassified.
- For responses with a confidence level between 80% and 89%, also leave them unclassified to avoid errors.
- Only classify text if the confidence level is 90% or higher that the response fits a specific category.
Sentiment analysis
Sentiment analysis is one of the most widely used and effective ways to analyze text data. And with custom prompts, you can refine the way you define Positive, Negative, and Neutral sentiment based on your dataset for better results. (Hint: use the 'Sort by Similarity' feature when conducting sentiment analysis to group similar responses together and find answers faster).
Example prompt: The job of the bot is to group similar text into the supplied categories. The text has been generated from a survey. The survey asks "Thoughts about France".
Text should be classified into the following sentiment categories: Positive, Negative, Neutral. The bot will analyze the tone, context, and content of each text to determine the sentiment.
Use the classification examples below as a reference to group similar text into corresponding sentiment categories:
- Positive → I live France, I had the best time there!
- Negative → Mean people
- Neutral → N/A
Customize Both Prompts
To maximize the quality and relevance of your analysis, you can customize both the theme creation and classification prompts. By providing more context, you can guide the AI to produce themes and classifications that better reflect your objectives and the nuances in your data.
Additionally, the AI may occasionally ignore unclear responses or those that don’t express a preference. If you include a custom prompt indicating that this should be taken into account, the AI is more likely to consider it, helping ensure data completeness in theme generation.
For this example, think of a dataset from a survey that asked respondents to share what they like about specific cell phone providers. Some individuals might say "network service", while others would share "customer service". As both responses include 'service', there is a lot of subtlety in the language to confuse the AI when creating categories and classifying the responses.
Custom prompts are especially valuable in nuanced use cases like this.
See below.
Example Theme Generation Prompt: The job of the bot is to group similar text into meaningful categories. The text has been generated from a survey. The survey asks "Likes".
Ensure the categories comprehensively reflect the diversity and meaningful aspects of all responses, including those that express no clear preference or provide minimal or unclear input.
Example Response Classification Prompt: The job of the bot is to group similar text into the supplied categories. The text has been generated from a survey. The survey asks "Likes".
Please follow these guidelines:
- No Preference or Unclear: Only classify responses into this category if the participant explicitly says "Nothing" or uses similar wording (e.g., "I don't know," "Not sure").
- Service: Classify responses into this category when they refer to services in general, such as phrases like "Yes, very good all service," "Strong service," or "It’s great service."
- Network Service: Classify responses into this category when they specifically mention network-related services or use similar wording, such as "Unlimited service and hotspot for one price," "Great Wi-Fi," "Quick speed of mobile data," "Solid network connection."
- Customer Service: Classify responses into this category if they mention interactions with customer support or service representatives, such as "Help from staff," "Customer service was great," or "Assistance was fast."
Ensure that responses are accurately categorized based on the examples provided.
Prompting Best Practices
Customized prompts are a powerful way to get more from your text analysis in Displayr—but their effectiveness depends on how well they’re written. Clear, precise instructions are key, and crafting them is a skill in itself. The tips below will help you write better prompts and get more accurate results.
-
Be specific
Include as much detail as possible about the task, desired output format, and relevant context. The more specific your prompt, the more accurate and relevant the AI’s response will be. -
Provide an example
For more complex tasks, show the AI exactly what you’re after by giving a clear example of the input and desired output. This helps set expectations and improves consistency. -
Break down complex tasks
If your request involves multiple steps, break it into a sequence of smaller instructions. This helps the AI work through the task logically and avoids confusion.
For more in-depth guidance, you can read our tips on getting started with prompting in Displayr.
Ready to try custom prompting on your own text analysis? Get started for free.