Skip to main content
All CollectionsUse-case guidesUsing action steps
Summarizer & anonymizer AI steps
Summarizer & anonymizer AI steps

Use the two text-transforming AI tools to summarize and anonymize various text inputs.

Updated over a week ago

After reading this article you’ll know:

  • What the summarizer and anonymizer action steps are

  • How to configure these steps in your application flow

  • The values these AI functions can bring to your business

Expanding the AI features, Betty Blocks introduces a powerful duo - the summarizer and anonymizer action steps, fueled by the latest OpenAI technology. These steps bring smart and automated features to the table and allow one to get the essence out of the text, as well as encrypt the sensitive data. This article will help you to configure the summarizer and anonymizer action steps in your application.

What are the summarizer and anonymizer steps?

So what are these two steps and how can you apply them in real-world applications? Let’s break it down within this section.

The summarizer step is a revolutionary tool designed to simplify and shorten lengthy text inputs into concise summaries, empowering users to extract essential information effortlessly, in one click. Applying the capabilities of OpenAI, the summarizer step employs advanced natural language processing to generate coherent and contextually relevant summaries.

On the other hand, the anonymizer step addresses the critical need for data privacy and confidentiality. This step allows users to anonymize Personal Identifiable Information (PII) within the text, safeguarding sensitive information without compromising the overall content’s integrity. Whether it’s customer data, proprietary information, or any identifiable details, the anonymizer step ensures compliance with privacy regulations and promotes responsible data handling practices.

The summarizer and anonymizer are parts of the Generative AI block from our block store, and they become available to you after installing this block into a desired application.

Generative AI block

Using the summarizer and anonymizer steps

Once you’ve installed the Generative AI block into your application, you can apply any of the included action steps to create your use cases. As usual, we’ll take a relatively simple use case for explanation to ensure every builder can understand how to implement the summarizer and anonymizer into their application flow.

We will create a Betty Blocks application for working with texts using AI capabilities with functionality based on a create form, through which one can add some text content to the data model.

The data model includes pre-added properties:

  • Anonymized output’ (text, multi-line)

  • Content name’ (text, single-line)

  • Input content’ (text, multi-line)

  • Output content’ (text, multi-line)

Note: ‘Output content’ here refers to the ‘summarized content’ as we will unite the create record with summarizing functionalities.

Content data model

Preparing a page

For this use case, we want to be able to create new records with text that will instantly be summarized - presented in a shorter, extracted form. Therefore, we need a new page with the create form, and the data table to display our added records.

  1. Drag a create form to a page and configure it, choosing the Content model along with the Content name and Input content properties. Press Save to proceed.

Adding properties to the model

2. Add a data table component by dragging and dropping it into the create form. Select the same Content model and choose to display the Id and Content name properties. Click Save.

Configuring the data table

That is done. So now we can proceed to the action flow configuration and set it up.

Building a summarizer flow

As mentioned above, we are going to configure the action behind the create record form so that the input content sent via this form is also summarized along with it. The create record, summarizer, and update record steps will be needed to make this happen.

1. Open the action behind the create form component by clicking the pencil button next to the action field in the component options.

Create form options

2. Once the action is open, you’ll notice the create record step is already there. Open the Start step and add two input variables: content_name & input_content - those will align with the Content name and Input content fields within the create form.

Configuring the Start step

3. Drag and drop the summarizer action step after the create record, and let’s configure the following values in the options tab:

  • Select a model - version of OpenAI

  • Paste the API key (from OpenAI) for the model

  • Choose the summarization style. The concise style provides a brief and to-the-point overview of your text input, while the bullet points use a list format of key ideas

  • With the max new tokens field, you specify the length limit for the input text. If you’re interested in how it is measured within OpenAI, check this article

  • Type in the result input text to be picked up as a result variable in the next step(s). Don’t forget to save your settings.

Configuring the summarizer step

4. Place the update record step after the summarizer. Open it by clicking once, and set up the following values in the options tab:

  1. Select the record variable. In our case, that’s the result - the output value from our first create record step.

  2. In value mapping select the Output content property (from our model) and assign the summarized_result value (result of the summarizer step) to it. Click Save.

Update record step

Note: To view how it functions in the front end, proceed to the Final check section, where the two steps are tested.

Anonymizer flow

Now let’s get down to the anonymizer action step. Unlike our summarizer, the anonymizing AI functionality will be triggered via the separate action button.

1. Add an action button to your page. In our case, we’ll place it within the data table. Make sure you passed the Content.Id value to the action in the action button options.

Action step option

2. After you’ve opened the action, go to the Start step and add a new input variable. Select a record type, corresponding model (‘Content’ in our case), and fill in the ‘id’ in the name field. Press Save.

Adding a new variable

3. Drag and drop the anonymizer step to your action flow. Open the step itself and fill in the following values in the options tab:

  • Select a model - version of ChatGPT

  • Paste the API key (from OpenAI) for the model

  • Add the variables associated with the prompt. In our example, we will use id.output_content from our Content model

  • Type in the result input text to be picked up in the following step

  • Save your configuration with the button at the bottom

Anonymizer step configuration

4. Drop the update record step after the anonymizer to provide the anonymized output:

  • Select the id as an input variable. This way the application will know which record (among created) exactly is being updated.

  • Press Save after you’re done.

Setting up the update record step

Note: Make sure you’ve set the right permissions for your actions and models before checking the functionality in the front end!

Final check

The time has come to see if our functionality is working. To finalize it, we’ve created an additional Detail page to store all the processed pieces of text: summarized, anonymized, and input text. Let’s see if the police report that was added to the application is being handled correctly by the configured AI steps.

Summarizer and anonymizer use case example

Eventually, it looks like everything has been done according to our plan: there are three panels (within a data container) that display the automatically summarized report, the anonymized version of it, and the original text of the report.

Also, if you look at another example of text with no personal information in it, there will be a message: “The document doesn’t contain any Personal Identifiable Information (PII)”

Summarizer and anonymizer use case example

Overall, both the summarizer and anonymizer steps share the common thread of being no-coder friendly, eliminating the need for users to manually craft complex prompts. They can be easily integrated into various applications, ranging from customer support to legal proceedings. By providing concise summaries and masking sensitive information, these intelligent features enhance productivity, maintain data privacy, and uphold compliance with regulations.

Good luck building!

Did this answer your question?