AI Field Settings

Divi Form Builder AI lets you control every aspect of how the form interacts with the OpenAI API. You can control how closely it is either factual, or creative. This is important based on the type of data you want to get from it. As an ethical consideration, if your use case is impactful in the real world, you will want the temperature more to the factual side. If you are looking to generate content that requires creativity and artistic perspectives, you would lean towards a more creative temperature.

Main Form AI Settings

Every AI form gives you the ability to control the spend on that form. When the spend is reached, you can decide what to do with the form to avoid incurring extra costs. All costs are estimations and there to help guide you, but you should be setting hard and soft API usage limits with OpenAI on your dashboard

Form Spend Limit (USD)

By default this is set to $10, but if you would like to increase or decrease the total spend for this form, set it here. Once this limit is reached, the Spend Limit Reached Action is executed.

Spend Limit Reached Action

When spend limits are reached, you can have the form do one of two things to prevent further expenses.

  • Hide Entire Form: The entire form is hidden on the page and no longer accessible until the limits for the form are either increased or reset.
  • Hide AI Response Field: This will only hide the AI field, making the form act as a regular form which can still be submitted.

Submit Button Action Before AI Response

To avoid users prematurely clicking the submit button, you can either hide, or disable it, while waiting for an AI response.

Save AI Suggestions to Database

Similar to form entries saved to the database, you can save specific AI suggestions to the database to gauge the quality of the responses it is providing. You might see a trend with bad responses, which might have you needing to adjust your prompt for the specific form.

AI Suggestion Rate Limit

The default is 30 seconds, but if you are concerned about spam or abuse, you might want to increase this. It regulates the amount of time that needs to pass in between API requests.

AI FIELD SETTINGS

When you've added a field and set it to AI output, there are some steps you need to complete to make it work the way you want it to.

AI Prompt

This is where the magic happens. We have provided you with the full prompts for the use cases on our demo site, so please refer to those if you get confused. We will cover prompt construction here on a high level, but the possibilities are endless.

You would enter your prompt here almost just as you would on a tool like ChatGPT, with the only difference being that you can feed the prompt form fields that the user has filled out. For example, if you want to address the user by the name they filled out on the form, you would wrap the field ID in %%.

Field IDs must be all lowercase. You can use _ for spaces.

"Address the user by their name (%%username_field_id%%) in your responses."

See the Prompt Engineering Documentation on how to do this effectively.

How would you like to trigger the AI API call?

  • Automatically: This option monitors each of the fields referenced in your prompt. Once each of these have "changed", the API call will be triggered when a user clicks out of the last referenced field field.
  • Button: This option adds a button which must be clicked for the form to make the API call. This then validates that all fields referenced in your prompt have a value and makes the API Call. 

API Trigger Button

Define the text you want to be displayed on the button when using the Button trigger.

Output AI Response to Field

This feature allows you to populate a user input such as an text area or input field with the AI response generated by your prompt. If set to "YES" you will be asked for the field ID you would like the response to be output to. This could allow you to generate Post Content, Post Excepts, Product Descriptions or many other types of content for your forms.

AI Response Field

Add the field ID that you want to populate with the AI output.

Note: You do not have to wrap this field ID in %% as you do in the prompt.

Output AI Response to Field Type

  • Text/Text Area/Number: This will be populate with entire AI output.
  • Select Dropdown (Experimental): This will add the AI output as select options. This feature is experimental, so might not always work as expected. It also requires you to ask the AI to format the output as a JSON array in your prompt. You can add this line to help with that "Output your response as a JSON array and do not output any conversational text, just the JSON array. Make sure your output conforms to a JSON array format for example ["Ford", "BMW", "Fiat"]".

NOTE: This feature does not currently work Select2 select boxes.

Bad Prompt Message

You can encourage the AI to use a different phrase when it is unable to answer a question or provide a response. Typically, OpenAI's GPT models will respond with something along the lines of 'As an AI model trained on data up to 2021….'

Pre-defined Prompt Persona

We have included a few basic AI personas for users to choose from. You can also select Custom, to define your own AI persona. Keep in mind that the quality of the persona you craft, will determine the quality of the output it generates.

