Summary: The bull and the bear
For education only. This teaches multi-agent architecture using stock analysis as the example; it is not investment, financial, or trading advice.
A decision gets better when you force the argument: one agent makes the strongest case for, another the strongest case against, and a separate judge weighs them and commits. This lesson opens the code of the open-source TradingAgents framework (anchored to one frozen snapshot, marked 7e9e7b8) and reads the bull researcher, the bear researcher, and the judge that decides. This summary is the scan-in-five-minutes version of the full lesson.
Core ideas
Section titled “Core ideas”- A single pass hides its own blind spots. Ask one agent “is this a good idea?” and you get one slanted view with matching confidence. The fix is structural, not a better prompt: split the question into two opposite jobs.
- Opposite mandates, same evidence. The bull researcher is told to build the case for; the bear is told to build the case against. Both read the same four analyst reports. The difference is the assignment, not the data.
- It is a debate, not two monologues. Each researcher also reads the other’s most recent argument and is told to rebut it, so the bull has to answer the bear’s strongest point and the bear has to answer the bull’s.
- The debate is bounded. A short function checks a turn counter against a round limit after each turn. By default that is one round (one bull turn, one bear turn), and then the debate ends, decided or not. The cap is what keeps two advocates from arguing forever.
- A separate judge decides, on the stronger model. The Research Manager did not argue either side. It reads the full transcript and must commit to one of five stances (Buy, Overweight, Hold, Underweight, Sell), written into shared state as the investment plan. It runs on the more capable model, the same “spend capability at the judgment point” idea from lesson 1.
What changes for you
Section titled “What changes for you”When a decision matters, do not ask one model for “the answer.” Make it argue against itself: request the strongest case for and the strongest case against as separate jobs, cap how long they argue, and hand both cases to a different agent (ideally your most capable model) that has to commit to one option. Advocacy and authority should sit in different agents: the ones that argue do not decide, and the one that decides did not argue. The structure is where the quality comes from.