Introduction

Whether you are a developer, a content creator, or an enthusiast in AI-driven commerce, Ionic, when synergized with GPT, offers a dynamic and intuitive API for generating shopping links, providing product recommendations, and creating a seamless online shopping journey. This guide aims to empower you with the knowledge and tools to develop prompts that effectively leverage the capabilities of GPT, making online shopping convenient but also tailored and insightful.

As we delve into the intricacies of prompt engineering, we encourage an open mind and a willingness to experiment. The field of AI is one of constant learning and adaptation.

Be effective

To effectively write instructions for using a custom action with GPT, it’s essential to follow these guidelines:

  1. Clear and Concise Description: Begin with a straightforward and precise description of what the action is supposed to accomplish. Avoid ambiguity to ensure GPT understands the intended functionality.
  2. Specify Input Requirements: Clearly outline any inputs the action requires. Include details like data type, format, and whether an input is optional or mandatory.
  3. Expected Behavior and Output: Describe what the action should do with the inputs and the expected output or result. If there are multiple possible outputs, explain each scenario.
  4. Examples: Include examples demonstrating how to use the action and the expected outcomes. This can help clarify more complex actions.
  5. Follow-Up Actions: If the action is part of a sequence or requires follow-up actions, provide instructions on proceeding after the current action is complete.
  6. Formatting and Syntax: Ensure the instructions are well-formatted and easy to read. Use bullet points or numbered lists for sequential steps, and employ clear headings for different sections.

Following these guidelines, you can create practical and user-friendly instructions for GPT to execute custom actions.

The bare minimum

At the very least, describe what your GPT should be used for and how it should use the Ionic action.

When the user is shopping or mentions a product or category they're looking for, 
use Ionic to search, discover, compare, and purchase products online.

Cookbook

For expanding or customizing the usage of Ionic in your GPT, here are some additional lines to add to your prompt to refine the behavior of various parts of the shopping flow.

Context

You should use Ionic when it is clear what product or category the user is shopping
for, and you can make an accurate query request.

Input

Provide optional query parameters

The user may specify the number of results, minimum price, and maximum price for which they want to see results.
Ionic Query function accepts the following parameters:
  - `query`: string (required, must not include commas)
  - `num_results`: the number of results (default to 4, no more than 10)
  - `min_price`: the minimum price in cents ($5 becomes 500)
  - `max_price`: the maximum price in cents ($10 becomes 1000)
For example, if looking for coffee beans between 5 and 10 dollars, the tool input would be `coffee beans, 5, 500, 1000`.

Gather the correct information before making requests to Ionic

Ask questions about the user's use case to craft a great query for Ionic.

Pass along relevant information

Pass along chat history when relevant to the query.

Ask for colors and sizes

Include sizes, colors, and other product details in your query to Ionic.

Presentation

Show relevant merchant and price information

Always show the name of the merchant and their price for the item.

Image quality

If an image is warped, do not show it.

Example response

Show how you want your responses to look

Follow this example when presenting Ionic responses:
1. [Product Name](Link to Product)
  [Merchant Name]: [Product Price]
  [Product Image]

Other Great Resources

The following links are other great resources that can be used to guide you on your prompt writing journey.