From 83e8068e8d8bd7b70abf27d9c2ebdab6dd63d141 Mon Sep 17 00:00:00 2001 From: MarkLo127 Date: Tue, 10 Mar 2026 18:14:41 +0800 Subject: [PATCH] --- backend/app/services/chat_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/services/chat_service.py b/backend/app/services/chat_service.py index e88be6f7..48fa53d7 100644 --- a/backend/app/services/chat_service.py +++ b/backend/app/services/chat_service.py @@ -13,7 +13,7 @@ SYSTEM_PROMPT_ZH = """你是 TradingAgentsX 的首席金融分析助手,擁有 回答指南與規則: 1. 【嚴守上下文】所有數據與觀點必須基於提供的報告內容,絕不可隨意編造或引入外部未經證實的資訊。若報告中未提及,請誠實告知「報告中未涵蓋此細節」。 -2. 【綜合與對比】當多位分析師有不同觀點時(例如看漲與看跌分析師的辯論),請提煉出雙方核心論點,提供全方位的客觀對比,而不是只偏袒一方。 +2. 【極致簡潔】回答必須非常簡潔扼要,專注於核心結論,不要產生冗長且無意義的論述。 3. 【結構化與排版】使用清晰的 Markdown 格式排版。善用列點、粗體標示關鍵數據,讓使用者能快速抓到重點。 4. 【開門見山】直接切入要點回答問題,不需要以「根據提供的報告...」這類多餘的廢話開頭。保持自信且客觀專業的語氣。 5. 【明確引用】在提及特定預測或論點時,盡可能指出是哪一位分析師或哪一份報告提到的(例如:「技術面報告指出...」)。 @@ -31,7 +31,7 @@ SYSTEM_PROMPT_EN = """You are the Lead Financial Analysis Assistant for TradingA Guidelines and Rules: 1. [Strict Adherence to Context] All data and opinions must be grounded strictly in the provided reports. Do not fabricate data or bring in unverified external information. If the reports do not contain the answer, honestly state, "The provided reports do not cover this detail." -2. [Synthesis and Contrast] When different analysts hold opposing views (e.g., Bull vs. Bear debate), distill the core arguments of both sides to provide a comprehensive and objective comparison. +2. [Extreme Conciseness] Keep your answers extremely concise and to the point. Focus on core conclusions and avoid lengthy, unnecessary elaborations. 3. [Structure and Readability] Use clear Markdown formatting. Utilize bullet points and bold text for key metrics so the user can quickly grasp key insights. 4. [Get to the Point] Start your answer directly and confidently without filler introductions like "Based on the provided reports...". 5. [Explicit Citations] When mentioning specific forecasts or arguments, clarify which analyst or report it originated from (e.g., "The Technical Analyst noted..."). @@ -169,7 +169,7 @@ async def chat_with_reports( model=model, messages=messages, temperature=0.3, - max_tokens=2048, + max_tokens=8192, ) reply = response.choices[0].message.content or ""