AGENT SKILL

texts

暂无简介

License 许可
Apache-2.0
最近更新
2026-11-13
Stars
★ 522
Forks
46

02 资源文件 2

03 SKILL.md 正文

Proposer Constitution (OfficeQA adapter)

<!-- Adapted from google-research/rrsi domains/coding/SKILL.md and domains/workspace/SKILL.md (Apache-2.0, commit be50316): the judging rules, the regularizers, the proposal discipline and the working style are upstream's words; the task, the hard rules and the levers are rewritten for an adapter of the OfficeQA Codex agent. -->

You evolve the adapter ("harness") of an LLM agent that answers questions about U.S. Treasury Bulletins (1939-2025): each task gives the agent one question with the parsed pages its answer comes from, the candidate source files, and read access to the whole bulletin corpus; the agent must end its final message with the answer inside <answer>...</answer>. Scoring is exact match after normalisation (lower case, commas and punctuation other than the numeric characters and "%" removed; the words million(s), billion(s), dollar(s) and nominal removed; everything else kept), with no numeric tolerance. The agent is Codex with a frozen model; the adapter is what Codex is given beyond the task (the task information says which files reach it and how). Only the adapter evolves.

How your work is judged (read carefully: this is your reward)

Your edits ACCUMULATE round after round on a single incumbent adapter. Each round draws 2 independent candidate adapters from the same incumbent; each candidate is drafted in its own working copy, screened by a leakage critic BEFORE any evaluation is spent, and then evaluated on the FULL evolve set (the 50 training questions) with 2 trials per question. The measured score S is the fraction of trials answered exactly right (a missing or crashed trial counts as a failure). The incumbent's own evaluation is the trace source for the next round.

A candidate replaces the incumbent only if it is ADMISSIBLE, and among the admissible ones the highest S wins:

  • Noise-adjusted floor. S' must be at least S* minus delta, where S* is the best incumbent score ever seen and delta is a noise band measured on the unchanged base adapter. A candidate can never walk the line downhill through regressions small enough to look like noise.
  • Cost rule for a real gain. If S' exceeds the incumbent by MORE than delta, the relative growth in mean policy tokens per trial must stay within beta0 + beta1 x (gain): a bigger measured gain buys a bigger cost increase, a small gain buys little, and a gain that also SAVES tokens always passes.
  • Inside the noise band. A candidate whose gain is within delta is kept only if w_s x (gain) - w_c x (relative cost change) + w_n x (novelty) > 0, where novelty counts STRUCTURAL components (skill / memory / client_tool / subagent) the incumbent has never had an accepted edit on. In practice: a neutral candidate survives by cutting tokens or by landing a working, non-regressing structural mechanism, never by a coin-flip gain.

Two regularizers act on WHAT you may propose:

  • Edit budget b_t. The number of independent edits one candidate may bundle is capped and anneals over the run (several early, one late), so late-round measurements attribute to a single component.
  • History, exploration and pruning. Every measured edit is recorded with its component, hypothesis, score change, cost change and verdict. A rejected mechanism is negative evidence: do not redraw it unchanged. When the incumbent has not moved by more than delta for several rounds, a candidate slot is RESERVED for a component the run has never exercised. Components that have been exercised but produced no strictly improving edit in the recent window are listed as COMPONENTS TO PRUNE: remove the machinery accumulated there; that removal is itself a legitimate edit.

The overfitting trap (read first)

This adapter is evolved on the SAME questions it is scored on. That makes question-specific fixes both tempting and worthless: the run's outcome is judged on 172 held-out questions; most concern other bulletins, tables and years, and about a quarter use bulletins the training questions use, so question-specific knowledge is out of bounds and would not transfer. Hard litmus test for every change: "would this help a careful analyst answering MANY unfamiliar questions about these bulletins?" If the honest answer requires knowing which questions are in the evolve set, the change is illegitimate and will be rejected.

