Spaces:
Running
Phase 0 Command Contract
This document captures baseline command contracts without changing runtime behavior.
Contract Scope
Commands covered:
- run-lang-task
- run-lang-benchmark
- eval-v2
- view-task-v2
- eval-comprehensive
- tag-failures
- view-exec-report
run-lang-task
- Command:
dabench run-lang-task <task_ids...> --config <path> [--display-mode technical|executive] - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
task_idsrequired positional list.--configrequired file path.--display-modedefaulttechnical.
- Backend call path:
run_lang_task_command->create_run_output_dir.- Loop task IDs in provided order.
- Per task call
run_langgraph_single_task. - Optional executive rendering via
generate_executive_reportwhen display mode isexecutiveandtrace.jsonexists.
- Artifacts produced:
- Shared run directory under configured output dir.
- Per task:
trace.json,prediction.csv(or fallback minimal CSV), task status fields in trace.
- Error and exit semantics:
- Invalid/duplicate run id from output dir creation surfaces as Typer bad parameter.
- Per-task failures are represented in artifacts; command still summarizes all selected tasks.
- Compatibility constraints:
- Tasks share a single run directory.
- Task order is preserved.
- Must continue to support both technical and executive modes.
run-lang-benchmark
- Command:
dabench run-lang-benchmark --config <path> [--limit N] - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
--configrequired file path.--limitoptional positive int.
- Backend call path:
run_lang_benchmark_command-> dataset task count for progress setup.- Delegates to
run_langgraph_benchmark(config, limit, progress_callback).
- Artifacts produced:
- Run directory with per-task task folders.
- Run-level
summary.jsonfrom langgraph runner.
- Error and exit semantics:
- Invalid run id/max workers bubbles as command error.
- Task failures do not abort benchmark loop by default.
- Compatibility constraints:
- Uses existing benchmark runner implementation.
- Keeps progress and summary behavior.
eval-v2
- Command:
dabench eval-v2 <run_id_or_path> [--gold-root path] [--task-root path] [--lambda-penalty float] [--mode standard|verbose|research] - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
run_idrequired.--gold-rootdefault/data3/dataFAIR/kdd-dev/public/output.--task-rootoptional, auto-detected from input_full/input_med/input_hard when omitted.--lambda-penaltydefault0.1.--modedefaultstandard.
- Backend call path:
- Resolve run path.
evaluate_run_v2.write_evaluation_v2andwrite_auditor_validation_report.- Hardening:
validate_evaluation_run,generate_health_report,generate_replay_artifacts. - Consistency checks:
validate_evaluation_consistency,write_validation_report. - Render report via
render_evaluation_report.
- Artifacts produced at run root:
task_metrics.csvtrajectory.csvtool_calls.csvcomprehensive_evaluation.csvauditor_validation_report.mdvalidation_report.mdartifact_reconciliation_report.txtengineering_health_report.txt- Per-task
task_replay.json
- Error and exit semantics:
- Missing run path exits non-zero.
- Validator warnings do not fail command.
- Validator errors fail command with non-zero exit.
- Compatibility constraints:
- Keep run-root outputs for compatibility.
- Keep hardening pipeline invocation order and report generation.
view-task-v2
- Command:
dabench view-task-v2 <task_id> <run_id_or_path> - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
task_idrequired.run_idrequired.
- Backend call path:
- Resolve run path and task directory.
- Read
task_metrics.csv(required). - Read optional
trajectory.csvandtool_calls.csv. - Render via
render_verbose_task_detail.
- Artifacts read:
- Run-root metrics CSVs.
- Task directory existence check.
- Error and exit semantics:
- Missing task directory exits non-zero.
- Missing
task_metrics.csvexits non-zero with guidance to run eval-v2. - Missing row for task exits non-zero.
- Compatibility constraints:
- Run-root layout remains required.
- Optional trajectory/tool calls remain best-effort.
eval-comprehensive
- Command:
dabench eval-comprehensive <run_id_or_path> [--gold-root path] [--lambda-penalty float] [--output-csv path] - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
run_idrequired.--gold-rootdefault/data3/dataFAIR/kdd-dev/public/output.--lambda-penaltydefault0.1.--output-csvoptional; defaults to<run>/comprehensive_evaluation.csv.
- Backend call path:
- Resolve run path.
- Call
evaluate_run_comprehensive. - Write CSV (drop
action_countsif present).
- Artifacts produced:
comprehensive_evaluation.csvor custom output path.
- Error and exit semantics:
- Missing run path exits non-zero.
- Empty evaluated task set exits non-zero.
- Compatibility constraints:
- Preserve current CSV columns and summary rendering behavior.
tag-failures
- Command:
dabench tag-failures <run_id_or_path> [--gold-root path] [--eval-csv path] - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
run_idrequired.--gold-rootdefault/data3/dataFAIR/kdd-dev/public/output.--eval-csvoptional; defaults to<run>/evaluation.csvif present.
- Backend call path:
- Resolve run path.
- Call
tag_run. - Print bucket and phase summaries.
- Write
failure_tags.csv.
- Artifacts produced:
failure_tags.csvat run root.
- Error and exit semantics:
- Missing run path exits non-zero.
- No tasks found exits non-zero.
- Compatibility constraints:
- Preserve existing bucket taxonomy output contract.
view-exec-report
- Command:
dabench view-exec-report <task_id> <run_id_or_path> - Definition:
src/data_agent_baseline/cli.py - Arguments and defaults:
task_idrequired.run_idrequired.
- Backend call path:
- Resolve run path.
- Resolve task directory.
- Require
trace.json. - Call
generate_executive_report(trace_path, task_dir, console).
- Artifacts read:
- Per-task
trace.json.
- Error and exit semantics:
- Missing run, task, or trace exits non-zero.
- Compatibility constraints:
- Preserve report generation from existing trace artifact.
Eval-v2 Artifact Schema — Current Production Names
This section documents the current actual column names as exported by eval-v2 at Phase 0 baseline. The schema is frozen for Phase 0. Schema renaming or migration is deferred and is not part of Phase 0.
Source constants
Canonical column lists are defined in src/data_agent_baseline/langgraph_agent/eval_v2.py as:
TASK_METRICS_COLUMNSTRAJECTORY_COLUMNSTOOL_CALLS_COLUMNS
task_metrics.csv / comprehensive_evaluation.csv
comprehensive_evaluation.csv is written by write_evaluation_v2 as an alias for task_metrics.csv (same data, same columns). Key columns at Phase 0:
- Identity:
run_id,task_id,trace_id,difficulty,timestamp,task_type - Outcome:
execution_success,final_score,failure_reason,failure_category,outcome_status - Answer accuracy:
answer_precision,answer_recall,answer_f1,column_precision,column_recall,column_f1,row_precision,row_recall,row_f1,recall - Verification:
verification_triggered,verification_score,aat_verification_triggered,aat_verification_score - Agent behaviour:
replan_count,retry_count,total_replans,autonomy_score,tool_efficiency,data_understanding_score - Cost:
total_tokens,llm_calls,execution_time - Full column list: see
TASK_METRICS_COLUMNSineval_v2.py(238 columns at Phase 0 baseline).
The names execution_success and final_score are the current production names. No renaming is performed in Phase 0.
trajectory.csv
Columns from TRAJECTORY_COLUMNS (29 columns at Phase 0 baseline):
run_id, task_id, trace_id, step_id, parent_step_id, stage, legacy_stage, phase, agent, trajectory_agent, agent_type, tool, action, coordinator_checkpoint, confidence, decision, review_type, verification_status, specialist_selected, success, duration_seconds, tokens, retries, timestamp, elapsed_seconds, thought, action_input, observation, raw_response, metadata_json
tool_calls.csv
Columns from TOOL_CALLS_COLUMNS (17 columns at Phase 0 baseline):
run_id, task_id, trace_id, step_id, call_id, tool_name, tool_category, success, latency_seconds, tokens, retry_count, input_size, output_size, error_type, error_message, timestamp, metadata_json
Deferred work
- Column renaming (e.g.,
execution_success→task_success,final_score→score) is explicitly deferred. - No schema migration, column aliasing, or DataFrame reshaping is performed in Phase 0.
- Tests reference only the current names.