Configure your custom prompts using the following options:

ask[0-N]
string
default:"none"

Specifies the custom prompt content for one of the ask0, ask1, …, askN ask anything slots. When the content is specified, the prompt is considered activated. Otherwise, it is deactivated.

ask[0-N]System
string
default:"none"

Specifies the custom system prompt for one of the ask0System, ask1System, …, askNSystem ask anything slots.

ask[0-N]Id
string
default:"none"

Specifies the prompt id for one of the ask0Id, ask1Id, …, askNId ask anything slots. The role of the prompt id is to identify the prompt in the responses. When unspecified, it will fallback on the index of the slot (e.g. "0", "1").

ask[0-N]Format
string
default:"none"

Specifies the prompt response JSON Schema encoded as a string for one of the ask0Format, ask1Format, …, askNFormat ask anything slots.

When unspecified, the response not be structured in any particular way. When specified, the response will be a JSON object encoded as a string.

Usage

Currently, there are up to 3 ask anything slots available.
For using the ask anything slots, you can specify the prompts as query parameters in the request URL, or using a configuration message on the WebSocket connection.

Here we’ll create to custom prompts about the processed phone call:

  1. What was the client intent?
  2. Was the client issue solved?
curl -X 'POST' \
  'https://http-gateway.vatis.tech/http-gateway/api/v1/upload?streamConfigurationTemplateId=668115d123bca7e3509723d4&ask0=What%20was%20the%20client%20intent%3F&ask1=Was%20the%20client%20issue%20solved%3F&persist=true' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic <api_key>' \
  -H 'Content-Type: application/octet-stream' \
  --data-binary '@test-phone-call.wav'

Response

{
  ...
  "askAnything": {
    "0": {
      "promptId": "0",
      "content": "The client's intent was to sign up for a Wi-Fi service with ***, provide the necessary personal and address information, select a connection speed, and schedule an installation appointment."
    },
    "1": {
      "promptId": "1",
      "content": "Yes, the client's issue was solved. George Washington successfully signed up for the Wi-Fi service, provided the necessary information, and scheduled an installation appointment for a convenient date and time. The representative also explained the costs and payment process."
    }
  }
}

System Prompt

Each ask-anything prompt can receive an optional system prompt alongside the custom prompt. The system prompt can be used to modify the LLM behavior or to provide additional context to the user prompt.

The system prompt can be specified using the ask0System, ask1System, etc. query parameters.

Prompt Id

By default, each ask-anything prompt will be assigned with an ID corresponding to the prompt index. To override this behavior, you can specify the prompt ID using the ask0Id, ask1Id, etc. query parameters.

For example, given the following prompt id values: ask0Id=client_intent&ask1Id=issue_solved

The response will be:

{
  ...
  "askAnything": {
    "client_intent": {
      "promptId": "client_intent",
      "content": "The client's intent was to sign up for a Wi-Fi service with ***, provide the necessary personal and address information, select a connection speed, and schedule an installation appointment."
    },
    "issue_solved": {
      "promptId": "issue_solved",
      "content": "Yes, the client's issue was solved. George Washington successfully signed up for the Wi-Fi service, provided the necessary information, and scheduled an installation appointment for a convenient date and time. The representative also explained the costs and payment process."
    }
  }
}

Response format

The generated response for each ask-anything prompt will have no particular structure. For the scenarios where the response should be structured in a predefined way, we can use the response format feature to specify a JSON Schema to parse the response against.

To activate the response format feature, we need to specify the ask0Format, ask1Format, etc. query parameters having the JSON Schema value encoded as string.

For example, we’ll take the following prompt: Extract the client identification details, the requested service and any relevant information to the requested service

And the following JSON Schema:

{
  "$defs": {
    "ClientIdentificationData": {
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "phone_number": {
          "title": "Phone Number",
          "type": "string"
        },
        "date_of_birth": {
          "title": "Date Of Birth",
          "type": "string"
        }
      },
      "required": [
        "name",
        "phone_number",
        "date_of_birth"
      ],
      "title": "ClientIdentificationData",
      "type": "object"
    }
  },
  "properties": {
    "client_identification": {
      "$ref": "#/$defs/ClientIdentificationData"
    },
    "requested_service": {
      "enum": [
        "WiFi",
        "GSM",
        "Billing"
      ],
      "title": "Requested Service",
      "type": "string"
    }
  },
  "required": [
    "client_identification",
    "requested_service"
  ],
  "title": "ClientRequest",
  "type": "object"
}

The response will be:

{
  ...
  "askAnything": {
    "0": {
      "promptId": "0",
      "content": "{\"client_identification\":{\"name\":\"George Washington\",\"phone_number\":\"414-2**-****\",\"date_of_birth\":\"July *, 19**\"},\"requested_service\":\"WiFi\"}"
    }
  }
}

By parsing the JSON encoded inside the string response we can get

{
  "client_identification": {
    "name": "George Washington",
    "phone_number": "414-***-****",
    "date_of_birth": "July **, 19**"
  },
  "requested_service": "WiFi"
}
The PII data will be explicitly displayed unless specified otherwise.

Limitations

  • No default values are supported.
  • No arbitrary objects are allowed. All the required values must be specified.