Skip to main content

How the AI understands your request

Who it’s for
Anyone who wants to state a strategy precisely, or who has had a value not land
Assumes
You have read the AI overview

Your message is read twice, concurrently, by two components with different jobs. Knowing that explains most of the builder's behaviour, including why stating a stop-loss and an entry rule in the same sentence works.


Two readers, one message

ReaderQuestion it answersWhat it produces
RouterWhat action is this?One tool, from the set valid in this phase
ExtractorWhat values are here?Every value you stated, regardless of the action

Both read the same message, at the same time.

The router: what action is this?

Classification. It reads the message and the conversation state, and picks exactly one tool to call. It is a cheap call, deliberately run at low reasoning effort, a thinking model spends its budget on hidden reasoning and returns truncated arguments, which is worse than a fast classification.

Its output maps to a route intent that decides what happens next:

Route intentWhat the turn does
collect_inputRecords inputs; asks for what is still missing
clarificationAsks you a specific question
confirmationTreats your message as approving what was offered
modify_signalsChanges which indicators/conditions are used
edit_condition_termRemoves or changes one term inside a condition
run_backtestRuns a backtest, optionally over a period you stated
improve_strategy / improve_strategy_loopRefines an existing strategy
risk_execution_updateUpdates stops, targets, caps, sizing
market_inquiryAnswers a data question ("what dividend data do you have for RELIANCE")
general_chatEducational answer ("what is RSI?")
user_rejection / pause_workflowHalts automatic progression
stock_advice_requestReturns the safety boundary. See What the AI will not do

The extractor: what values are here?

A separate call that reads the whole message against a single wide schema of ~59 strategy fields and returns everything you stated. It does not care which action the router picked.

Why this exists is worth understanding, because it is the fix for a real defect. Routing and extraction used to be one call. The router picks a tool, and the fields captured were whichever fields that tool happened to declare. Those declarations partitioned the field universe (one tool carried core inputs and entry/exit clauses, another carried stops, targets and caps) and only one tool can be called per turn. So a message like:

create a strategy for reliance 1 min, sl 2.5%, tp 1%, CLOSE > 0, max trades 10

delivered at most a third of itself, and which third depended on which tool the model reached for. Nothing downstream could distinguish a field you never mentioned from a field that had nowhere to go.

Splitting the jobs fixes it. The two calls run concurrently, so the split costs a second call rather than a second round-trip.

What the extractor must not do

Two guards, because a large schema is an invitation to fill it in:

  • It must not invent. Every field description says "omit when not stated". A field the schema does not declare drops the whole result rather than being half-applied.
  • It must not judge. Routing judgements (whether a message means a dynamic universe, for instance) were deliberately withdrawn from the extractor. Reading a sentence and deciding a route are different jobs, and the router owns the second one alone.

Deterministic extractors keep the last word on anything they can read themselves, so a pattern-matched stop-loss is never overridden by a model's re-reading of the same words.


Provenance: which values are yours

Every slot in the resolved intent carries where its value came from. This is what makes the read-back trustworthy.

ProvenanceMeaningExample
StatedYou said it, in this message. Your words always winYou typed "1.5% stop"
DefaultedThe platform supplied a value you did not stateYou said nothing about risk-per-trade
DerivedInherited from what the conversation already resolvedYou set the symbol three turns ago
UnsupportedYou asked for it; the platform cannot express itA cash-reserve percentage
A default is not your value

When the assembled strategy shows a stop-loss you never mentioned, that is a defaulted value: a reasonable number, not your number. If a control matters to you, state it. The provenance split exists so this is visible rather than something you discover from a backtest.

What can be inherited, and what cannot

Only four things can be adopted from conversation state when the current message does not restate them: instrument, timeframe, objective, direction.

Rules are deliberately not adoptable. A rule is the strategy's substance and must come from your words on some turn, never from state. Adopted values are marked DERIVED and carry no span. They are the system's knowledge, not a quote from your message, and labelling them as your words would make the read-back lie.


Relative time

The state passed to the model carries today's date. Without it, "backtest the last 6 months" is unanswerable, the router cannot know what "now" is.

This was a real failure: relative durations were silently dropped and the run fell back to the product default window, while absolute ranges ("from Jan 2026 to March 2026") worked fine. Which is why only relative durations appeared to be ignored.

Both forms work today:

backtest the last 6 months
backtest from 2025-01-01 to 2025-06-30
run it on the last 90 days

See Choosing a test period.


Referential replies

The state also carries the options the assistant offered in its previous message. When the AI shows you a pick-list of five stocks and you reply "all five" or "the second one", the reference resolves against that list, never against the stored strategy inputs.


What the AI sees of the conversation

To keep every turn cheap and predictable, the model is given a bounded projection of the session rather than the full transcript:

IncludedNot included
The current phaseThe full message history
Your core inputs and which are missingOther users' strategies
The signal plan, if one existsYour account, capital or balances
A summary of the latest backtest, grade, return, win rate, trade countYour positions or P&L
The last six non-system messages, each truncatedAny market data not explicitly fetched
Today's date
Options offered in the previous turn

The consequence worth knowing: the AI does not know your account state. It cannot tell you your balance, cannot see your positions, and cannot factor your capital into a strategy. That is deliberate. It keeps the builder a builder.


Writing a request the pipeline reads well

You do not need to be terse or formal. You do need to be specific about numbers, because a comparison without a threshold is one of the four gap categories.

Instead ofSayWhy
"buy near the 20 EMA""buy when price is within 0.5% of the 20 EMA""Near" is a MISSING_THRESHOLD gap
"strong volume""volume above 1.5× the 20-period average""Strong" describes a level without naming one
"buy unless RSI is above 70""buy when RSI is between 40 and 70""Unless" is AMBIGUOUS_SCOPE and is never guessed
"tight stop""0.8% stop"A default will be supplied otherwise
"aggressive""aggressive, 2% risk per trade"Aggressive calibrates defaults; it does not set them

Both forms are accepted. The left column costs an extra turn while the AI asks.


Worked example

You type:

create a long-only strategy on RELIANCE, 5 minute, entry when RSI(14) crosses above 55 and price is above the 20 EMA, exit on RSI below 45, 1.2% stop, risk 1% per trade, max 3 trades a day

The router picks modify_strategy_inputs, this is an input-bearing turn, and the route intent is collect_input.

The extractor independently reads: symbol RELIANCE, timeframe 5m, direction long_only, entry condition, exit condition, stop-loss 1.2%, per-trade risk 1%, max_trades_per_day 3.

The resolver marks all of those stated. Nothing is defaulted except the values you did not mention (take-profit, trading window) which are marked defaulted and shown as such.

The compiler produces a strategy object. Both conditions carry numeric thresholds, so there are no gaps and no repair pass.

You see the assembled strategy with every field and its provenance, before anything runs.

More: Example strategies.


Next