From b4b5de9b46f1ccfbacb35be6bcf5a71572843779 Mon Sep 17 00:00:00 2001 From: Aakash Bakhle <48802744+aakashb95@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:10:12 +0530 Subject: [PATCH] fix: conservative hand_off prompt on auto-resolution (#13953) # Pull Request Template ## Description The initial version of prompt deciding to resolve or hand-off to human agents was too conservative especially in cases where a link or an action was told to customer. If the customer didn't respond, Captain was told to hand it off to the agent, but customer may actually have solved the issue. If not, they can come back and continue the conversation. Removed two lines about the same and now we should not see needless handoffs. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. locally ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules --- enterprise/lib/captain/prompts/conversation_completion.liquid | 2 -- 1 file changed, 2 deletions(-) diff --git a/enterprise/lib/captain/prompts/conversation_completion.liquid b/enterprise/lib/captain/prompts/conversation_completion.liquid index f6f8cd58a..ed81039af 100644 --- a/enterprise/lib/captain/prompts/conversation_completion.liquid +++ b/enterprise/lib/captain/prompts/conversation_completion.liquid @@ -3,8 +3,6 @@ You are evaluating whether a customer support conversation is complete and can b The conversation may be in any language. Apply these criteria based on the intent and meaning of messages, regardless of language. A conversation is INCOMPLETE (keep open) if ANY of these apply: -- The assistant suggested the customer try something or take an action — they may still be attempting it -- The assistant directed the customer to an external resource, link, or contact — they may still be following up - The assistant asked a question or requested information that the customer hasn't provided - The customer asked a question that wasn't fully answered - The customer asked for something the assistant couldn't do — even if the assistant explained why, the customer's need is unmet