Skip to main content

Generate instructions and test cases for Salesforce Agents

Agentforce; Agent; Instructons; Elements for Agent instructions and test utterance generation

Updated over a week ago

You can use Elements application to automatically generate Agent instructions and test cases from a business process diagram.

Prerequisites

  • Elements Professional License

How Agent topic instruction generation works

In Elements application, you draw business process diagrams using Universal Process Notation. It is a modelling technique that relies on using just one building block:

The image above represents that building block that is compromised of following elements:

  • Verb-based activity (What? happens)

  • Flowlines

    • Input (When? does it happen)

    • Outcome (Why? does it happen)

  • Resources

    • Human (Who? is responsible or involved)

    • Systems (With what? is the activity executed)

When you capture your business process diagram, the input (outcome of the previous activity), and the activity performed by any 'Agent' resource, get turned into an instruction using following format:

  • IF input, THEN activity

For instance, in the example below, an instruction generated would be:

  • IF question asked that does not relate to company products or policies, or asks about cost or price, THEN inform customer that agent cannot answer those sorts of questions and user should ask a different question.

How to generate Agent instructions

In your process diagram:

  • Open 'Edit' mode

  • In the left panel, click on the 'magic wand' icon

  • Click on 'Instructions'

  • The Instructions will be displayed in the new window

  • Click 'copy' to copy all instructions and you can then paste them directly into your Agent Builder interface

How test case generation works

Unlike instruction generation, which is done algorithmically, test case generation requires access to ElementsGPT / AI license.

To generate test-cases for the Agent topic, Elements sends the diagram definition into AI and generates example user questions or statements to test different iterations through the diagram.

For instance, in the diagram we covered a scenario where a customer asks Agent a question that does not fall within its scope.

Elements would generate example questions a customer may ask that would fall under that category, like:

  1. "How much does your service cost?"

  2. "What is the price of your product?"

  3. "Can you tell me the cost of your subscription?"

  4. "I'm interested in your pricing, can you provide details?"

  5. "What are your fees for the service?"

This allows you to test and ensure Agent will respect its instructions.

How to generate test cases

In your process diagram:

  • Open 'Edit' mode

  • In the left panel, click on the 'magic wand' icon

  • Click on 'Test cases'

  • The test cases will be displayed in the new window

  • The test cases will be UAT scripts of conversations between human and Agent based on mapped out process. Use this to test different scenarios within the Agent.

When Agent fails a given test case, review your diagram and refine the outcomes in your process. Then, re-generate instructions and test-cases (as the underlying diagram and its logic have changed). Repeat the process until the Agent works as expected.

Did this answer your question?