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.Specifies the custom system prompt for one of the
ask0System
, ask1System
, …, askNSystem
ask anything slots.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"
).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:
What was the client intent?
Was the client issue solved?
Response
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 theask0System
, 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 theask0Id
, ask1Id
, etc. query parameters.
For example, given the following prompt id values: ask0Id=client_intent&ask1Id=issue_solved
The response will be:
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 theask0Format
, 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:
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.