fix(prompts): put the current date at the top of analyst prompts

The date hint sat at the end of each analyst's system prompt, after a long
indicator block, so weaker models anchored to their training cutoff when
generating tool-call date ranges. Lead each prompt with it instead.
This commit is contained in:
Yijia-Xiao
2026-06-21 23:50:33 +00:00
parent a0120e1805
commit 2b2d685df6
4 changed files with 11 additions and 8 deletions

View File

@@ -39,8 +39,9 @@ def create_fundamentals_analyst(llm):
" will help where you left off. Execute what you can to make progress."
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
" You have access to the following tools: {tool_names}.\n{system_message}"
"For your reference, the current date is {current_date}. {instrument_context}",
" You have access to the following tools: {tool_names}."
" Today's date is {current_date}; treat it as 'now' for all analysis and tool-call date ranges. {instrument_context}\n"
"{system_message}",
),
MessagesPlaceholder(variable_name="messages"),
]

View File

@@ -65,8 +65,9 @@ Write a very detailed and nuanced report of the trends you observe. Provide spec
" will help where you left off. Execute what you can to make progress."
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
" You have access to the following tools: {tool_names}.\n{system_message}"
"For your reference, the current date is {current_date}. {instrument_context}",
" You have access to the following tools: {tool_names}."
" Today's date is {current_date}; treat it as 'now' for all analysis and tool-call date ranges. {instrument_context}\n"
"{system_message}",
),
MessagesPlaceholder(variable_name="messages"),
]

View File

@@ -40,8 +40,9 @@ def create_news_analyst(llm):
" will help where you left off. Execute what you can to make progress."
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
" You have access to the following tools: {tool_names}.\n{system_message}"
"For your reference, the current date is {current_date}. {instrument_context}",
" You have access to the following tools: {tool_names}."
" Today's date is {current_date}; treat it as 'now' for all analysis and tool-call date ranges. {instrument_context}\n"
"{system_message}",
),
MessagesPlaceholder(variable_name="messages"),
]

View File

@@ -86,8 +86,8 @@ def create_sentiment_analyst(llm):
"You are a helpful AI assistant, collaborating with other assistants."
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
"\n{system_message}\n"
"For your reference, the current date is {current_date}. {instrument_context}",
" Today's date is {current_date}; treat it as 'now' for all analysis and tool-call date ranges. {instrument_context}"
"\n{system_message}",
),
MessagesPlaceholder(variable_name="messages"),
]