HARPA.AI
LIBRARYUSE CASESGUIDESAI COMMANDSBLOG

Custom AI Commands

CONTENTS
NAVIGATE

HARPA AI allows writing and reusing custom page-aware ChatGPT commands. Custom commands empower you to streamline your web workflow by crafting and quickly reusing unique prompts tailored to your online tasks.

The following guide is a basic overview of how to create and use custom GPT commands in HARPA AI. HARPA AI Commands can do a lot more than generating text, please refer to AI Commands & ChatML specification for in-depth information.

icon

Commands are easy to create and use. You do not need to have engineering knowledge to set up a custom AI command and boost your productivity.

# How to create a Custom Command

  1. Open HARPA AI by clicking its icon in the top right corner or pressing Alt+A (on Windows) and ^+A (on Mac).
  2. To bring up a list of AI commands and ChatGPT prompts, type the / symbol in the HARPA AI chat.
  3. Click the CREATE option at the top.

  1. You now have a sample command initialized in the Command Editor. This command has a sample GPT step that summarizes a web page into bullet points.

  1. To customize your new command, click the ADD STEP button and pick a step type to add to your new command.

  1. Click SAVE to save your command.

  1. You can now run it on any website by clicking the HARPA AI icon in the top right corner or by pressing Alt+A (on Windows) and ^+A (on Mac).

You can see an example of complex prompt engineering here, demonstrated with the automatic creation of a blog post from a YouTube video using ChatGPT.

# TL;DR: Command Parameters

There is no special vocabulary for writing ChatGPT commands in HARPA AI. But it may be helpful to be aware of some parameters you can use with your prompts:

  • {{page}} parameter allows you to extract text content from a web page and send it to ChatGPT.
  • {{language}} parameter allows you to instruct ChatGPT to reply in a given language regardless of the language of your request. The language parameter value is taken from the HARPA AI settings.
  • {{url}}, {{domain}}, {{desc}} - page URL, domain and description.
  • {{transcript}} - allows you to extract and use YouTube video transcription in your commands.
  • {{p1}}, {{p2}}, {{p3}}... - these parameters let you customize your command every time it is run. We will dive into how custom parameters work in this guide.

icon

Remember, you can always type /help to open the Help Command, which can assist you in finding answers to questions about HARPA AI.

Learn more about Command Parameters.

# TL;DR: Automation Steps

Then pick the step type to create and add to your new command:

  • SAY, ASK, GPT - these steps are used to send messages to chat, ask for parameter values, and send AI requests.
  • NAVIGATE - navigates opened tab to a specific URL.
  • WAIT - pauses command execution until page stops updating, text or element appears on the page, JavaScript function returns true, or a timeout in milliseconds is reached.
  • REQUEST - sends data to a Webhook, calls remote API or fetches web page HTML.
  • CLICK, PASTE, SCROLL - click page elements and insert text into page forms and inputs.
  • EXTRACT - retrieves content of web elements on page.
  • GROUP, LOOP, JUMP - group steps together, loop over data items and control command flow.
  • RUN JS - runs JavaScript code in scope of the opened web page.
  • COMMAND - calls other commands; allows building higher-order commands.
  • CLEAR, STOP - erase chat history or terminate current command.
  • CALC - sets or modifies parameter values, merges lists, extracts data.

Most steps support labels, conditions and silencing:

  • When silenced, steps will not print messages to chat.
  • When labeled, steps can be jumped to using JUMP step.
  • When conditioned, steps will only run if the condition is met.

Learn more about Automation Steps.

# Advanced Custom Command

Let's try using multiple parameters and automation steps in a Search Assistant custom command to generate a short textual summary based on your search query.

  1. Open HARPA AI and type / in the chat.
  2. Click on the CREATE button in the top right corner.
  3. Add the ASK step to request the text of your search query and save it in the {{query}} parameter.

  1. Add the SAY step that will display the {{serp {{query}}}} results in the chat.
  2. Add the CALC: SET PARAMETER step to create a new parameter with information from {{serp {{query}}}}, named {{data}}. This way, the SERP related to your query in the {{query}} parameter will be saved in {{data}} for further processing.

