autoresearch
Run a measured experiment study in LEVI work: tune a harness, prompt, threshold or replay parameter against a fixed evaluator over several rounds, keep or discard each change, and confirm once on held-out data. Use when the user asks to optimise, tune, sweep, calibrate or "autoresearch" something that has a fixed evaluator and a number to move. Not for bug fixes, one-off edits or a single comparison, and never for anything that moves the real robot.
- License 许可
- Apache-2.0
- 所属仓库
- Koooki3/LEVI
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- autoresearch
- description
- Run a measured experiment study in LEVI work: tune a harness, prompt, threshold or replay parameter against a fixed evaluator over several rounds, keep or discard each change, and confirm once on held-out data. Use when the user asks to optimise, tune, sweep, calibrate or "autoresearch" something that has a fixed evaluator and a number to move. Not for bug fixes, one-off edits or a single comparison, and never for anything that moves the real robot.
02 资源文件 3
- 参考文档ORIGIN.json4.1 KB
- 参考文档references/evals.md2.0 KB
- 参考文档references/round-record.md2.2 KB
03 SKILL.md 正文
autoresearch (LEVI)
For the maintainer's workspace (LEVI/lab/... paths are git-ignored lab files; "§0" and "§4" mean LEVI/lab/AGENTS.md). Method after Karpathy's autoresearch (fixed evaluator, one editable surface, baseline first, keep or discard, simplicity rule) and Orchestra's two loops (inner experiments, outer synthesis). Sources, pinned commits, what was left out and why: ORIGIN.json.
Before the study (all of it, or do not start)
- Question, metric, guards. One sentence; one primary metric with its direction, measured on a named development gold set; guard metrics with limits written first (wall time, local tokens, external tokens counted apart, a safety or regression count). Agreement with a teacher is a tune-time diagnostic only, never the primary or the confirm metric.
- Data split. Tune (iterate on it) and confirm (the list of episode ids pinned by hash before the first run, opened once per study). Frozen, held-out and blind sets are not part of this loop (R9, R11). To check that an episode is not in one, compare its id with what
gold_tool.py --set frozen|heldout nextandgold_tool_screws.py nextprint (ids and status only); if still unsure, ask. Never read.env: the pool's held-out list lives there and is not visible to an agent shell. - One editable surface (a file or small directory) in its own worktree on a local branch
exp/<topic>-<date>. For prompt or instruction files write each iteration as a new version file (<name>.vK.md) and record its name and hash in the run record (R13: a used instruction file is never edited). Kept changes land through a normalfeat/<topic>worktree and review; an abandoned experiment branch is archived underrefs/archive/(R21). - Budget and stop rule, written down. Maximum runs and wall time; external tokens (the user set no cap on 2026-11-06, so they are counted and reported, not limited: count every run with the last-usage rule, keep the running total in the round report and flag a run that is more than about twice its estimate). Stop at the first of: budget used up; 8 consecutive discards; two consecutive rounds whose best tune gain is below the noise floor (about 0.02 for a 0..1 ratio, an explicit equivalent otherwise; R10).
- Gates. Never the real robot; a result that would change a real-robot client's defaults needs a person's review before it is adopted (§0). GPU: hold the lock (
driver.py run --resource gpu --resource worktree:<abs path>),nvidia-smifirst, no sharing while a real-robot policy server is in use or the arm controller is active, otherwise total VRAM at most about 85% (R4). The arm gate isarm_guard.pyplusrobot_activity.py. CPU evaluators run undernice -n 19 taskset -c <cpus>; a job of several cores or minutes thatheavy_gate.pydoes not take (it takes pytest and bun jobs only) runs after the two probes and, with the controller active, only after asking. No installs;UV_CACHE_DIRandBUN_INSTALL_CACHE_DIRpoint intoLEVI/lab/cache, not~/.cache. - Shared-state writes take a lease (
driver.py run --resource ledger, permanual/driver-commands.md): the ledger, reports and progress.
Baseline
Run the unchanged baseline k times (k = 3 unless the evaluator is deterministic) and take the noise floor from the spread. For a LEVI annotation evaluation pair it with the no-LEVI direct call (R13).
Inner loop (tune data only)
One hypothesis per iteration:
- Write the hypothesis and the expected sign before editing.
- Edit the surface only; commit small (
exp: ...). - Run the evaluator with the output redirected to a log and read only its summary lines. A typo-level crash: fix and rerun once; otherwise log
crashand move on. - Append a row to
results.tsvunder<worktree>/.state/tmp/(git-ignored; format inreferences/round-record.md). - Keep when the primary metric improves by more than the noise floor and no guard got worse beyond its limit. Discard with
git revert --no-edit <the exp commit>: history stays, nothing is reset or rewritten, no force. - Simplicity: the same result with less code is a win; a tiny gain bought with ugly complexity is a discard.
When the knobs are few and discrete, replace hill climbing by one pre-registered sweep on tune (the grid written first), pick the best subject to the guards, then confirm.
Outer loop (about every 5 iterations, and at the end)
Synthesize: what moved the metric, what did not, what the discards share; revise or drop hypotheses. Reusable lessons become candidates for dataset memory or levi/knowledge (a person commits them, only after the confirm run; knowledge promote refuses text that contains times or ranges). Nothing learned from confirm data feeds back into tuning.
End of the study
Freeze the surface, open confirm once, and write the round report in Chinese under levi-hub/reports/ (question, baseline and noise floor, best kept change, confirm result with an interval, cost table, discards, what is unverified, reproduce commands). Update the ledger (hub.py issue add with its five required fields when none exists, else issue set; progress set; R14 for evaluation rounds), clean up (R8) and hand the result to the user: developed, reviewed and accepted are three states (§0).
Teacher and student
When the study compares an external agent (the teacher) with the local model plus harness, score against the human gold where it exists, otherwise against a calibrated panel of independent agent reviewers whose agreement with human gold was measured on the overlap. The teacher and the coordinator do not see confirm content: reference answers for confirm come from fresh, blind answerers and only aggregate scores reach the coordinator. The three-way table (teacher, local with harness, local direct) shows aggregates only on confirm.
Do not
- Run without a budget, or "forever".
- Ask the user for what §0 and §4 do not reserve to a person; decide it yourself and note why.
- Create background schedules or unattended agents unless the user asks for it in this session, then follow §4.
- Report a gain inside the noise floor, or one measured on tune data, as a result.
References: references/round-record.md (record format, report outline), references/evals.md (how this skill is checked).
04 同仓库更多 Skills
paper-to-spec
Turn a paper, preprint or technical blog into a checked method specification for LEVI: fetch the full text into an isolated directory, read the method sections verbatim, then write what the source says, what it leaves unspecified and how it maps onto the codebase. Use when the user gives a link and asks to reproduce, import or integrate a method, and also when a plan or report is about to rely on a paper's method or numbers. Not for a quick summary or a literature overview.
agent-brief
Write or review the prompt you hand to another model: a subagent task brief, an independent-review brief, or a prompt file for a local VLM in a LEVI harness. Use when delegating work, when writing or revising a prompt file, or when a delegated result came back wrong in a way the brief could have prevented. Not for replying to the user.
temporal-annotation
Evidence-grounded attempts, outcomes and temporal boundary review.
review-and-export
Human review and original-format export.
object-annotation
Choose SAM3 or annotate objects yourself, then stage both for the same review.
levi-overview
Inspect → plan → pilot → execute → validate → review → commit, at a bounded cost.