yb init
Create a starter configuration file with helpful comments and sensible defaults.
Synopsis
Section titled “Synopsis”yb init [options]Description
Section titled “Description”The init command creates a suite.yaml file in your current directory with a fully-commented template. This is the recommended way to start a new youBencha evaluation project.
The generated template includes:
- Repository configuration with placeholders
- Agent setup with example prompts
- Common evaluator configurations
- Helpful comments explaining each field
Options
Section titled “Options”| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--force | -f | flag | false | Overwrite existing suite.yaml if present |
--template | -t | string | default | Template to use (default, minimal, advanced) |
--output | -o | string | suite.yaml | Output file path |
--help | -h | flag | - | Show help message |
Examples
Section titled “Examples”Basic Initialization
Section titled “Basic Initialization”Create a new suite configuration in the current directory:
yb initForce Overwrite
Section titled “Force Overwrite”Replace an existing configuration file:
yb init --forceMinimal Template
Section titled “Minimal Template”Create a minimal configuration without comments:
yb init --template minimalCustom Output Path
Section titled “Custom Output Path”Create configuration in a specific location:
yb init --output configs/my-evaluation.yamlCombined Options
Section titled “Combined Options”Create a minimal config, overwriting if exists:
yb init -f -t minimal -o test-suite.yamlGenerated File Structure
Section titled “Generated File Structure”# youBencha Evaluation Suite Configuration# See https://youbencha.dev/docs/configuration for full documentation
# Repository to evaluaterepo: https://github.com/youbencha/hello-world.gitbranch: main
# AI Agent Configurationagent: type: copilot-cli config: prompt: "Add a comment explaining what this repo is about"
# Evaluation Criteriaevaluators: - name: git-diff # No additional config needed for basic diff analysis
- name: agentic-judge config: type: copilot-cli assertions: task_completed: "The task was completed successfully. Score 1 if yes, 0 if no."repo: https://github.com/owner/repo.gitbranch: mainagent: type: copilot-cli config: prompt: "Your prompt here"evaluators: - name: git-diff# Advanced youBencha Configuration
repo: https://github.com/owner/repo.gitbranch: mainexpected_source: branchexpected: feature/reference-implementation
agent: type: copilot-cli config: prompt_file: ./prompts/task.md model: gpt-4
hooks: pre_execution: - ./scripts/setup.sh post_evaluation: - ./scripts/cleanup.sh
evaluators: - name: git-diff config: assertions: max_files_changed: 10 max_lines_added: 500
- name: expected-diff config: threshold: 0.85
- name: agentic-judge config: type: copilot-cli evaluator_file: ./evaluators/quality-check.mdExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Configuration file created successfully |
1 | File already exists (use --force to overwrite) |
2 | Write permission denied |
Workflow
Section titled “Workflow”- Run
yb initto create the configuration file - Edit
suite.yamlto configure your evaluation - Run
yb validate -c suite.yamlto check your configuration - Run
yb run -c suite.yamlto execute the evaluation
Related Commands
Section titled “Related Commands”- yb run - Execute an evaluation suite
- yb validate - Validate configuration
- Configuration Reference - Complete configuration options