From 2c87c33c69e026be218e06fc40b3430ea6c694f0 Mon Sep 17 00:00:00 2001 From: dw1161 Date: Sat, 21 Mar 2026 15:28:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=20risk=5Fmgmt?= =?UTF-8?q?=20prompt=20=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=96=AD=E8=A1=8C=20Syn?= =?UTF-8?q?taxError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tradingagents/agents/managers/risk_manager.py | 4 +--- tradingagents/agents/risk_mgmt/aggressive_debator.py | 4 +--- tradingagents/agents/risk_mgmt/conservative_debator.py | 4 +--- tradingagents/agents/risk_mgmt/neutral_debator.py | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/tradingagents/agents/managers/risk_manager.py b/tradingagents/agents/managers/risk_manager.py index 10a1cddb..f4462415 100644 --- a/tradingagents/agents/managers/risk_manager.py +++ b/tradingagents/agents/managers/risk_manager.py @@ -43,9 +43,7 @@ Deliverables: Focus on actionable insights and continuous improvement. Build on past lessons, critically evaluate all perspectives, and ensure each decision advances better outcomes.""" - prompt += " - -**重要:请完全用简体中文输出你的分析和辩论内容。**" + prompt += "\n\n**重要:请完全用简体中文输出你的分析和辩论内容。**" response = llm.invoke(prompt) new_risk_debate_state = { diff --git a/tradingagents/agents/risk_mgmt/aggressive_debator.py b/tradingagents/agents/risk_mgmt/aggressive_debator.py index a9de443d..efe6d4e0 100644 --- a/tradingagents/agents/risk_mgmt/aggressive_debator.py +++ b/tradingagents/agents/risk_mgmt/aggressive_debator.py @@ -32,9 +32,7 @@ Here is the current conversation history: {history} Here are the last arguments Engage actively by addressing any specific concerns raised, refuting the weaknesses in their logic, and asserting the benefits of risk-taking to outpace market norms. Maintain a focus on debating and persuading, not just presenting data. Challenge each counterpoint to underscore why a high-risk approach is optimal. Output conversationally as if you are speaking without any special formatting.""" - prompt += " - -**重要:请完全用简体中文输出你的分析和辩论内容。**" + prompt += "\n\n**重要:请完全用简体中文输出你的分析和辩论内容。**" response = llm.invoke(prompt) argument = f"Aggressive Analyst: {response.content}" diff --git a/tradingagents/agents/risk_mgmt/conservative_debator.py b/tradingagents/agents/risk_mgmt/conservative_debator.py index bc1daab7..3a2230ad 100644 --- a/tradingagents/agents/risk_mgmt/conservative_debator.py +++ b/tradingagents/agents/risk_mgmt/conservative_debator.py @@ -33,9 +33,7 @@ Here is the current conversation history: {history} Here is the last response fr Engage by questioning their optimism and emphasizing the potential downsides they may have overlooked. Address each of their counterpoints to showcase why a conservative stance is ultimately the safest path for the firm's assets. Focus on debating and critiquing their arguments to demonstrate the strength of a low-risk strategy over their approaches. Output conversationally as if you are speaking without any special formatting.""" - prompt += " - -**重要:请完全用简体中文输出你的分析和辩论内容。**" + prompt += "\n\n**重要:请完全用简体中文输出你的分析和辩论内容。**" response = llm.invoke(prompt) argument = f"Conservative Analyst: {response.content}" diff --git a/tradingagents/agents/risk_mgmt/neutral_debator.py b/tradingagents/agents/risk_mgmt/neutral_debator.py index 536893fc..abdb3e24 100644 --- a/tradingagents/agents/risk_mgmt/neutral_debator.py +++ b/tradingagents/agents/risk_mgmt/neutral_debator.py @@ -32,9 +32,7 @@ Here is the current conversation history: {history} Here is the last response fr Engage actively by analyzing both sides critically, addressing weaknesses in the aggressive and conservative arguments to advocate for a more balanced approach. Challenge each of their points to illustrate why a moderate risk strategy might offer the best of both worlds, providing growth potential while safeguarding against extreme volatility. Focus on debating rather than simply presenting data, aiming to show that a balanced view can lead to the most reliable outcomes. Output conversationally as if you are speaking without any special formatting.""" - prompt += " - -**重要:请完全用简体中文输出你的分析和辩论内容。**" + prompt += "\n\n**重要:请完全用简体中文输出你的分析和辩论内容。**" response = llm.invoke(prompt) argument = f"Neutral Analyst: {response.content}"