yb validate
Validate a suite configuration file without running the evaluation.
Synopsis
Section titled “Synopsis”yb validate -c <config-file> [options]Description
Section titled “Description”The validate command performs comprehensive validation of your suite configuration. It checks everything that would cause a run to fail, without actually executing the evaluation.
Validation Checks
Section titled “Validation Checks”- YAML/JSON syntax - Ensures valid file format
- Schema compliance - Validates against youBencha schema
- File references - Checks that prompt files exist
- Evaluator configurations - Validates evaluator settings
- Security constraints - Blocks localhost/internal repos
- Agent availability - Verifies agent type is supported
Options
Section titled “Options”| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--config | -c | string | Required | Path to suite configuration file |
--verbose | -v | flag | false | Show detailed validation information |
--strict | flag | false | Fail on warnings (not just errors) | |
--check-network | flag | false | Verify repository URL is accessible | |
--help | -h | flag | - | Show help message |
Examples
Section titled “Examples”Basic Validation
Section titled “Basic Validation”Quickly check if configuration is valid:
yb validate -c suite.yamlOutput on success:
✅ Configuration is validVerbose Mode
Section titled “Verbose Mode”Get detailed validation information:
yb validate -c suite.yaml -vValidating: suite.yaml
✅ YAML syntax: valid✅ Schema: valid✅ Repository URL: valid (https://github.com/...)✅ Agent type: copilot-cli (supported)✅ Evaluators: 2 configured - git-diff: valid - agentic-judge: valid✅ Prompt file: ./prompts/task.md (exists)
Configuration is valid and ready to run.Validating: suite.yaml
✅ YAML syntax: valid✅ Schema: valid✅ Repository URL: valid✅ Agent type: copilot-cli⚠️ Warning: No evaluators configured⚠️ Warning: prompt_file not found, using inline prompt
Configuration is valid with 2 warnings.Strict Mode
Section titled “Strict Mode”Fail on warnings as well as errors:
yb validate -c suite.yaml --strictNetwork Verification
Section titled “Network Verification”Also verify the repository URL is accessible:
yb validate -c suite.yaml --check-networkValidate Before Running
Section titled “Validate Before Running”Combine validation and run in a single command:
yb validate -c suite.yaml && yb run -c suite.yamlValidation Error Examples
Section titled “Validation Error Examples”$ yb validate -c suite.yaml
❌ Validation failed
Errors: - Line 5: Invalid YAML syntax - missing colon - Line 12: Unexpected indentationFix: Check YAML syntax, ensure proper indentation (2 spaces).
$ yb validate -c suite.yaml
❌ Validation failed
Errors: - Missing required field: 'repo' - Invalid agent type 'unknown'. Supported: copilot-cli - Field 'evaluators' must be an arrayFix: Add missing required fields, use valid values.
$ yb validate -c suite.yaml
❌ Validation failed
Errors: - Prompt file not found: ./prompts/task.md - Evaluator file not found: ./evaluators/custom.mdFix: Create missing files or update paths.
$ yb validate -c suite.yaml
❌ Validation failed
Security violations: - Repository URL contains localhost (blocked) - Internal IP detected in repo URL: 192.168.1.1Fix: Use public repository URLs only.
What Gets Validated
Section titled “What Gets Validated”Repository Settings
Section titled “Repository Settings”| Check | Description | Example |
|---|---|---|
| URL format | Valid HTTP/HTTPS URL | https://github.com/org/repo.git |
| No localhost | Blocks local URLs | ❌ http://localhost/repo |
| No internal IPs | Blocks private networks | ❌ http://192.168.1.1/repo |
| Branch format | Valid Git branch name | main, feature/test |
Agent Configuration
Section titled “Agent Configuration”| Check | Description | Example |
|---|---|---|
| Supported type | Known agent type | copilot-cli |
| Prompt present | Has prompt or prompt_file | Required |
| Model valid | Valid model name (if specified) | gpt-4, gpt-3.5-turbo |
Evaluators
Section titled “Evaluators”| Check | Description | Example |
|---|---|---|
| Valid names | Known evaluator names | git-diff, agentic-judge |
| Required config | Config present when needed | agentic-judge needs assertions |
| File references | Referenced files exist | evaluator_file: ./eval.md |
Security
Section titled “Security”| Check | Description |
|---|---|
| SSRF prevention | No localhost or internal network URLs |
| URL schemes | Only HTTP/HTTPS allowed |
| Path traversal | No ../ in file paths |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Configuration is valid |
1 | Validation errors found |
2 | Configuration file not found |
Best Practices
Section titled “Best Practices”- Always validate before running - Catch errors early
- Use verbose mode when debugging - Get detailed feedback
- Use strict mode in CI/CD - Treat warnings as errors
- Validate after editing - Confirm changes are valid
# Edit configurationvim suite.yaml
# Validate changesyb validate -c suite.yaml -v
# Run if validyb run -c suite.yamlRelated Commands
Section titled “Related Commands”- yb run - Execute evaluations
- Configuration Reference - Complete configuration options
- Troubleshooting - Common validation issues