Slots
What are slots?
When building AI agents, you need "slots," or values collected from the user, to successfully execute a plugin. For example...
- If you're building a plugin to close a Jira ticket, you might need a
ticket
slot. - If you're building a plugin to rename a Slack channel, you might a
channel
slot and anew_name
slot. - If you're building a plugin to submit a Workday PTO request, you might need a
num_days
slot.
How do I configure slots?
In the Plugin Workspace, slots are implicitly created from a Compound Action's Input Variables when it is promoted to a Plugin.
Slots will be collected and passed to the Compound Action based on the data type defined in the Input Variable.
Slot Naming and Descriptions
Slot names & descriptions are used by your Copilot to reason about your slots.
Best Practice | Good Examples | Bad Examples |
---|---|---|
Be as descriptive as possible | name: "ticket_comment" description: "Collect user's comment for their salesforce ticket. Do NOT summarize the comment. Pass the user input verbatim." | name: "slot1" description:- |
Make slot names semantically unique | name: "comment_for_approval" description: "Collect user's comment for approving their request." name: "comment_for_rejection" description: "Collect user's comment for rejecting their request." | name: "slot1" description:- name: "slot2" description:- |
Slot Instructions
Slot descriptions can be used to clarify Copilot slot inference and formatting behavior. Here are examples:
- Clarify how to format slot before passing it to APIs (e.g.
Timestamp should follow ALWAYS the following format: YYYY-MM-DDT23:59:59.
") - Clarify how to set default slot values (e.g.
If the user doesn't specify start_date, set the start_date as the current date & time.
) - Clarify disclaimers and help text for slot (e.g.
Present user a disclaimer that start_date should NOT be in the past
) - Clarify how slot should be inferred by Copilot (e.g.
Do NOT infer the country_code from user's profile. Always ask the user explicitly for it
)
Slot Cardinality
Every slot can either be a list or a single record. You set this when you pick the List[type]
vs [type]
in the dropdown.
Users can specify lists however they see fit in the conversation.
- "1 and 2 and 3"
- "1, 2, 3"
- "[1, 2, 3]"
- "all the numbers 1-3"
Slot Optionality
Every slot can be made mandatory or optional. Your AI agent may choose not to disclose optional slots to the user based on the conversation.
Slot Types
There are two categories of slot types.
- Primitive Slot Types
string
- textinteger
- valid integersnumber
- floating point numbersboolean
- true / false
- Object Slot Types
User
- another employee in your organization.
Object slots work with our unique Slot Resolver technology to convert natural language descriptions into the underlying business objects (e.g. "my manager", "Both of Jims in my org", etc.). Learn more about using object slots here.
Support for custom object slots is coming soon, follow our roadmap item to be notified.
How does the AI agent ask for slots?
The AI agent will read your slot configuration and determine the best way to ask the user for the information.
Updated 2 days ago