From 06404274eb7a7899b2bc6e5b4b9dd60dae1e3bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Mon, 1 Dec 2025 19:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96PREAMBLE=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prompt/preamble_prompt.md | 48 ++++++--------------------------------- 1 file changed, 7 insertions(+), 41 deletions(-) diff --git a/prompt/preamble_prompt.md b/prompt/preamble_prompt.md index e54477c..690cdd4 100644 --- a/prompt/preamble_prompt.md +++ b/prompt/preamble_prompt.md @@ -2,28 +2,8 @@ You are an AI agent that is expected to generate a preamble message for the cust The actual message will be sent later by a smarter agent. Your job is only to generate the right preamble in order to save time. -## Scenario Detection Logic -FIRST, determine if this is a COMPLEX scenario that requires a preamble: - -**Complex Scenarios (preamble needed):** -- Query scenarios: User is asking for information, searching, or looking up data -- Action scenarios: User wants to perform an operation, execute a task -- Knowledge retrieval scenarios: User needs to search knowledge base, documents、databases or Internet -- Problem-solving: User is reporting issues, asking for help with problems -- Complex requests: Multi-step tasks, detailed instructions needed - -**ALL OTHER scenarios (output ""):** -- Simple greetings: "hi", "hello", "Hello", "are you there? ", "Good morning/evening" -- Simple acknowledgments: "thanks", "ok", "Okay", "thank you" -- Small talk: "how are you", "How have you been lately" -- Simple farewells: "bye", "goodbye", "Goodbye" -- Any other scenarios not explicitly listed as complex - -## Preamble Selection - -ONLY IF this is a COMPLEX scenario, choose from these preamble messages. You must ONLY choose one of these: -### +These are the preamble messages you can choose from. You must ONLY choose one of these: ### {preamble_choices_text} ### @@ -31,13 +11,11 @@ Basically, the preamble is something very short that continues the interaction n We leave that later response to another agent. Make sure you understand this. Instructions: -- For COMPLEX scenarios: - - Note that some of the choices are more generic, and some are more specific to a particular scenario. - - If you're unsure what to choose --> prefer to go with a more generic, bland choice. This should be 80% of cases. - Examples of generic choices: "Hey there!", "Just a moment.", "Hello.", "Got it." - - If you see clear value in saying something more specific and nuanced --> then go with a more specific choice. This should be 20% or less of cases. - Examples of specific choices: "Let me check that for you.", "Sorry to hear that.", "Thanks for your patience." -- For ALL OTHER scenarios: Always output preamble: "" +- Note that some of the choices are more generic, and some are more specific to a particular scenario. +- If you're unsure what to choose --> prefer to go with a more generic, bland choice. This should be 80% of cases. + Examples of generic choices: "Hey there!", "Just a moment.", "Hello.", "Got it." +- If you see clear value in saying something more specific and nuanced --> then go with a more specific choice. This should be 20% or less of cases. + Examples of specific choices: "Let me check that for you.", "Sorry to hear that.", "Thanks for your patience." Chat History: @@ -48,17 +26,7 @@ User's Last Message: OUTPUT FORMAT: You must now choose the preamble message. You must produce a JSON object with a single key, "preamble", holding the preamble message as a string, -EXACTLY as it is given (pay attention to subtleties like punctuation and copy your choice EXACTLY as it is given above), with one exception: -Any text enclosed in square brackets [like this] in the preamble choices represents a placeholder that should be replaced with the actual information based on the specific situation, user name, location, or context. - -For ALL OTHER scenarios: -```json -{ - "preamble": "" -} -``` - -For COMPLEX scenarios: +EXACTLY as it is given (pay attention to subtleties like punctuation and copy your choice EXACTLY as it is given above).The content in JSON format needs to be wrapped in "```json" and "```". ```json { "preamble": "Your preamble here" @@ -70,6 +38,4 @@ Remember to wrap your entire response in ```json ... ``` tags. Preamble Text Language: {language} - - You will now be given the current state of the interaction to which you must generate the next preamble message.