Text, Heading & AI Insights Generator Widgets

These simple steps will walk you through inserting a text or header widget into a template and customizing the formatting to match the look and feel you aim for. This article also has the information for using the AI Insights Generator text widget.

Inserting a Text Widget

Text widgets are perfect for adding commentary or guidance to a template or as a placeholder to add notes and commentary once your report is run. 

1. Access the Ninjacat Template Builder

2. Select the desired template page

3. Click to open the Typography section of the Widget Browser near the right

4. Click on the Text icon to insert a new text box

5. Double click into the text box to modify the text

6. Click off the text box and back onto it until you see a blue line surrounding it. You can now resize by dragging the blue circles and reposition the widget to wherever you want it to be on the page. 

📘

Use the yellow snapping lines (ensuring snapping is switched on at the bottom right of your screen) to line up your text widget exactly with other widgets on your template page.


Inserting a Header Widget

Header Widgets are the perfect way to guide a user through your data story. You can use them to title pages, sections, charts, and tables. 

1. Access the Ninjacat Template Builder

2. Select the desired template page

3. Click to open the Typography section of the Widget Browser near the right

4. Click on the Header Icon to insert a new Header Widget.

5. Double click into the Header widget to highlight the text and modify it to create your own header

6. You'll see under the properties section of the widget inspector on the right-hand side of the screen that you have 6 options to choose from, each representing a specific header style. The settings for these are defined in the Global Settings area. Select which of the header types is the most appropriate for your use case. 

7. Click off the Header widget and back onto it until you see a blue line surrounding it. You can now resize the widget by dragging the blue circles and repositioning the widget to wherever you want it to be on the page.


Using the AI Insights Generator Widget (BETA)

It is your job to turn data into insight. Interpreting data for your customers is time-consuming. NinjaCat has your back when it comes to translating data into meaningful strategy decisions. The AI Insights Generator is a widget that you can associate with a data widget in the template builder. It generates automated text about the associated data, based on a prompt and other language settings.

NinjaNote: This feature is in BETA. We recommend a testing period to refine the appended prompt and adjust the settings to achieve desired outcomes. Before integrating this widget into all your reports, test it with a small subset (10-15 reports) to understand its behavior and writing style.

📘

This tool uses OpenAI technology to generate responses based on the provided prompt, settings and associated data. However, the AI may sometimes produce incorrect or unexpected results, which can be beyond our control. We recommend continued review of the outputs and refining the prompt and settings. This tool is designed to save a significant amount of time in the reporting process, but not completely replace all human touch.

Beta Functionality Details:

  • Powered by OpenAI’s GPT4
  • Can be associated with one Data Widget (table, chart, etc). A list of all the data widgets on that currently viewed page will be listed in the dropdown.
  • This widget functions best in a static PDF and PPT Report format. In the future, we would like to improve its functionality in a Dashboard format (currently, you can expect inconsistent loading patterns when adjusting the filters and date range in a Dashboard setting).
  • The AI Insights Generator guesses how many words it thinks will fit based on the current font size, widget size, and other factors. The AI will provide a response with fewer words than this guess in order to fit the response in the given space.
  • If something about the Data widget changes (change in dims/mets), then the AI Insights Generator will reload w/ adjusted text.
  • Tokens: Every time we hit the API / every time we actually request the AI to give us a response, a certain number of tokens is used up on both the request and the response. Tokens equate to a certain cost (to NinjaCat).
  • The following token limitations are in place at this time; once hit, an error will occur within the AI Insights Generator Widget or prevent you from running successful reports with the AI Insights Generator Widget included until the next day’s allotment of tokens is available. Tokens are determined by both the prompt and the data. So if the widget is analyzing a very large amount of data then the widget might run out of tokens, even with a small prompt:
    • Individual Requests to the API - allow up to 128K tokens. If exceeded, an error will be returned (this is a ChatGPT-imposed limit, that we don’t expect to see hit).
    • Individual Responses from the API - allow up to 4,096 tokens on output (this is a ChatGPT-imposed limit, that we don’t expect to see hit)
    • Per day limit - Up to 1 million tokens per day per agency - this is the limit that we could expect to see hit, especially when the widget is scaled out to many reports. We are still learning about the avg number of tokens an individual report could consume, which depends on the number of tokens needed for an individual widget and how many AI widgets exist in one report.
  • The widget will always analyze up to 100 rows of data, determined by how many rows of data are displayed in the associated data widget
  • Caching - The cache works by looking at the settings of the AI Insights Generator and the data being analyzed. If those exact settings and data have been requested in the past hour, then the cache is used. This prevents more tokens from being used while a user is simply reloading the entire template they’re working in for other reasons outside of manipulating the AI Insights Generator or the Data Widget that it is associated with.
  • At this time, editing the text generated is not possible. However, this will be a near-future feature enhancement. More to come on this!

