Skip to main content
GenAI Toolkit is in private beta according to the Algolia Terms of Service (“Beta Services”).

Before you begin

To create a prompt, you need the GenAI Toolkit feature in your Algolia plan, and an index containing the product data you want to use for your GenAI applications.

Manage prompts with the dashboard

Create new prompts

  1. Go to the Algolia dashboard and select your Algolia .
  2. On the left sidebar, select Generative AI.
  3. Select Generative AI in the Algolia dashboard.
  4. On the left sidebar, select Prompts.
  5. Click Create New Prompt. Screenshot of the 'Manage Prompts' page with a list of prompts, columns for Name, Prompt ID, Updated, and Responses, and a 'Create New Prompt' button.
  6. Enter a name for your Prompt. This will be used to easily identify your prompt later. Screenshot of the 'Create a Prompt' page showing a text input field labeled 'Prompt Name' with placeholder text 'Enter prompt name' and an example.
  7. Select one of the pre-defined tones to use in the final prompt, computed by the GenAI Toolkit. By default the tone is set to natural. Screenshot of a 'Create a Prompt' form with a 'Select a tone' drop-down menu, a 'Prompt Name' input field, and an 'Enter Instructions' text area.
  8. Enter the detailed instructions for your prompt. They will be used to compute the final prompt that will be needed for generating responses. Screenshot of the 'Edit Prompt' form with fields for 'Prompt Name', 'Select a tone', and 'Enter Instructions', and a 'Save Prompt' button.
  9. Once you are satisfied with your configuration, click Save Prompt.

Edit prompts

You can edit its details directly from the Dashboard. Start by selecting a prompt from the prompts Table. Screenshot of a 'Manage Prompts' table with a checkbox next to the 'Compare Products by Feature' prompt. On the details screen you can edit the name, change the selected tone or modify the prompt instructions. To save your changes, click the Save Prompt button.
Modifying a prompt that you used for generating responses may impact those responses. Review and optionally regenerate the responses that depend on this data source.

Duplicate prompts

You can use one prompt as a template for creating a new one. From the prompts table, choose your base prompt, click More and select Duplicate. Screenshot of the 'Manage Prompts' page showing a drop-down menu with 'Duplicate' highlighted for the 'Top Products by sales' prompt. A new screen opens, pre-filled with the details from your base prompt. You can edit the name, select a new tone or add new instructions. To save your changes, click the Save Prompt button.

Delete prompts

To delete a prompt in the dashboard, choose the prompt you want to delete from the prompts table, click More and select Delete. Screenshot of a 'Manage Prompts' page showing a table with prompt names and IDs, with a drop-down menu open on the 'Compare Products by price' row displaying 'Duplicate' and 'Delete Prompt' options.
Deleting a prompt that was used for generating responses impacts those responses. You can choose how to handle this: you can either delete the prompt and keep the responses that rely on it, or you can delete the associated responses together with the prompt.

Manage prompts with the GenAI Toolkit API

You can manage your data sources with the GenAI Toolkit API.

Create a new prompt

You need an API Key with the following ACLs: addObject, settings, editSettings.
Command line
curl -X POST https://generative-ai.algolia.com/create/prompt/ \
     -H 'Content-Type: application/json' \
     -H 'X-Algolia-Api-Key: $ALGOLIA_API_KEY' \
     -H 'X-Algolia-Application-ID: $ALGOLIA_APPLICATION_ID' \
     -d '{
      "name": "Compare phones by feature",
      "instructions": "Help buyers chose the right phone for their needs by providing relevant information and comparing the given products by feature.",
      "tone": "friendly",
      "objectID": "b4e52d1a-2509-49ea-ba36-f6f5c3a83ba3",
     }'

Parameters

instructions
string
required
The instructions and system prompt that will be provided by the GenAI Toolkit.
name
string
required
The name used to identify the prompt.
objectID
string
A unique identifier used for storing the prompt. If not provided, the API will automatically generate a new one.
tone
enum<string>
default:"natural"
Tone used by the model.Allowed values: natural, friendly, or professional

Returns

In case of a success, the response is (HTTP status code 200):
JSON
{
  "objectID": "b4e52d1a-2509-49ea-ba36-f6f5c3a83ba1"
}
In case of an error, the response is:
JSON
{
  "name": "Error",
  "message": "Error saving the prompt."
}

Update a prompt

You need an API Key with the following ACLs: addObject, search.
Command line
curl -X POST https://generative-ai.algolia.com/update/prompt/ \
     -H 'Content-Type: application/json' \
     -H 'X-Algolia-Api-Key: $ALGOLIA_API_KEY' \
     -H 'X-Algolia-Application-ID: $ALGOLIA_APPLICATION_ID' \
     -d '{
      "name": "Compare phones by feature",
      "instructions": "Help buyers chose the right phone for their needs by providing relevant information and comparing the given products by feature.",
      "tone": "friendly",
      "objectID": "b4e52d1a-2509-49ea-ba36-f6f5c3a83ba3",
     }'

Parameters

objectID
string
required
The ID of the prompt to be updated.
instructions
string
The instructions and system prompt that will be provided by the GenAI Toolkit.
name
string
The name used to identify the prompt.
tone
enum<string>
default:"natural"
Tone used by the model.Allowed values: natural, friendly, or professional

Returns

In case of a success, the response is (HTTP status code 200):
JSON
{
  "objectID": "b4e52d1a-2509-49ea-ba36-f6f5c3a83ba1"
}
In case of an error, the response is:
JSON
{
  "name": "Error",
  "message": "Error updating the prompt."
}

Delete a prompt

You need an API Key with the following ACLs: deleteObject, search.
Command line
curl -X POST https://generative-ai.algolia.com/delete/prompts/ \
     -H 'Content-Type: application/json' \
     -H 'X-Algolia-Api-Key: $ALGOLIA_API_KEY' \
     -H 'X-Algolia-Application-ID: $ALGOLIA_APPLICATION_ID' \
     -d '{
        "objectIDs": ["b4e52d1a-2509-49ea-ba36-f6f5c3a83ba1"],
        "deleteLinkedResponses": false,
     }'

Parameters

objectIDs
string[]
required
List of IDs of the prompts to be deleted.
deleteLinkedResponses
boolean
default:false
Whether to delete responses linked to this prompt.

Returns

In case of a success, the response is (HTTP status code 200):
JSON
{
  "message": "Successfully deleted prompts."
}
In case of an error, the response is:
JSON
{
  "name": "Error",
  "message": "Error when deleting the prompts."
}
Last modified on March 23, 2026