Resolver Strategies

What are resolver strategies?

Resolver strategies instruct AI agents how to convert the user’s provided value (e.g. “this week's most important bug”) to a Data Type the system wants (e.g. <JiraIssue>_BUG-732).

Please read the Slot Resolvers documentation to understand how resolver strategies fit into the big picture.

One Strategy, One Data Type

Each resolver strategy produces one data type. For example, if I have a resolver strategy that is bound to the JiraIssue data type, then it can NOT also return an AsanaTask

Methods

Resolver strategies are made up of multiple “methods.” Each method provides a list of possible values that matches the data type.

Output Cardinality

Each method can produce any number of data type instances. For example, a resolver strategy for JiraIssue might return

  • No JiraIssue records - for example, if the user asked for a JiraIssue that doesn't exist (e.g. "Show me issues created 2 weeks in the future"), then your resolver strategy can return zero records.
  • A single JiraIssue record - for example, if the user specified the issue by it's ID (e.g. "I want to close BUG-732"), then you can return the content as
    {
      "id": "BUG-732",
      "title": "Set HTTP Status code correctly on custom REST API",
      ...
    }
    
  • A list of JiraIssue records, for example, if the user said "Show me my tasks," you would return a list of records. (Note: you can return 0, or 1 records, but it must be a list).
    [
      {
        "id": "BUG-732",
        "title": "Set HTTP Status code correctly on custom REST API",
        ...
      },
      {
        "id": "BUG-733",
        "title": "Envelope response under 'data' keyword",
        ...
      },
      ...
    ]
    

Type of Methods

You can build two types of methods:

  1. Static methods - preconfigure a multiple choice list of possible values.
    For example, if you're changing the status of a JiraIssue, you might specify a few status options
    • Not Started (id=4)
    • In Progress (id=8)
    • Done (id=10)
      The AI agent will offer these options as part of how slot resolvers work.
  2. Dynamic methods - use an action to retrieve possible values.
    For example, if you're trying to get a list of JiraIssue records that are assigned to the user, you can fetch them from the Jira Issues API and offer them to the user.

    🚧

    Warning

    You can not currently use compound actions, but other action types are valid.

Method Selection

During the conversation, the AI agent picks the best method to use based on the conversation. For example, if you the following methods

  • Get JiraIssue by ID
  • Get JiraIssue assigned to user
  • Get JiraIssue by status & project

Then the AI agent will choose the right method based on the conversation

Example UtteranceResolver Strategy Method Selected
"Can you please update the due date of BUG-732 to next week"Get JiraIssue by ID
"I need to update the due date of my tasks"Get JiraIssue assigned to user
"I'm preparing for a stand-up. Can we update the due date of in progress tasks for Project Orion?"Get JiraIssue by status & project