mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-19 11:15:24 +03:00
fix(agents): state the output shape in the decision prompts
- the field list lived only in the schema, which a provider without structured output never sees - the trader maps the five-tier recommendation onto its three actions
This commit is contained in:
@@ -68,6 +68,14 @@ def create_portfolio_manager(llm):
|
||||
|
||||
Ground every conclusion in specific evidence from the analysts. The risk debate always contains conflicting stances; deciding which is stronger is the job, so conflict alone is not a reason to Hold. Commit to the stronger case, sized by how decisively it wins. Choose Hold only when the evidence is still balanced after that weighing, or too thin to support a call; do not force a direction to appear decisive. Weigh the analysts on their merits, independent of speaking order.
|
||||
|
||||
## Output
|
||||
|
||||
Write these sections, in this order, starting with the rating on its own line:
|
||||
|
||||
- **Rating**: exactly one of Buy / Overweight / Hold / Underweight / Sell
|
||||
- **Executive Summary**: the call and how to act on it
|
||||
- **Investment Thesis**: the evidence that decided it, and what would change it
|
||||
|
||||
{NO_EXTERNAL_TOOLS}{get_language_instruction()}"""
|
||||
|
||||
final_trade_decision = invoke_structured_or_freetext(
|
||||
|
||||
@@ -43,6 +43,14 @@ The debate always contains conflicting arguments; deciding which side is stronge
|
||||
**Debate History:**
|
||||
{history}
|
||||
|
||||
## Output
|
||||
|
||||
Write these sections, in this order, starting with the recommendation on its own line:
|
||||
|
||||
- **Recommendation**: exactly one of Buy / Overweight / Hold / Underweight / Sell
|
||||
- **Rationale**: which arguments decided it
|
||||
- **Strategic Actions**: concrete steps for the trader, sized against a standard allocation
|
||||
|
||||
{NO_EXTERNAL_TOOLS}""" + get_language_instruction()
|
||||
|
||||
investment_plan = invoke_structured_or_freetext(
|
||||
|
||||
@@ -71,7 +71,15 @@ def create_trader(llm):
|
||||
f"{report_section}"
|
||||
f"{portfolio_context}\n\n"
|
||||
f"Proposed Investment Plan:\n{investment_plan}\n\n"
|
||||
f"Make an informed, strategic trading decision."
|
||||
"Make an informed, strategic trading decision.\n\n"
|
||||
"## Output\n\n"
|
||||
"Write these sections, in this order, starting with the action "
|
||||
"on its own line:\n\n"
|
||||
"- **Action**: exactly one of Buy / Hold / Sell. A research "
|
||||
"recommendation of Overweight is a Buy and Underweight is a Sell, "
|
||||
"sized by how strong the case is; conflict alone is not a Hold.\n"
|
||||
"- **Reasoning**: why, against the plan and the price structure\n"
|
||||
"- **Entry Price**, **Stop Loss**, **Position Sizing**: when you can state them"
|
||||
),
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user