Organization can configure an invoke to use the procedure code point. This point templatizes the servicing of tasks by both AI and human agents. The point will retrieve a response from an AI agent via the LLM service, and optionally, prompt a human agent to review the response via the portal.

📘

Default Point

The procedure code point is available by default to organizations. The point is not editable within an organization. If a code point named procedure is created in an organization, this new point will take precedence over the default point.

Configuration

Create an invoke and set the value of the code key to procedure. Set values for the following keys found within the attributes key.

Required

  • instructions: The prompt for the AI agent. Most features of GitHub markdown are supported. The prompt can be altered dynamically using fill text.

Optional

  • system_message: A system message prompt for the AI agent. Most features of GitHub markdown are supported. The prompt can be altered dynamically using fill text.
  • run_type: Set to automated to bypass human agent review.
  • llm_model: Name of supported model used by the LLM service. The default model will be used if not set.
  • procedure_title: Header shown on the form builder component where the human agent selects between options.
  • static_fields: Array of predefined options to allow a human agent to select from in addition to AI-generated responses. The array is comprised of objects that contain a summary to be shown with the option and an object that will be written to the data token if that option is selected.

Example

{
  "organization_id": "organization_id",
  "name": "select_applicable_knowledge",
  "inputs": {
    "_this.available_knowledge_summary": {
      "evaluate": true
    },
    "_this.primary.applicable_knowledge[0].name": {
      "evaluate": true
    },
    "conversation.type": {
      "evaluate": "=conversation"
    },
    "restarted_from.token_id": {
      "evaluate": false
    }
  },
  "outputs": [],
  "partition": "diagnose",
  "code": "procedure",
  "attributes": {
    "instructions": "You are an expert Customer Service Agent.  \n# Purpose\nDetermine which of the Available Knowledge entries is applicable in servicing this customer message.\n# Instructions  ...",
    "friendly_name": "Select applicable knowledge - Secondary",
    "description": "Secondary check on what knowledge is applicable to this message",
    "system_message": "Follow prompt instructions.",
    "run_type": "automated",
    "llm_model": "gemini-pro-1.5",
    "procedure_title": "Select one of the following options",
    "static_fields": [
      {
        "_this": {
          "knowledge_bypass": "yes",
          "knowledge_manually_selected": "yes"
        },
        "summary": "Let me choose from the available knowledge."
      },
      {
        "_this": {
          "applicable_knowledge": [
            {
              "action": [
                "none"
              ],
              "name": "N/A",
              "response_blurb": "N/A",
              "response_examples": "N/A",
              "tags": [
                "N/A"
              ],
              "custom_fields": [
                "N/A"
              ]
            }
          ],
          "knowledge_bypass": "yes"
        },
        "summary": "Do not select any available knowledge."
      }
    ]
  }
}

 

Human Agent Review

The procedure point natively supports human agent review. To do so, it dynamically sets form builder components if the run_type is set for human agent review.

Component parts include:

  • Agent instructions (blue square)
  • A markdown preview of the proposed response (green square). This is shown if a key of preview is present in the root output of the procedure response. To display properly, the value of the key must contain GitHub compliant markdown.
  • Justification for the proposed response (purple square). The justification statement is shown if a key of summary is present in the root output of the procedure response.
  • Option to provide feedback to the AI agent for revision (yellow square)