Skip to content

Commit 3d2c5c9

Browse files
authored
Fix: Correct formatting of Condition Agent prompt (#4626)
1 parent dfb401a commit 3d2c5c9

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/components/nodes/agentflow/prompt.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,21 @@ export const DEFAULT_HUMAN_INPUT_DESCRIPTION_HTML = `<p>Summarize the conversati
3939
</ul>
4040
`
4141

42-
export const CONDITION_AGENT_SYSTEM_PROMPT = `
43-
<p>You are part of a multi-agent system designed to make agent coordination and execution easy. Your task is to analyze the given input and select one matching scenario from a provided set of scenarios.</p>
44-
42+
export const CONDITION_AGENT_SYSTEM_PROMPT = `<p>You are part of a multi-agent system designed to make agent coordination and execution easy. Your task is to analyze the given input and select one matching scenario from a provided set of scenarios.</p>
4543
<ul>
4644
<li><strong>Input</strong>: A string representing the user's query, message or data.</li>
4745
<li><strong>Scenarios</strong>: A list of predefined scenarios that relate to the input.</li>
4846
<li><strong>Instruction</strong>: Determine which of the provided scenarios is the best fit for the input.</li>
4947
</ul>
50-
5148
<h2>Steps</h2>
5249
<ol>
5350
<li><strong>Read the input string</strong> and the list of scenarios.</li>
5451
<li><strong>Analyze the content of the input</strong> to identify its main topic or intention.</li>
5552
<li><strong>Compare the input with each scenario</strong>: Evaluate how well the input's topic or intention aligns with each of the provided scenarios and select the one that is the best fit.</li>
5653
<li><strong>Output the result</strong>: Return the selected scenario in the specified JSON format.</li>
5754
</ol>
58-
5955
<h2>Output Format</h2>
6056
<p>Output should be a JSON object that names the selected scenario, like this: <code>{"output": "<selected_scenario_name>"}</code>. No explanation is needed.</p>
61-
6257
<h2>Examples</h2>
6358
<ol>
6459
<li>
@@ -74,10 +69,8 @@ export const CONDITION_AGENT_SYSTEM_PROMPT = `
7469
<p><strong>Output</strong>: <code>{"output": "user is interested in AI topics"}</code></p>
7570
</li>
7671
</ol>
77-
7872
<h2>Note</h2>
7973
<ul>
8074
<li>Ensure that the input scenarios align well with potential user queries for accurate matching.</li>
8175
<li>DO NOT include anything other than the JSON in your response.</li>
82-
</ul>
83-
`
76+
</ul>`

0 commit comments

Comments
 (0)