factor_agent.researcher#
The Researcher: the LLM roles of a round, from prompt to checked candidates.
Four roles, each with its own backend and model: the planner plans the
round’s directions to the quota of each mechanism type, the proposer writes
one candidate per direction (and fixes those the parser or the Gate
refuses), the reviewer judges each gated candidate’s consistency in a
separate call (and the proposer rewrites, once, each it finds
inconsistent: revise), and the distiller turns the ledger into the memory.
What the prompts say comes from Prompts: the templates (built in or
replaced by the config), the market, the label’s horizon, the scoring, the
vocabulary and the mechanism types, which also set the plan’s slots and
the types a candidate may have.
A round’s directions are split into proposal groups: contiguous runs of near-equal size, in the plan’s type order. Each group’s first proposal, fixes, review, rewrite and second review are calls of their own, and every group’s call of a stage is sent at once on threads and waited for; the parser and the Gate then run over the whole round in slot order, so the outcome does not depend on which reply lands first. The planner and the distiller make one call a round.
Classes
One refused version of a candidate: what the proposer wrote, where it failed and why. |
|
One planned slot of a round: its mechanism type, the action, the parent trial and the idea. |
|
One direction of a round after its retries. |
|
The LLM roles of a campaign. |
|
The reviewer's judgement of one candidate. |
Functions
The unit of a gated graph's output, as the Gate's dimension inference names it: "price", "pure number"... |
|
The non-empty sections of |