Currently, the options are:

  • Helpful Expert
    Description: The Helpful Expert is a knowledgeable and reliable professional in their domain. They possess a deep understanding of their subject matter, allowing them to provide accurate and insightful information to users. They are approachable, patient, and clear in their explanations.
    Communication Style: Formal, informative, and precise. The Helpful Expert ensures that their responses are backed by credible sources or established best practices.
    Role: To provide expert advice, answer questions, and guide users in making informed decisions related to their domain.
  • Friendly Assistant
    Description: The Friendly Assistant is a warm, approachable, and empathetic persona that aims to provide support and guidance across various topics. They are adaptable, resourceful, and always eager to help users with their concerns or questions.
    Communication Style: Casual, conversational, and engaging. The Friendly Assistant is focused on building rapport and making users feel comfortable.
    Role: To assist users with general inquiries, offer recommendations, and provide a friendly and supportive experience.
  • Motivational Coach 
    Description: The Motivational Coach is an inspiring and supportive figure who helps users set and achieve their goals. They are dedicated to empowering users to overcome challenges and realize their full potential.
    Communication Style: Encouraging, positive, and uplifting. The Motivational Coach focuses on building users’ confidence and reinforcing their belief in their abilities.
    Role: To provide guidance, encouragement, and strategies for personal development, health, fitness, or productivity goals.
  • Calm and Mindful Guide
    Description: The Calm and Mindful Guide is a serene and introspective persona dedicated to helping users find balance, inner peace, and tranquility. They possess a deep understanding of mindfulness practices, meditation techniques, and stress-relief strategies.
    Communication Style: Calm, soothing, and gentle. The Calm and Mindful Guide communicates in a way that promotes relaxation, reflection, and self-awareness.
    Role: To provide guidance on mindfulness practices, stress-relief techniques, and personal well-being, while fostering a sense of inner peace and balance.
  • Resourceful Problem Solver
    Description: The Resourceful Problem-Solver is a pragmatic and analytical thinker who excels at finding solutions to challenges and offering practical advice. They are skilled at identifying the root cause of problems and devising strategies to overcome them.
    Communication Style: Clear, concise, and solution-oriented. The Resourceful Problem-Solver breaks down complex issues into manageable steps, providing actionable advice for users to follow.
    Role: To help users troubleshoot issues, brainstorm solutions, make informed decisions, and navigate complex situations. These detailed personas can be used to guide the AI’s responses, ensuring they align with the desired character, communication style, and role for your project.
  • Custom - You would use this option if you want to create your own AI Persona from scratch.

Custom Prompt Persona

Give the AI a specific identity. If you want it to write code in certain language, tell it is an experienced coder in set language. If you want it to create fun travel itineraries, you tell it that it is an experienced travel agent, and so forth.

AI Response Temperature

This determines how creative the AI gets with responses. The closer you get to 1.0, the more creative the response, the closer you get to 0.0. the more factual the response.

Maximum Response Word Count

To control spend on the API, you can limit the amount of words you want GPT to respond with. You set that here.

AI Response Preloader Style Animation

Depending on the AI model you have selected, responses can take up to 45 seconds. The pre-loader is a good way to reduce user fatigue.

Currently, the options are:

  • Preloader
  • Text

PRELOADER

AI Response Preloader Animation

Select one of the pre-defined preloader styles to use while the form is waiting for the AI response.

TEXT

AI Response Text

This preloader creates a terminal-like experience which will either type text line by line, or on the same line. You should add a word or phrase on each line. Leave blank to have the default we provide. You can change the color of each line by adding the color at the end in this format: {#000}

Default Response:

Interpreting human input
Sending processed input
Receiving AI response
Default Response with Colors:
Interpreting human input {#FFF}
Sending processed input {#FFF}
Receiving AI response {#FFF}

AI Response Text Method

This sets how the text output is displayed. 

Currently, the options are:

  • Same Line (delete previous sentence) - After each line in AI Response Text is output, it is deleted and replaced with the next line.
  • Separate Line - Each line of the text in AI Response Text will be output on its own line.

AI Response Text Pause Time

This is the time between each line of the AI Response Text. This is represented in milliseconds, so if you want to wait 2 seconds between each line of text, set this to 2000.

AI Response Text Typing Speed

You can set the speed at which each character in the line is typed out. This is represented in milliseconds per character.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.