Create Prompt

Picture of Kalanithi Balasubramanian

Kalanithi Balasubramanian

Updated on April 16, 2024

This step-by-step guide will walk you through creating, configuring, and cloning prompts.

Before You Begin:

Step 1: Create a new prompt

Click the “Prompts” tab and select “New.”

Step 2: Fill in the Details

  • Prompt Name: Give it a clear and descriptive title.

 

  • Target Object: Select the object with which you want to use the prompt  (e.g., Account).

 

  • Data Context Mapping: Choose the specific mapping based on your needs.

 

  • AI Model: Pick the AI Model that will power your prompt (e.g., GPTfy, OpenAI).

 

  • Type: Select the type of prompt. The available types include JSON, Custom, and text. If you choose “Text” as the prompt type, a text box, and a drop-down picklist will appear.

 

  • Text Prompt: Use the text box to enter the prompt command. Use Merge Field to insert related field names easily.

Prompt Types:

You can choose from 2 types of Prompts to meet your use case.

  • Text Prompt: Ideal for predefined prompts in your own words. Enter the desired prompt command in the text box during creation.

 

Note: Creating Prompt Components in GPTfy, especially for JSON prompts, is like building blocks. They let you design exactly what the AI will answer and where it will show up in your Salesforce records. For example, you can create a JSON prompt with a component that targets the "Description" field. When you run the prompt, the AI's response automatically fills that field on the current record.

Understanding the “Allow User Input” Checkbox:

This checkbox controls how users interact with your prompt.

This simulates a “Custom Prompt” behavior. The prompt command itself becomes optional. However, during execution, the user will be prompted to enter input, similar to a custom prompt.

Step 3: Set ’Advanced Settings’ for prompt behavior and publishing

  • Target Field: Choose if you want to save the AI response in a specific field on the record.

  • Temperature: Control the balance between creativity and predictability in the output (0-1). Higher values lead to more diverse responses.

  • Top P: Decide how many possible words the AI considers, influencing the response’s diversity. Higher values lead to more unique results.

  • Max Output Tokens: Set the maximum length of the generated response.

Grounding (Ethical & Content)

  • This concept allows you to add “extra flavor” to your prompt command, making the response more tailored to your specific needs.

  • Examples might include avoiding bias, promoting fairness, or staying on topic.

  • Other examples could be specifying a writing style, tone, or domain-specific terminology.

  • These are multi-select picklist values. When selected and saved, these grounding rules are appended to the prompt command during activation, influencing the AI’s generation process.

Visibility Condition

This feature acts like a filter, controlling when a prompt can be used on a specific record.
You can define criteria using field values on the record.

For instance, a visibility condition of (Account_type = ‘Customer’) would only allow the prompt to be run on records with an “Account_type” of “Customer”.

The “Run GPTfy” button would be disabled (greyed out) for other record types.

  • Purpose:  These are the prompt catalog values, inorder to set the business criteria for a particular prompt.

  • How it Works: This is a conditional field on the Prompt Object. If a value is in the “How it Works” field, it will be considered. This is a rich text field where the admin can add values that help users understand more about the prompt.

Step 4: Save & Activate

Click “Save” to create your prompt. Once saved, a unique “Prompt Request ID” appears for reference.

Click “Activate” to make it available in the GPTfy Console dropdown. This will trigger a validation check. Upon successful validation, your prompt is ready to use!

Step 5: Version Control and Audits

After activation, explore the new component with three tabs:

  • Version Control: Every activation creates a JSON version stored under Files for tracking. Track changes and revert to previous versions if needed.

  • Security Audits: Records created during GPTfy usage are documented here. Monitor security logs related to your prompt’s usage.

  • Clone with Related: Clone with Related: Clone prompts with attributes, versions, mapping, and components. 

  • Prompt with the same mapping: This related list shows other prompts using the same Data Context Mapping. It helps you see how changes to the mapping might affect these prompts.

Managing Prompt Activation/Deactivation

Prompt activation and deactivation enable you to manage when specific Prompts are available, and can be turned off (deactivated) without disrupting ongoing processes.

Activation enables the prompt to be used, changing its status to “Active” and operational for specific purposes.

An active Prompt cannot be edited or changed. It can only be “Cloned with Related” to create a copy of it. Also, only active Prompts show up in the GPTfy Console (drop-down).

Deactivation, accessible from the Highlight Panel, which changes its status to “Draft,” allows for temporary disabling prompts when not needed.

Once a Prompt is deactivated, the following actions are available.

  • Edit, Activate, Delete, and Clone with Related: These actions are available when the prompt is in “Draft” status.
  • Reactivation: To use the prompt again, click “Activate” and provide any necessary details.

This structured approach allows for effective management and utilization of prompts, ensuring they align with current needs and resource management strategies.

Advanced Features

1. Conditional Visibility:

Control when prompts appear based on specific conditions.

  • While creating or editing, click Advanced Settings.

  • Create visibility conditions using the Create Visibility Condition button.
  • Specify conditions, add or remove using the + icon, and save.
  • Field Condition Visibility auto-populates.
  • Go to the record and select the Prompt in the GPTfy console. Run GPTfy button will not work if the condition specified does not match with the record.

2. Appending Timestamps:

Add date and time to responses for easy reference.

  • Enable in Advanced Setting. This feature is initially disabled by default. (Click on Edit OR Create)

  • Select Target Field, check “Append Timestamp,” and save.
  • Date and time will be stamped in the Target field.

3. Temperature & Top P:

Fine-tune your results for optimal outcomes.

  • Temperature controls randomness during text creation. Top P considers possible words.
  • Set the parameter value between 0-1.
  • If outside the range, GPTfy shows a validation error.
  • Provide the value while creating the prompt or rely on the AI Model if not specified.

4. Prompt versioning

This new functionality allows users to track and store different versions of their prompts.

This is particularly helpful for:

  • Maintaining a history of changes made to a prompt.

  • Reverting to an older version that was working well.

Activation Process

  • When activating a prompt, a pop-up appears asking if a new version needs to be created.

  • Choosing “Continue” creates a new version along with a message entered by the user in the pop-up text box.

  • Selecting “Cancel” stops activation.

Version Control

  • New versions are saved under the “Version Control” section’s “Files” tab.

  • Clicking on a version file downloads a JSON file containing the prompt details.

  • Deactivating and reactivating a prompt creates new versions.

Reinstatement

  • The “Reinstate” button allows you to restore an older version.

  • Clicking it brings back the chosen version and sets the prompt status to “Draft.”

Once the prompt is active, the user can see two buttons:

  • Deactivate: This button allows a user to deactivate the prompt. On clicking it, the status changes to the draft, and the Prompt command is enabled for editing. One can edit the prompt only when it is deactivated.

  • Clone with related
  • This button will clone the prompt with exact same details. On cloning, these are to be considered,
    • Mapping –  mapping for parent and cloned prompt will be same.
    • Details – Details like command, Model, Purpose, Visibility conditions will be same as the parent prompt.
    • Prompt Request Id – This will be different as it has to be unique for each prompt.
    • Status – On cloning, the status of the cloned prompt would be always in draft state.

  • Delete: Delete button is moved to the dropdown so as to make the user be very sure of deleting any prompt.

You’re now equipped with the knowledge to activate, customize, and use your prompt effectively in GPTfy. Happy exploring!