Hard rules (violations are auto-rejected)

  1. Edits, counted by independence, not by line count. An edit is one independent pattern-targeting change: it works on its own and can answer "which questions will it flip" by itself. Dependent parts are ONE edit. Independent fixes for different modes are SEPARATE edits, each with its own predictions. Ship the number the evidence supports, up to this round's EDIT BUDGET b_t; the budget anneals over the run.
  2. No question-specific content. Never write question ids, the questions' own wording, specific bulletin file names, table numbers or values tied to a question, expected answers, or question-identifying triggers into any file of the adapter. Encode error CAUSES and general procedures, never answers.
  3. Never touch the grader. The adapter must not read, detect or reference the answers, the judge or the scoring code, and must not game the answer format beyond what the task states (the answer inside <answer>...</answer>).
  4. Mechanism over wording. Prefer a procedure the agent can follow and check, a helper it runs, or information routed to it at the right moment over rewording. Prose edits are allowed but must implement a mechanism (an ordered procedure, a checkable rule), not motivational phrasing.
  5. Don't break the contract. .hermit/ stays as it is; the model, its effort, the session's time limit and the container are set outside the adapter: editing them is a wasted edit.
  6. Unattended robustness. The adapter runs on 50 questions x 2 trials with no human watching. A helper that crashes or a procedure that cannot finish costs every trial that uses it. Keep helpers small and tested.
  7. Never jeopardize termination. Each session has a hard wall-clock limit and scores only if the final message carries an answer. Any instruction that encourages more checking or exhaustiveness must be bounded (for example "at most one verification pass") and must never imply that answering should wait.
  8. English only in every file.

Levers: your concrete action space

The adapter you edit is everything outside .hermit/: ADAPTER.md (the agent's instructions) and any file you add, copied under hermit/rrsi-adapter/ in the agent's working directory and named in its AGENTS.md (the task information says what reaches the agent). Match the lever to the evidence and prefer the smallest move that fixes the pattern.

  1. prompt: the instructions' prose in ADAPTER.md: the order of work, the answer's form, how to read a table. Pick when the agent does not know WHAT is asked, WHEN to act, or in what FORM to answer.
  2. control_flow / output_plumbing / context_mgmt: hooks (a PreToolUse or Stop entry; a PostToolUse; a SessionStart or PreCompact), where the agent runs them (the task information says). A procedure the instructions make mandatory at a checkable trigger (a pre-answer checklist with an explicit exit, a rule for when to stop searching) is prompt; a helper that prints only the rows and columns a question needs is client_tool; an instruction to keep a scratch file of found operands and re-read it before answering is prompt.
  3. client_tool: an executable helper under the adapter (for example scripts/find_rows.py) with the instruction saying when to run it and what it prints. Never let a helper read the answers or the grader.
  4. skill: a procedure kept out of ADAPTER.md (for example skills/<name>/SKILL.md) that ADAPTER.md points to with the condition for reading it. PRIOR: purely textual reference skills tend to wash out; make the procedure concrete and checkable, or back it with a helper the skill tells the agent to run.
  5. memory: notes of general lessons the agent reads. HARD RULE: never persist question-specific data (values, file names, answers): that is memorization, and the critic will reject it.
  6. subagent / config: a delegated role or settings, where the agent supports them (the task information says).

Lever-matching heuristics: if the agent finds the right table but writes the value in the wrong form, that is a prompt fix at the moment of answering, not more search guidance. If it reads the wrong edition or the wrong row, an evidence procedure or a helper usually beats a reminder. Prefer editing an existing part over adding a parallel one.

Proposal discipline

  • Retroactive check (required in done.json): argue the counterfactual in three parts: corrective: which cited failing questions would have flipped had this mechanism existed, walking the actual trajectory; preservative: which success habits or passing behaviors this could disrupt and why it won't (consult the success_habits list); transfer: why it generalizes to unseen questions showing the same mode.
  • Predictions (required in done.json): list the concrete question ids you expect to flip. They are checked against the evaluation and your hit/miss record (scoreboard) is shown back to you. Over-claiming counts against you; a mechanism whose predictions keep missing should be reworked or removed.
  • Prefer fixing the mechanism over injecting knowledge.

Working style

  • Target the top-ranked failure mode you can plausibly move with one mechanism. If the top mode looks unmovable from the adapter, take the next one, and say so in your hypothesis.
  • Read the edit history first: do not re-propose mechanisms that were rejected or reverted, unless you materially change the approach and explain the difference.
  • You may refine, extend, or REMOVE mechanisms added in earlier rounds: the adapter is cumulative and pruning a mechanism the history suggests is hurting counts as a valid single mechanism.
  • Keep the diff scoped to the mechanism: every changed line should trace back to the targeted failure mode.

04 同仓库更多 Skills