How to add:

1. Access the Ninjacat Template Builder

2. Select the desired template page

3. Click to open the Typography section of the Widget Browser near the right

4. Click on the AI Insights Generator Icon to insert a new AI Insights Generation Widget

5. Click on the drop-down labeled "Widget" in the AI Insights Generator widget settings

6. Select the desired data widget for text generation from the drop-down


Functional Configuration:

  • Widget - Select the data widget to generate insight
  • Prompt - You're able to recommend edits to the system default prompt:
    • Ex: "As an advertiser analyst, review provided data and come up with important insights about the performance data. Do not return the provided data as insights, but rather provide insights about the data. Recommended Changes should start with the phrase: "I recommend" e.g. "I recommend limit your response to 1,000 characters."
  • Tone of Voice - Select the style of communication
  • Temperature (AI Creativity) - controls the “creativity” or randomness of the text generated by
    the AI. A higher temperature results in a more diverse and creative output, while a lower temperature makes the output more deterministic and focused. A value between 0 and 2 is
    accepted.
  • Frequency Penalty - This setting defines how likely the AI is to repeat tokens based on how many times information is already in the data (2 is the highest and means the least tokens data. -2 is the lowest and encourages repeated tokens). The main difference between this and presence penalty is that higher frequency impacts this more while presence is purely the existence of 1 and more of the same token doesn’t change the presence penalty.
  • Presence Penalty - This setting defines how likely the AI is to repeat tokens based on if the token is already in the data (2 is the highest and means the least tokens data. -2 is the lowest and encourages repeated tokens). The main difference between this and frequency penalty is that higher frequency of the same token doesn’t impact the presence penalty, only the frequency. 
  • Analyze Performance - You can use the toggles to add the desired item to the result
    • Identify Performance Factors
    • Recommended Changes
  • Forecast (Toggle) 
    • Predict Future Performance

 

Edit AI Text In Reports

1. Access the "Add Notes" feature in a generated report

2. Select desired AI-generated text

3. Use standard text editing tools presented to edit text

📘

More info on how to annotate generated reports can be found in this video on the Reports List Action Menu


Formatting Your Widgets

📘

A handy tip is to set your Global Settings up before you start your template. That way, as you work, you can see what your defaults look like, and modify them as you go along. We'd always recommend making your Global Setting changes first, and then modifying individual text or header widgets afterward.

There are 2 ways to modify Text or Header widgets. By double-clicking on the text or header, you can modify it to read whatever you like, and the only limit to how much text you can include on your page is real estate - ie the available space on the page. 

Option 1: Modifying the widget formatting via Global Settings:

  • Click on the globe icon (fourth of four icons in the top right) in the inspector
  • Click on the tab labeled 'Styles'
  • Scroll down to the 'Typography' subsection. From here you can change the default font type, weight, and size of the text used in all text widgets in your template. You can also change the alignment, vertical alignment, text color, and text box fill color.

  • The next subsection you'll see is broken down into 6 sections H1 to H6. Each of these tabs represents a Header Style. 
  • In this section, you can modify the default settings to be used for each of the 6 preset Header styles individually. 

📘

Please be aware if you've already used the widget level formatting to change the text widget or header widget, the global settings level changes will not impact that particular widget.

Option 2: Using the in-page text formatting options. 

  • In a Cover Widget, Text, or Header Widget double-click on the text you'd like to reformat which will highlight it. This will open up a bar of formatting options directly at the top of the template editor.
  • This allows you to format an individual section of the text or header to something other than the default. You have the same options as in the Global Settings, but with the addition of the options to Italicize, Underline or Strike Through the highlighted text.

In the formatting toolbar, you also have the options to: 

  • Highlight
  • Change the Paragraph Style (these are defined in style at the Global Settings level in the Typography section)
  • Realign the text
  • Include an ordered (numbered) or unordered (bullet-pointed) list
  • Remove all formatting
  • Include a table
  • Insert a Vertical Line. 

📘

If you reformat a section of text using the in template builder formatting tools, and then delete all of the text from that widget, the settings will revert to the defaults, as found in the Global Settings.