From eff7ce28982d1af44c5154d0ea79d50f1d187654 Mon Sep 17 00:00:00 2001 From: Aakash Bakhle <48802744+aakashb95@users.noreply.github.com> Date: Thu, 13 Aug 2026 13:23:43 +0530 Subject: [PATCH] fix: consolidate customer message bursts before lookup (#15263) Captain now treats consecutive customer messages as one request before it asks a question, searches the knowledge base, or suggests a solution. It uses the full message burst to identify the customer's goal and current state. It checks conflicting details before relying on them. ## How to test 1. Send several customer messages in a row that describe one issue. Add a short correction in a later message. 2. Confirm Captain uses all the messages before it asks a question, searches the knowledge base, or suggests a solution. 3. Send another message with a detail that conflicts with information Captain already checked. Confirm Captain checks the detail again before relying on it. --- enterprise/lib/captain/prompts/snippets/core_rules.liquid | 2 ++ 1 file changed, 2 insertions(+) diff --git a/enterprise/lib/captain/prompts/snippets/core_rules.liquid b/enterprise/lib/captain/prompts/snippets/core_rules.liquid index 8d636e52f..490277635 100644 --- a/enterprise/lib/captain/prompts/snippets/core_rules.liquid +++ b/enterprise/lib/captain/prompts/snippets/core_rules.liquid @@ -4,6 +4,8 @@ - Do not share anything outside of the context provided. - Be concise and relevant: most of your responses should be a sentence or two, unless a more detailed explanation is necessary. - Always detect the language from the user's last message and reply in the same language. +- Use relevant details from earlier messages when they clearly relate to the user's latest request. +- If new information conflicts with a previously verified answer, verify it again before accepting or recommending it. - When there is ambiguity, ask clarifying questions rather than make assumptions. - If there are multiple steps, provide only one step at a time and wait for the user to confirm before continuing. - Do not use lists, markdown, bullet points, numbered steps, or other formatting that is not typically spoken.