Skip to main content
Skip table of contents

Creating and Writing Prompts

Introduction

Prompts are a crucial component of the Spinf AI Assistant, allowing you to customize the behavior and output of the AI to suit your specific needs. This guide will walk you through the process of creating and managing prompts using the Spinf webapp.

Note: In the Spinf AI Assistant, the terms "Prompt" and "Widget" are used interchangeably. Each prompt results in a widget being created in the AI Assistant UI.

Accessing Prompt Configuration

Prompts are configured from the "Configuration Details" pane in the Configurations page of the Spinf webapp.

The Configuration Details page features:

  1. A list of all Prompts and Widgets associated with the current configuration

  2. A vertical 3-dots menu that allows users to "Add Prompt" to the configuration

config-details-copy.png

Configuration Details

Managing Existing Prompts

The list of Prompts displays all prompts configured for the current configuration. Each listed prompt can be managed using the 3-dots menu beside it, offering the following options:

  • Edit: Modify the prompt's parameters

  • Clone: Create a duplicate of the prompt for further customization

  • Delete: Remove the prompt from the configuration

config-menu.png

Prompt Menu

Adding or Editing a Prompt

When adding a new prompt or editing an existing one, a pop-up window will appear, allowing you to configure all parameters of the prompt.

create-prompt.png

Create / Edit Prompt

Prompt Attributes

Basic Information

  • Prompt Name: A descriptive name for your prompt

  • Prompt Type: Choose from TEXT, MARKDOWN, or ACTION (explained in detail below)

  • Model: Currently set to "Default" for Pro plan users

Activation Settings

  • In-session Frequency (Seconds): (Currently unused in the Pro plan)

  • Active Phase: Determine when the prompt should be executed

    • Before Session (PRE) (checkbox)

    • During Session (IN) (checkbox)

    • After Session (POST) (checkbox)

Knowledge Base Settings

  • Selected Space (checkbox): Enable the "Use KB" button in the widget

  • Current Page (checkbox): Enable the "Use Tab" button in the widget

Logging Options (Enterprise accounts only)

  • Log prompt results (checkbox)

  • Logging label: Specify a label for logged results

Additional Settings

  • Prompt icon: (Currently unused in the Pro plan)

  • Enable Prompt (checkbox): Activate or deactivate the prompt

Prompt Text

This is where you enter the actual prompt to be executed by the LLM. It's a standard natural language text that can include special variables and formatting.

Understanding Prompt Types

TEXT Prompts

  • Output: Plain text

  • Use case: Suitable for content that may need to be copied and pasted into other customer care tools or forms

  • Example: Call summaries

MARKDOWN Prompts

  • Output: Formatted text

  • Use case: Ideal for displaying real-time information to the user with enhanced readability

ACTION Prompts

  • Output: Executes a task on the currently active tab/page in the browser

  • Use case: Automating actions like composing emails or filling forms based on the current discussion

Active Phases Explained

  • Before Session (PRE): Executed before a session starts (partially unavailable in the current Pro plan)

  • During Session (IN): The default phase where most AI Assistant prompts are useful

  • After Session (POST): Automatically executed when a session is terminated

Knowledge Base Integration

The Knowledge Base settings determine what content the prompt can operate on:

  • Selected Space: Passes the space content as context information

  • Current Page: Passes the current active browser/tab as context information

This flexibility allows users to choose the most relevant context for their prompts during a session.

Writing Effective Prompts

Variables in Prompts

Prompts can include variables that will be replaced with actual values when executed:

  • {conversation}: The conversation transcript

  • {mic_transcript}: The transcript from the agent's microphone

  • {tab_transcript}: The audio from the agent's speakers

  • {space_data}: The content of the associated space or active page

Best Practices

  1. Be specific in your instructions

  2. Use appropriate variables to provide context

  3. For MARKDOWN prompts, specify desired formatting

  4. Test and refine your prompts for optimal results

  5. Consider combining different prompt types for comprehensive assistance

Example Prompts

MARKDOWN Prompt Example

MARKDOWN
You are a helpful assistant. Review the URLs, titles, content and conversation provided.

# Instructions
Assume you are a skilled sales representative in a conversation with a potential customer. 
Identify the main product, list the last question asked in the conversation (if any), suggest the 4 top best answers.
No additional note, no commentary, no explanations, no disclaimer and no disclosure. Be extremely brief, max 10 words per list element, using well formatted markdown. 

# Content to analyze:
------ START CONTENT ------
{space_data}
------ END CONTENT ------

# Conversation to analyze 
------ START CONVERSATION ------
{conversation}
------ END CONVERSATION ------                        

Use the following template:
##### Product:
Identify the main product 

##### Last Question:
Last question asked in the conversation (if any)

##### Top Answers:
List the 4 top best answers

ACTION Prompt Example

CODE
Create new Opportunity

1. Consider topics and details discussed. 

2. Fill in or update the relevant fields in the (already opened) New Opportunity form.

3. DO NOT confirm or submit the form, just fill in the relevant fields.

Conclusion

Creating and managing prompts is a powerful way to customize your Spinf AI Assistant. By understanding the different types of prompts, their activation phases, and how to integrate them with your knowledge base, you can create a highly effective tool for enhancing customer interactions and streamlining your workflow.

Remember that changes to configurations or prompts take effect immediately, allowing you to iteratively improve your AI assistant's performance. Experiment with different prompt types and settings to find the optimal configuration for your specific use case.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.