- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Saturday
Objective
To enhance any Agent (E.g: Workday HR payroll management AI agent) below is a step-by-step guide to improve the response logic. The goal is to move from a rigid, technical list of instructions to a more fluid, conversational flow that feels like a natural human interaction.
How to Navigate and Update the AI Agent
- Open AI Agent Studio: In your ServiceNow instance, use the All menu to search for and select AI Agent Studio.
- Locate Your Agent: Click on the Create and manage tab and select the Workday HR payroll management AI agent from your list.
- Access the Specialty Tab: You will automatically land on the Define the specialty section.
- Edit the Steps: Scroll down to the Define the role and required steps area. Locate the List of steps text box (marked as Version V1).
- Apply Changes: Highlight the existing text, paste the optimized version below, and click Save and continue at the bottom right.
"List of Steps" for a User-Friendly Response
Copy and paste the following content into the "List of steps" instruction field:
(Note: The below steps are sample steps and can be updated based on user requirement)
- Intake & Clarification: Greet the user professionally. Confirm they are seeking payslip information. If the request is vague (e.g., "Show me my money"), ask a clarifying question like: "I can help with that. Are you looking for a specific payslip or a summary for a certain period?"
- Identity & Context Validation:
- Worker ID: Check if the Worker ID is available. If not, politely request it: "To access your records securely, could you please provide your Worker ID?"
- Date Parameters: Ensure you have the Start Date, End Date, and Period Date Indicator. If missing, explain: "I need a date range to pull the correct payroll data for you."
- Intelligent Execution: Once all mandatory inputs (Worker ID, Dates, Report Name/Owner) are validated, execute the Look up Payslip action exactly once.
- Error & Edge Case Handling: If the action fails, translate technical errors into helpful HR language (e.g., "I'm having trouble connecting to Workday right now; please try again in a few minutes"). If no data is returned, suggest the user check their date range.
- Human-Friendly Response Transformation (Priority):
- Summary First: Start with a brief natural language summary (e.g., "I've retrieved your payslip for [Date Range]. Your Net Pay was [Amount].")
- Categorized Tables: Organize output into logical Markdown tables: Earnings, Deductions, Taxes, and Employer Benefits.
- Dynamic Labeling: Use the column names from the data but ensure they are human-readable (e.g., convert GROSS_PAY_AMT to Gross Pay).
- Cleanliness: Omit any sections that contain no data. Never display system IDs, metadata, or raw JSON strings.
- Response Depth Control: By default, provide the formatted summary and tables. Only provide granular, line-by-line technical details if the user explicitly asks for "detailed raw data."
Sample Response
Agent Tool Update
Based on the Look up Payslip configuration, users can control how the AI agent processes and presents data by modifying the Output Transformation Strategy.
By default the tool is set to "None", which means the agent will pass the data through without additional AI-driven formatting. To change how the response is handled, the below steps can be performed:
Modifying Agent Tool Response Behavior
To refine how the Workday HR payroll management AI agent communicates its findings, you must adjust the transformation settings within the Agent Tool record.
- Select the Transformation Strategy
The Output transformation strategy field dictates the linguistic style and depth of the final response. You can choose from the following options:
|
Strategy |
Description |
Best Use Case |
|
None |
Returns the output exactly as generated by the tool or post-processing script. |
Technical debugging or raw data transfers. |
|
Concise |
Provides a brief, "just the facts" summary. |
Quick mobile notifications or status updates. |
|
Verbose |
Provides a detailed, comprehensive explanation of the results. |
Complex payroll queries where context is key. |
|
Paraphrase |
Rewrites the output in a more natural, conversational tone. |
Enhancing the "human feel" of the AI interaction. |
|
Summary for Search |
Distills the data into a format optimized for search result snippets. |
High-level overviews in a knowledge base context. |
- Implementation Steps
- Navigate to the Agent Tool record for Look up Payslip.
- Locate the Output transformation strategy dropdown menu on the right side of the form.
- Select your desired strategy (e.g., Concise for efficiency or Paraphrase for better UX).
- Click Update in the top right corner to save the changes.
- Advanced Customization (Optional)
If the standard strategies do not meet your requirements, you can use the Post processing script area (ES12 mode supported) to programmatically filter or format the JSON output before the AI applies the transformation strategy.
