GenAI Toolkit is in private beta according to the Algolia Terms of Service (“Beta Services”).
Before you begin
To generate a response, you need the GenAI Toolkit feature in your Algolia plan, an containing the product data you want to use for your GenAI apps, a prompt, and a data source.Manage responses with the dashboard
Generate new responses
Use the Response Playground to see how a query would generate content for a given data source and prompt.- Select Generative AI in the Algolia dashboard.
- On the left sidebar, select Response Playground.
-
Choose a prompt.

-
Choose a data source.

-
Optionally, you can further refine your data source by applying a . Filters don’t affect the selected data source, only the response.

-
Enter a user query and click Generate to generate and preview the response.

-
To save the generated response, click the Save Response button.

Manage responses
You can find all the generated responses in the Generated responses section. Here you can view the response details or you can delete responses.
Manage responses with the GenAI Toolkit API
You can manage your responses with the GenAI Toolkit API.Generate a new response
You need an API Key with the following ACLs:settings, editSettings, addObject, search.
Command line
Parameters
Retrieval
The identifier of the previously defined data source.
The identifier of the previously defined prompt.
A unique identifier used for storing the response.
If not provided, the API will automatically generate a new one.
Retrieval
Optional filters used for further customizing the retrieval.
This will be taken into account alongside the data source filters,
if any, without overwriting them, or adding them to the data source object.Example:
JSON
How many hits the Toolkit should retrieve as context for the large language model.
If provided, the toolkit retrieves the specified directly using
getObjects(withObjectIDs) instead of running a search with search(query).
This lets you request a GenAI response for one or more specific items.
For example, you can use it to answer user questions on a product-detail page,
or to generate a dynamic shopping cart introduction text,
based on the current products.Example:JSON
Augmentation
If provided, the toolkit will retrieve only these attributes.
This limits what the large language model sees,
giving you control over which properties are used to generate an answer.
The response will be augmented with those attributes under
response.context,
enabling you to render directly key properties of the hits.Example:JSON
Generation
The ID of a previous conversation.
If provided, the toolkit connects this request to a previous conversation.
The query is reformulated based on the overall conversation and user demand.
For example, given:
- A first query “Give me 3 movies about famous musicians”, where the response mentions “Bohemian Rhapsody (2018)”, “Rocketman (2019)”, and “Walk the line (2005)”
- A second query “Tell me more about the second suggestion”
- A third query “Now compare the second suggestion with the first one”
- “Can you provide more details about the movie ‘Rocketman’?”
- “How does Rocketman (2019) compare to Bohemian Rhapsody (2018) in terms of storytelling and musical representation?”
Instructions for saving the response, along with the configuration provided in the request.
Whether to return a cached response.
Cached responses are previous responses with the
save: true option.Whether to stream the response instead of waiting until completion before returning it.
Internal
The origin of the request:
dashboard or api.Returns
In case of a success, the response is (HTTP status code 200):JSON
JSON
Delete a response
You need an API Key with the following ACLs:deleteObject, search.
Command line
Parameters
List of IDs of the prompts to be deleted.
Returns
In case of a success, the response is (HTTP status code 200):JSON
JSON
Retrieve a response
You need an API Key with the following ACLs:search.
Command line
Parameters
List of IDs of the prompts to be retrieved.
Returns
In case of a success, the response is (HTTP status code 200):JSON
JSON