一键导入
bo-execution-workflow
BO execution layer — initializes a run from a resolved experiment spec, records observations, and continues through suggest/observe/report.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
BO execution layer — initializes a run from a resolved experiment spec, records observations, and continues through suggest/observe/report.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Orchestrate an end-to-end chemistry or materials optimization study from a plain-English research question to BO execution and a paper draft.
Initialize a BO run from a dataset or explicit search-space JSON.
Generate a final BO report and summarize optimization status.
Run an external evaluator loop for a BO run using a pre-provisioned backend id.
Design and stabilize an expensive or fragile chemistry evaluator before BO setup.
Produce a lightweight chemistry or materials literature summary for research-agent, focused on baselines, key variables, and known constraints.
基于 SOC 职业分类
| name | bo-execution-workflow |
| description | BO execution layer — initializes a run from a resolved experiment spec, records observations, and continues through suggest/observe/report. |
This skill is the BO execution layer. It assumes the problem has already been framed by the layer above (e.g. research-agent). Do not use this skill for problem discovery, dataset acquisition, or representation selection — those decisions belong upstream.
Expects (resolved before this skill is invoked):
min / max)design_parametersfixed_featuresWhen invoked by research-agent, the canonical init path is explicit search-space JSON derived from experiment_spec.
Produces (run artifacts under bo_runs/<RUN_ID>/):
| File | Created by |
|---|---|
state.json | init |
input_spec.json | init |
intent.json | init (when --intent-json is provided) |
suggestions.jsonl | suggest |
observations.jsonl | observe |
report.json | report |
When this skill is invoked by research-agent, it supports two handoff points:
initbo_run_id is knownbo_run_idinitVerify all required inputs are resolved before running anything. If any are missing, surface them to the layer above — do not attempt problem discovery here.
The resolved execution config should include a structured search space:
design_parametersfixed_featuresIf everything is resolved, proceed to Step 2.
If a dataset path is part of the execution config, inspect it before running anything:
uv run python -c "
import pandas as pd
df = pd.read_csv('<CSV_PATH>')
print('Shape:', df.shape)
print('Columns:', list(df.columns))
print('Missing values:'); print(df.isnull().sum()[df.isnull().sum() > 0])
print('Dtypes:'); print(df.dtypes)
if '<TARGET_COL>' in df.columns:
print('Target stats:'); print(df['<TARGET_COL>'].describe())
"
🔴 Blocking — must fix before init:
🟡 Action required — configure explicitly at init time:
--simplex-groups (see Step 3)rxn_smiles, IDs) → pass --drop-cols col1,col2 when dataset inference is intentionally used🟢 Auto-handled — informational only:
If no dataset is present, skip to Step 3.
If the execution config specifies compositional constraints (columns whose values must sum to a fixed total), declare them at init time using --simplex-groups:
# Metal proportions summing to 100 (e.g. OER dataset)
--simplex-groups 'Metal_1_Proportion,Metal_2_Proportion,Metal_3_Proportion:100'
# Elemental fractions summing to 1 (e.g. HEA dataset)
--simplex-groups 'x_Co,x_Cu,x_Mn,x_Fe,x_V:1'
# Multiple independent simplex groups
--simplex-groups 'A,B,C:1' --simplex-groups 'D,E:100'
Format: 'col1,col2,...:total' — comma-separated column names, colon, then the required sum.
Constraints are stored in state.json["constraints"] at init time and enforced automatically at every suggest call.
If no simplex constraints apply, skip to Step 4.
If the representation plan specifies encoding:
bo-encode-drfp skill before init; use bo-decode-drfp after BO to map suggestions back to reactionsbo-encode-molecule-descriptors skill before init; use bo-decode-molecule-descriptors after BOThe choice of representation belongs to the layer above. If the representation plan is not specified, surface this question upstream — do not auto-decide here.
Prefer explicit search-space init when the experiment spec is already resolved:
uv run python -m bo_workflow.cli init \
--search-space-json '<JSON_OR_PATH>' \
--target <TARGET_COL> \
--objective <min|max> \
[--simplex-groups 'col1,col2:total'] \
[--engine <hebo|bo_lcb|random|botorch>] \
[--intent-json '<JSON_OR_PATH>'] \
--seed 42
Use dataset-backed init only when a labeled CSV is intentionally the chosen BO input source:
uv run python -m bo_workflow.cli init \
--dataset <CSV_PATH> \
--target <TARGET_COL> \
--objective <min|max> \
[--simplex-groups 'col1,col2:total'] \
[--drop-cols col1,col2] \
[--engine <hebo|bo_lcb|random|botorch>] \
[--intent-json '<JSON_OR_PATH>'] \
--seed 42
When this skill is used under research-agent, serialize experiment_spec into the --search-space-json input rather than relying on a labeled dataset.
If experiment_spec.bo_engine is already set upstream, pass it through as --engine <ENGINE> during init rather than falling back to the default engine.
Extract run_id from the JSON output.
If prior observations are already part of the resolved execution config, record them immediately after init with bo-record-observation before the first suggest call.
If this skill is being used for a Phase 3 setup-only handoff from research-agent, stop after init plus any seed observations, return the existing bo_run_id, and do not start the iterative loop yet.
If this skill is being used for a Phase 4 continuation from research-agent, reuse the existing bo_run_id and continue directly with suggest / observe / report instead of re-initializing.
If a benchmark task bundle provides a prebuilt evaluator backend id in the public workspace, it is acceptable to automate this phase directly with:
uv run python -m bo_workflow.cli run-evaluator \
--run-id <RUN_ID> \
--backend-id <BACKEND_ID> \
--iterations <T> \
[--batch-size <N>]
This assumes the public workspace already contains
evaluation_backends/<BACKEND_ID>/.
If the user or operator explicitly provides a raw backend_id for an external
evaluator, it is also acceptable to automate this phase with bo-run-evaluator
instead of manually alternating suggest and observe.
Then repeat this loop until the user or external controller is satisfied:
uv run python -m bo_workflow.cli suggest --run-id <RUN_ID> --batch-size <N>
Present the suggestion clearly:
Record observations only when values are supplied by the user or another external observer:
uv run python -m bo_workflow.cli observe \
--run-id <RUN_ID> \
--data '{"x": {<FEATURE_VALUES>}, "y": <RESULT>}'
After sufficient iterations, generate the report:
uv run python -m bo_workflow.cli report --run-id <RUN_ID>
Do not invoke build-oracle or run-proxy from this skill. Use
bo-run-evaluator only when a prebuilt backend id is available for external
evaluation.
Always include in your final summary:
report.json["trajectory"] or from ad hoc figures generated from observations.jsonl)init — the engine will error.--search-space-json when an upstream agent has already resolved the search space.--intent-json when the upstream agent has captured the original user intent — this preserves provenance in bo_runs/<RUN_ID>/intent.json.