✍️ How to Create and Edit Sopilot Prompts

Share:

2024/3/20

A detailed guide on creating and editing prompts in Sopilot, including prompt templates, parameter configuration, publishing, and more. Make your AI assistant smarter and work more efficiently!

Overview of Sopilot Prompt Features

Sopilot provides powerful prompt editing capabilities that allow users to create, edit, and manage their own AI prompts. Through custom prompts, you can help the AI assistant better understand your needs, generate content according to your style preferences, and embed your product and personal information in prompts for better product promotion. Prompts can be used in various scenarios such as chat conversations, form generation, content creation, image generation, video recording, and social sharing.

Main features include:

  • Prompt creation and editing
  • Prompt template usage
  • Multiple operation type support
  • Custom input parameters
  • Website scope restrictions
  • Publishing prompts as templates

Prerequisites

Before getting started, please ensure:

  • Sopilot Chrome extension is installed
  • Logged in to Sopilot with Google account
  • Basic understanding of prompt writing rules

For installation steps, see: How to Install Sopilot Chrome Extension

Detailed Operation Guide

1. Creating New Custom Prompts

1.1 Creating from Templates

Using Templates

  • Select a suitable template from the homepage or prompt template library
  • Click the "Use Template" button
  • The system will automatically populate the template's default content
  • Modify content as needed

1.2 Creating from Scratch

New Prompt

  • Click on the console on the right side of the homepage, then click on "My Prompts", and click the "New Prompt" button on the right
  • Fill in the required basic information
  • Write prompt content
  • Configure related parameters and save

1.3 Creating Using Sopilot Plugin

  • Click the Sopilot plugin floating icon and select the settings menu
  • Choose "New Prompt"
  • Fill in the required basic information
  • Write prompt content
  • Configure related parameters and save Manage Prompts

2. Basic Information Configuration

Edit Prompt

2.1 Name and Description

  • Name: Give your prompt a clear and concise name (required)
  • Description: Add a brief explanation of the prompt's functionality (optional)

2.2 Prompt Content

  • Enter detailed prompt content in the prompt editing box

  • Supports special variables and expressions to get page content:

    • {title} - Get page title
    • {content} - Get page content
    • {description} - Get page description
    • {textContent('div')} - Get text content of specified element, {textContent('')} with empty parameter gets all text content of the page
    • {innerHTML}/{outerHTML} - Get HTML content, usage same as above
    • Supports nested expressions with for and if (use $ prefix for functions inside for), such as:
    for [data-testid="tweet"] {
      tweet$index: 
      author: $textContent('[data-testid="User-Name"]')
      content: $textContent('[data-testid="tweetText"]')
      for div[aria-label][role="group"] {
        stat: $attr('aria-label')
      }
    }
    
    for [data-testid="DmActivityViewport"] [data-testid="cellInnerDiv"] {
      if div[data-testid="messageEntry"]{
          User says: $textContent(div[data-testid="messageEntry"])
      }
      if button[data-testid="messageEntry"] {
          I say: $textContent(button[data-testid="messageEntry"])
      }
     }
    
    for [data-testid="tweet"] {
     tweet$index: 
     author: $textContent('[data-testid="User-Name"]')
     content: $textContent('[data-testid="tweetText"]')
     if [data-testid="videoComponent"] {
         video: https://x.com/i/status/$attr('[data-testid="User-Name"] a[dir="ltr"]','href')[3]/video/1
     }
     if [data-testid="card.layoutLarge.media"] {
        link: $attr('[data-testid="card.layoutLarge.media"] a', 'href')
     }
     if a[href$="/photo/1"] {
       image: https://x.com$attr('a[href$="/photo/1"', 'href')
     }
    }
    

    When editing prompts in the plugin environment, you can click the "Parse" button in the top right corner to test parsing the current page, which helps quickly verify if expressions meet expectations

3. Operation Type Settings

Supports the following operation types:

  • Chat: Continuous dialogue with AI assistant, dialogue outputs can be copied, modified, or quickly inserted into the current page
  • Form Generation (genForm): Automatically generate and fill form content based on existing form fields
  • Content Generation (genContent): Generate content based on page content and automatically fill into input fields
  • Image Generation (genImg): Generate image cards based on prompts and insert them into the current page's image upload component
  • Video Recording (recordVideo): Initiate video recording operation
  • Quick Share (share): One-click generation of engaging share content based on current page content and quick sharing to multiple social media platforms More operation types will be supported in the future, continuously expanding AI capabilities and supporting more use cases.

4. Other Advanced Configurations

4.1 DOM Element Selector

  • Fill in CSS selector in the "Operate DOM" field
  • Used to specify where AI-generated content should be inserted, typically a text input DOM

4.2 Button Insertion Position

  • Configure where the prompt trigger button should be inserted
  • Use CSS selector to specify position After filling in this field, a Sopilot icon button will be inserted after the specified DOM, clicking it will trigger the prompt execution

4.3 Runtime Environment

  • Currently supports Chrome browser environment

4.4 Card Generation

  • When enabled, generates beautiful display cards
  • Suitable for sharing and display scenarios

5. Input Parameter Configuration

Up to 3 custom input parameters can be configured:

  • Click the "+" icon to add new input parameters
  • Parameters will appear in a dialog box for users to fill in when the prompt is executed New Prompt Dialog Parameters can be text or JSON format. If text, it will be a text input box parameter. If JSON format, supports the following format:
    {
    "title": "Parameter Title",
    "placeholder": "Input Box Hint Text",
    "options": ["Option 1", "Option 2", "Option 3"]    //If options parameter exists, it becomes a dropdown selection
    }
    

6. Website Scope Restrictions

  • Enter one URL per line in the text box
  • Supports wildcard matching and regular expression matching, e.g., *.example.com
  • Prompts will only be effective on specified websites

After saving the prompt, it will automatically update in the Sopilot plugin, which will determine whether to show the prompt trigger button based on the website scope restrictions.

7. Template Management

7.1 Publishing as Template

  • If you've created a valuable prompt that other users might find useful, click "Publish as Template" to share it with others
  • Will be publicly displayed in the template library after administrator approval
  • Templates marked as featured will be displayed in the featured template library on the homepage

7.2 Updating Templates

  • If you're the template author, when modifying your prompt, you can click "Update Template" to sync current changes to the template library
  • Template updates also require administrator approval before being published to the template library

Usage Tips

  1. Prompt Writing

    • Use clear, specific instructions
    • Make good use of various parameter variables to get page information, test expression validity using the parse button when writing prompts
    • Avoid overly complex logic
  2. Parameter Settings

    • Use input parameters appropriately
    • Set meaningful hint text for parameters
    • Control parameter quantity, avoid too many
  3. Website Restrictions

    • Set precise scope of effect
    • Use wildcards for flexibility
    • Avoid overly broad matching

Getting Help

If you encounter issues while using:

Now you've mastered all the essentials of Sopilot prompt editing. Start creating your first prompt! If you encounter any issues during use, feel free to refer to this guide or contact our support team.

Share:

Comments

No comments yet

- Content sourced from internet. Contact us for removal if infringed -