Hi everyone,
I am building a Plugin in Agent Studio that retrieves a user's timecard details and presents them with an "Approve" button using a Compound Action. I am running into an issue where the Reasoning Engine hallucinates a successful approval status immediately upon displaying the card, rather than waiting for the user to click the button.
The Goal
Plugin triggers (e.g., "I need to approve my timecard").
Compound Action fetches data, formats it using LLM, and sends a notify message with an "Approve Timecard" button.
The Bot should say: "Here are your details, please review and approve."
The Issue
When the plugin runs, the bot outputs the following message at the top of the response sometimes at the end, before the timecard details:
"Your timecard has been retrieved and successfully approved."
It seems the AI believes that simply running the plugin successfully means the business process (approval) is complete.
My Setup:
I am using a Compound Action called via an Action Activity in a Conversational Process. Here is the YAML logic:
Timecard_Approval_Flow
steps:
- action:
action_name: User_Lookup
output_key: user
input_args:
user_email_address: meta_info.user.email_addr
- action:
action_name: adhoc_retrieve_timecard_employee
output_key: timecard_details
input_args:
person_number: data.user[0].allExtension.accrualExtension.personNumber
- action:
action_name: mw.generate_text_action
output_key: timecard_formatted_details
input_args:
system_prompt: "'You are a helpful HR assistant...'"
user_input: # ... (Formatting logic here) ...
- action:
action_name: mw.get_user_by_email
output_key: target_user
input_args:
user_email: meta_info.user.email_addr
- notify:
output_key: response
recipient_id: data.target_user.user.record_id
message: data.timecard_formatted_details.generated_output
actions:
- key: approve
label: "'Approve Timecard'"
system_action:
action_name: adhoc_timecard_approval
input_args:
enddate: data.timecard_details.endDate.$SPLIT("T")[0]
startdate: data.timecard_details.startDate.$SPLIT("T")[0]
- return:
output_mapper:
status: "'Pending Review'"
display_instruction_for_model: "'STOP. The task is NOT complete. Do NOT say the timecard is approved. The user must review the details below. Say exactly: Here are your timecard details for review.'"
Troubleshooting Steps Taken So Far :
Added Display Instructions: I added a return block at the end of the Compound Action with strong display_instruction_for_model telling the AI to stop and specifically NOT say "Success".
Checked Progress Updates: I verified the Action Activity in the Plugin Editor to ensure there are no "On Complete" messages configured that say "Success".
Plugin Output Mapping: I verified that the output of the Compound Action is being mapped back to the Conversational Process.
despite these instructions, the bot still defaults to a success message. How can I force it to remain neutral?

Thanks!

