Stocks.
All of Learn

Path 04 · 4 min read

What's behind every verdict

The verdict you see at the top of a stock profile isn't one AI call — it's the output of a small pipeline. Knowing the pipeline helps you read the verdict honestly.

  1. First stage — fast and cheap. Figures out what you're asking.

    01

    Router model

    The first AI stage — a fast, cheap model that classifies what you asked and extracts any tickers from your query.

  2. Second stage — does the real work and produces the structured call.

    02

    Verdict model

    The mid-tier model that turns the raw signal report into the structured Buy/Hold/Trim/Avoid verdict, with citations.

  3. Third stage — only fires on a small share of cases, on purpose.

    03

    Debate model

    The top-tier model that adversarially reviews high-stakes verdicts and sharpens the strongest counter-argument that ships with every call.

    Every verdict carries a strongest counter-argument — the single sharpest case AGAINST the call, plus why the evidence still landed there. The verdict-stage model writes the first draft of that counter on every run.

    On verdicts where being wrong matters most — low confidence, or the label conflicts with the signal lean — a stronger model takes a second pass. It either affirms the call or revises it, and in either case re-writes the counter to the form a thoughtful skeptic would actually use. When that happens, the 'refined by debate' badge appears on the counter.

    Routing the debate selectively keeps cost and latency in check. Publishing the counter on every verdict makes the publisher's internal disagreement visible regardless.

  4. And a non-AI layer in front, before anything reaches your screen.

    04

    Compliance guard

    A non-AI rules layer every verdict and every chat reply passes through before reaching you. Catches advice-speak, guarantees, and portfolio references.

    The compliance guard is plain TypeScript — no model, no probabilistic call. It runs as the last step of every verdict and every chat reply, live or mock. Three bright lines: it blocks second-person trade instructions ("you should buy"), it blocks portfolio / holdings / balance references (the chat can't talk about what you own because it doesn't know), and it blocks prediction or guarantee language.

    When the guard catches something, it sanitises the text in place rather than failing the response — "you should buy" becomes "the publisher leans bullish", and the reader still gets an answer. The line that the guard enforces in code is the same line that lets the product ship as a publisher rather than register as an adviser; see Publisher posture.

  5. One last note for when keys aren't around.

    05

    Mock mode

    When API keys aren't configured, every stage falls back to deterministic sample output so the UI still works. Marked with a `mock` tag on the verdict.

    Every adapter and every model stage has a deterministic fallback. With no Anthropic key, the router, verdict, and debate stages each return canned output; with no FMP, Quiver, or transcript keys the data adapters return fixtures of the same shape. The compliance guard runs over mock output just like it runs over live output — the contract is stable across the boundary.

    Mock mode is what makes the codebase walking-skeleton runnable with zero config and what keeps the smoke scripts deterministic in CI. A verdict produced in mock mode carries a `mock` tag so it can never be mistaken for a live editorial call in a cache or an export.

Three models plus a rules layer. Each has a single job, and the verdict is what comes out of the chain — not any one of them.

Quick check

Did it stick?

3 questions · pass at 3/3.

  1. 1. The router model's job is to…

  2. 2. The debate model fires…

  3. 3. Which layer is not an AI model?