Displayr incorporates advances in AI technology into our software to make it easier for you to analyze your data. These methods are built off of OpenAI technology to provide new and improved features in the software.
This article will walk you through different options that are available in Displayr.
- Built-in Displayr AI vs OpenAI Connection
- Tidy Your Labels
- Text Analytics
- Using AI Prompts to Create Outputs
- Help with Code
Built-in Displayr AI vs OpenAI Connection
There are a couple of different ways that you can utilize AI in Displayr:
Displayr AI
Our homegrown AI tool uses OpenAI in the background. It can be used to tidy labels and to assist in text categorization. You will need to enable Displayr AI to make use of these features. See Displayr AI to instructions on how to opt-in.
Connect your OpenAI account
This allows you to create AI-generated outputs using prompts and inputs directly from your data. You will need to connect your OpenAI account to Displayr. See Connecting Displayr to OpenAI for instructions and requirements.
Tidy Your Labels
Displayr AI allows you to tidy your variable labels upon import or when combining variables. See Better Variable Labeling on Import and Better Variable Set Labeling on Combine.
Text Analytics
Text Categorization
If you're looking for an AI-assist when it comes to classifying your text data, but still want some flexibility to refine and edit with a human eye, you can use Displayr AI text categorization. The built-in categorization tool allows you to utilize AI to help create themes and classify your text data, while still enabling to you create and modify themes and edit and refine the classification. For details on how to do this, go to How to Classify Text Data.
If you instead want to leave text categorization AI's hands, select the text variable in the Data Sources tree, hover, and click + > AI > Text Categorization. From there, enter a Prompt, click Calculate, and let AI do the rest.
In the example below, I have a text variable "Q6" that contains reasons why respondents would or would not purchase a new burger concept. I used AI > Text Categorization and prompted it to create the top 10 themes based on the text responses. The AI-generated themes are shown in the right column (ai.variable):
You can use the Prompt for more specific theme creation. For best results, your prompts need to be clear, specific, and concise, providing context when necessary.
Translation
You can use AI to translate your text data. This method will create a new text variable containing the translated text, which you can use for text categorization. Select the text variable that needs translation, then hover and click + > AI > Translate. From there, you can enter a Prompt and specify the Source language. The Source language dropdown includes options to auto-detect the input language and to specify using a variable if you have an existing variable with a list of languages in your data set.
Clean Text Data
Oftentimes, raw text data contains non-sensical responses, contain expletives, or are, in general, "garbage". You can identify good vs bad responses in your text variables by hovering over the variable and then clicking + > AI > Clean Text Data, and then entering a Prompt. For example:
A new variable will be created, which you can use as a filter variable and edit the raw data or remove cases, if necessary.
Sentiment Analysis
To take your text analysis a step further, you can assign numeric values to the text responses using AI to determine sentiment using AI > Sentiment. For example, I can take the translated hotel reviews from above and prompt AI to assign a value of 1 to positive reviews and -1 to negative reviews:
Using AI Prompts to Create Outputs
Using your connected OpenAI account, you can use various functions available from the AI button in the toolbar. They include outputs for:
- Basic Prompt - is an output where you can enter your own prompt when you don't need to pass any other data from your document.
- Custom - is an output where you can pass any data from your document along with a custom prompt.
- Data Analysis - is an output specifically built to layer AI capabilities with actual calculations (which AI models do not handle well directly). This feature allows you to use variables as inputs and enter a Prompt for AI to analyze the data (e.g., create a crosstab, estimate linear regression, etc.). Keep in mind AI's hallucination problem can still lead to errors in analysis, and results should be carefully scrutinized.
- Image - is an output that creates an image from a Prompt entered into the object inspector or other text items passed to it.
- Interpret - explains the data shown in an output (such as a table or regression). You can modify the default Prompt to interpret the output if needed, though it's not suggested that you use this feature to calculate further metrics from values shown in your output (use the Data Analysis feature above for that).
- Summary - is an output that creates a summary of selected text boxes. This is useful to create an executive summary in a report.
You can read more details and see examples for each in Using OpenAI in Displayr. See Getting Started with OpenAI Prompting in Displayr for tips to help improve your prompts when using the OpenAI features.
Help with Code
Before getting the AI to help write code, you should review the programming section of our writing prompts article. The features used to help you with programming in Displayr are:
- R Code - can help you generate code in the R language. It's useful for creating or checking code for calculations, calculation grids, and R variables. As discussed in Getting Started with OpenAI Prompting in Displayr, our R function libraries have not been specifically used to train the AI, thus it's recommended to search the Help Center for specific custom coding tasks such as creating formatted tables with our CreateCustomTable() function.
- QScript - QScripts are unique to Displayr, and are used to automate tasks in the app (such as creating new outputs and variables). They are written in JavaScript, which this output can generate or evaluate to help you create your own custom QScripts. As discussed in Getting Started with OpenAI Prompting in Displayr, our QScript function libraries have not been specifically used to train the AI, thus the AI may use incorrect function names (which can be confirmed in our general QScript documentation).