factor_agent.prompts#

Prompt templates. They describe the data, the vocabulary and the training-segment feedback, never dates or returns.

Each role’s prompt opens with the role, its task and who uses its answer, holds the long inputs in the middle, each inside an XML tag (<quota>, <directions>, <refused_candidates>, <candidates>, <previous_memory>, <accepted>, <history>, and the context sections under their keys), and ends by restating the task and the shape of the answer. A fenced json block holds only that shape, the last thing in the prompt, so no input reads like an answer to copy.

The templates are built in (TEMPLATES) and any of them may be replaced from a file (Templates.load). A template names what it is filled with as {placeholder}; PLACEHOLDERS lists, per template, the ones it must use and the ones it may. Every template may use market (the config’s description of the data) and horizon (the bars the label spans), and every one but data, which is the same in every round, round. Prompts fills a template with those and with the data section, itself the data template filled with the market, the described inputs of the vocabulary, the scoring’s sentence and the horizon. When the vocabulary opens an intraday family, the code rules the proposer is given end with INTRADAY (the two stages, their rules and INTRADAY_EXAMPLES), and the vocabulary lists its operators by stage; without one the prompts are those of a daily campaign.

Classes

Prompts

What the Researcher's prompts say: the templates and what fills every one of them.

Templates

The templates of a campaign: the built-in ones, any of them replaced from a file.

Functions

code_rules

How to write the code: CODE_RULES, and INTRADAY with its examples when an intraday family is open.

inputs

The fields of vocabulary by family, each with its unit (a derived field's follows from its formula).