We will discuss the {{serp {{query}}}} parameter in more detail in this guide.

  1. Add the GPT step that combines the SERP data into one complete text containing details about your initial query.
GPT STEP EXAMPLE:

Please ignore all previous instructions.  I want you to only respond in {{language}}.

You are a Search Assistant. I want you to create the brief response to [MY QUESTION], adhering to a specific format I provide.
- Utilize both your inherent knowledge and the [WEB RESEARCH RESULTS] provided at the end.
- Do not use any other tools and sources.
- Please avoid general phrases and unrelated words from your response to my question.
- Do not hallucinate facts or information.

FOLLOW THE FORMAT:

## Answer for '{{query}}':
150 words brief response text

[MY QUESTION]: {{query}}

[WEB RESEARCH RESULTS]:
{{data}}

[BRIEF RESPONSE]:
  1. Done! You now have the "Search Assistant" command, which helps you find information related to your query and explain it in understandable language.

# Quick Intro to Prompt Engineering

Here are some excellent guide on Prompt Engineering:

Information from these guides can be applied to writing AI commands in HARPA AI. Here is a quick overview of what constitutes good prompting:

  1. How can I write useful custom commands?

The keys to writing effective and useful ChatGPT commands is to be clear and specific, provide enough context for AI and clearly define what you expect. Try to be as precise as possible about what you would like AI to do. Avoid vague and ambiguous phrasing that may lead to unsatisfactory responses. For example, the following prompt

Write me FAQ about {{page}}

can be improved like this

I want you to write a FAQ about a product described in the web page. FAQ should include at least five subheadings that includes a question and an answer. For every question provide a concise answer. Style output with markdown. Use a friendly tone. Write approximately 750 words in total.

Web page content: {{page}}

FAQ:
  1. What are some examples of bad prompt writing?

Bad prompt writing include prompts that are too general, ambiguous, or require specialized knowledge or cultural references that the AI may not be familiar with. For instance, this prompt is too broad:

Tell me something interesting

The power of custom prompts comes from the fact you can quickly reuse them on any page. So making commands out of simple prompts may not be worthwhile.

  1. How to improve my prompt engineering? Experimenting with different prompt types is an effective way to refine your prompts. Try out different phrasings, topics, and structures to see what works best. Tweak your prompts based on the output from the AI.

Here is one of the most useful phrases to include with your prompts:

Format your response with markdown, include heading, subheadings, bullet points, bold and italic markdown styles where appropriate.

And the following phrase could help you get an answer in a writing style you need:

Use persuasive tone, rhetorical questions and storytelling to engage readers. Use metaphors, analogies etc. to make your answer relatable and memorable.
  1. What are some examples of good prompt writing? Great prompts are clear, specific, and tailored to your needs. Here are a few examples:

Short summary:

I want you to act as a very proficient copy writer. Your task is to summarize the text I give you in 20 words or maximum 150 characters.

The text to summarize: {{page}}

Summary:

Math teacher:

I want you to act as a math teacher. I will give you a mathematical equation, concept or a problem, and your job will be to explain them in easy-to-understand terms to me. This could include providing step-by-step instructions for solving a problem, demonstrating various techniques or suggesting online resources for further study.

The equation / concept / problem: {{page}}

Explanation:

Domain Name Generator:

I want you to act as a domain name generator. I'll tell you my company name or product description and your goal is to provide a list of free domain names. Reply with the list of domain names and nothing else. The domain names should be 10 letters maximum. The domain names should include SEO keywords for the product or the business whenever possible. The domain names should end in .com.

Information about the company: {{p1}}

Domain names:
NEXT POST
Contact us
HomeUse CasesGuidesPrivacy PolicyTerms of Service