Ask AI is a beta feature under the Algolia Terms of Service (“Beta Services”). Use of this feature is subject to Algolia’s GenAI Addendum.

Algolia AI / Ask AI / Guides

Enable and configure Ask AI

To use Ask AI, you need to enable the feature, add your domains, create a configuration, define assistant behavior, and add the AI assistant to your site.

Enable the feature

  1. Sign in to the Algolia dashboard.
  2. On the left sidebar, select Data sources.
  3. Select Ask AI and click Create Your Assistant.
  4. Complete the setup: add domains, configure your assistant, and define its behavior.

Add your domains

Ask AI can only run on domains that you explicitly allowed. This enhances security and prevents unauthorized use.

To allow Ask AI on a new domain, follow these steps:

  1. On the Ask AI page in your Algolia dashboard, click Add Domain.
  2. Enter your domain or pattern. Use wildcards, such as *.example.com, to cover subdomains like help.example.com and docs.example.com.
  3. Save your changes.

Screenshot of the Add domain dialog in the Algolia dashboard

New domains are activated immediately. You can add more domains later as your needs evolve.

Create a configuration

Set up the core components of your assistant:

  1. Choose a language model provider, such as OpenAI or Anthropic. For an overview, see Supported LLMs.

  2. Select a model from the chosen provider. Newer models are often better, with faster and more accurate responses.

  3. Enter your API key for the provider. Provide the API key from the selected LLM provider. This connects your assistant to the selected model.

  4. Set a maximum token limit per response. Set a token limit to control response length and manage costs.

  5. Name your assistant configuration. Give your configuration a unique name for easy reference.

Screenshot of the Ask AI configuration dialog in the Algolia dashboard

Define assistant behavior

This step determines how your assistant responds to user input.

Select one of these options:

  • Choose between three pre-built prompts to launch with a default configuration.
  • Customize an existing prompt: adjust the wording to better fit your tone or use case.
  • Create a new prompt from scratch: gain full control over the assistant’s behavior and instructions.

Choose the option that best matches your support experience. If you created a custom prompt, you can select it again by choosing Use existing prompt. Be sure to name your prompts to identify them later.

Screenshot of the Ask AI default prompt templates in the Algolia dashboard

Pre-built prompts

Prompt name Prompt description
Technical Documentation Expert You are a helpful AI assistant embedded in a documentation website. Users ask questions about the product, features, setup, troubleshooting, and best practices based on provided context. Answer accurately and concisely using only the provided context. Before stating information is unavailable, double-check if related content exists. If similar information is available, summarize clearly instead of providing no response. If no relevant information exists, reply:”I couldn’t find this information in the provided context.” Always include relevant URLs when available. Avoid responses outside the provided context.
Technical Support You are a helpful AI assistant serving as a customer support representative. Users ask questions related to product support, technical troubleshooting, account management, and usage guidance based on the provided context. Respond professionally, clearly, and concisely, strictly using the provided context. If exact details aren’t available but related information is present, summarize to provide meaningful assistance. If context lacks the necessary information, respond:”I couldn’t find this information in the provided context. Please contact our support team for further assistance.” Include relevant URLs or contact details when applicable. Do not provide answers beyond the context provided.
Customer Service Technical Advisor You are a helpful AI assistant designed to assist users in finding content on a website. Users ask for information regarding site content, pages, resources, navigation, and general assistance based on the provided context. Respond clearly, accurately, and succinctly using only information from the context. If an exact match isn’t found, summarize related content to guide the user effectively. If the requested information is completely unavailable in the provided context, say:”I couldn’t find this information in the provided context. Try refining your search or browsing our website for more details.

For more information, see Prompting.

Test your assistant

After setting up your assistant, use the Ask AI playground to ask some questions and find out what works.

You’ll need:

  • Assistant ID. Your assistant’s configuration ID which can be found on the Ask AI page in the dashboard.
  • App ID. Your Algolia application ID.
  • API Key. Your Algolia API key.
  • Index Name. the name of the Algolia index that the Ask AI assistant should refer to.

Manage assistants, prompts, and domains

The Ask AI page in the dashboard is the cental place to organize, reuse, and fine-tune your assistant configurations:

  • To create a new assistant, click Add assistant.
  • To create a new prompt, click Add prompt.
  • To allow new domain, click Add domain.
  • To edit assistants, prompts, or domains, find the item you want to edit, open the View actions menu and click Edit.
  • To delete assistants, prompts, or domains, find the item you want to edit, open the View actions menu and click Delete.

Screenshot of Ask AI assistants in the Algolia dashboard

Add the AI assistant to your site

To make the AI assistant available to your users, choose one of the following integration options:

Did you find this page helpful?