Skip to main content

Configuring assistants

Overview

Before you get to building great AI-powered experiences with Dopt, you'll need to create and configure your assistant.

Creating an assistant

Navigate to the Assistants page from the main navigation menu. Click the Create assistant button at the top right. You'll be prompted to give your assistant a name, an identifier, and a description.

  • Name - This is the display name of the assistant. Name it something that maps to what you might be using the assistant for.
  • Identifier - The assistant's identifier is how you'll reference the assistant in code using our AI SDKs and APIs. This cannot be changed after the assistant has been created.
  • Description - An optional description for the assistant

Adding instructions

After you've created an assistant, you can provide it with instructions. Instructions are extra prompts that you can give to an assistant to help it better contextualize its responses. For instance, you might provide instructions about what kind of tone to take so that response match your brand.

Here is an example of instructions that you might use:

You are a helpful assistant for an app called "Super App". Super App is a robust email client for business professionals.

When responding, use a professional tone of voice and keep your answers short and concise.

Adding sources

Sources determine which webpages are crawled to produce documents. You can also set up a source to manually upload HTML documents.

To add a source, navigate to an assistant and then click the Sources tab. From here, you can click the Add source button at the top right. You'll be prompted to give your source a name and a description. You'll also need to determine the type of source you're going to create.

  • Name - This is the display name of the source. Name it something that maps to the type of content the source will encompass.
  • Type - Sources can be of two types: crawl or upload. Crawl sources will grab content from publicly accessible websites that you define while upload sources require you to manually upload HTML documents. You cannot chnage a source's type after its been created.
  • Description - An optional description for the assistant

Crawl source types

Crawl type sources require some additional configuration to get going. After you've created the crawl source, you can set up the following:

  • Start URLs - The public URLs to start crawling from. These should be comma separated.
  • Max documents - The maximum number of documents to store in a given source (defaults to 1000)
  • Max depth - The maximum depth to crawl from the start URL. If this is left empty, the crawler will continue to crawl until the maximum number of documents is reached.
  • Include patterns - Glob URL patterns to include when crawling. If a URL also matches an exclude pattern, it will be excluded. These should be comma separated.
  • Exclude patterns - Glob URL patterns to exclude when crawling. These should be comma separated.
info

Saving changes to your crawl source settings will not trigger a crawl. Once you are satisfied with your changes, you will need to manually trigger a crawl.

Upload source types

Upload type sources do not require any additional configuration. You will, however, need to upload HTML documents to this source via API.

Each upload source will have its own upload API endpoint that corresponds to the following URL: https://ai.dopt.com/sources/$SOURCE_UID/documents where $SOURCE_UID is the upload source's UID. This UID can be found in the Details pane on the source page.

When uploading documents to an upload source, you will need to provide your AI API key and a data payload consisting of a url and a body.

  • url - The publicly accessible URL to associate with the uploaded document. This will be used when the document is used in a citation.
  • body - The HTML of the document to upload

Here is an example cURL command to upload a document:

curl "https://ai.dopt.com/sources/$SOURCE_UUID/documents" \
-X POST \
-H "x-api-key: $AI_API_KEY" \
-H "content-type: application/json" \
--data '{
"url": "https://docs.example.com/path/to/document",
"body":"<html>...</html>"
}'
info

If you upload another document under the same url for a given source, it will overwrite the existing document with that same url.

Crawling sources

You can initiate a source crawl by navigating to a source and then clicking the Crawl source button at the top right.

Depending on how many URLs the source is set to crawl and how many other crawl jobs there are in the queue, the completion time of the crawl may vary. You can check in on the status of the crawl by looking at the Status panel on the source page.