Skip to content

yb validate

Validate a suite configuration file without running the evaluation.

Terminal window
yb validate -c <config-file> [options]

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.

  • 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
OptionShortTypeDefaultDescription
--config-cstringRequiredPath to suite configuration file
--verbose-vflagfalseShow detailed validation information
--strictflagfalseFail on warnings (not just errors)
--check-networkflagfalseVerify repository URL is accessible
--help-hflag-Show help message

Quickly check if configuration is valid:

Terminal
yb validate -c suite.yaml

Output on success:

✅ Configuration is valid

Get detailed validation information:

Terminal
yb validate -c suite.yaml -v
Output
Validating: 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.

Fail on warnings as well as errors:

Terminal
yb validate -c suite.yaml --strict

Also verify the repository URL is accessible:

Terminal
yb validate -c suite.yaml --check-network

Combine validation and run in a single command:

Terminal
yb validate -c suite.yaml && yb run -c suite.yaml
Terminal
$ yb validate -c suite.yaml
Validation failed
Errors:
- Line 5: Invalid YAML syntax - missing colon
- Line 12: Unexpected indentation

Fix: Check YAML syntax, ensure proper indentation (2 spaces).

CheckDescriptionExample
URL formatValid HTTP/HTTPS URLhttps://github.com/org/repo.git
No localhostBlocks local URLshttp://localhost/repo
No internal IPsBlocks private networkshttp://192.168.1.1/repo
Branch formatValid Git branch namemain, feature/test
CheckDescriptionExample
Supported typeKnown agent typecopilot-cli
Prompt presentHas prompt or prompt_fileRequired
Model validValid model name (if specified)gpt-4, gpt-3.5-turbo
CheckDescriptionExample
Valid namesKnown evaluator namesgit-diff, agentic-judge
Required configConfig present when neededagentic-judge needs assertions
File referencesReferenced files existevaluator_file: ./eval.md
CheckDescription
SSRF preventionNo localhost or internal network URLs
URL schemesOnly HTTP/HTTPS allowed
Path traversalNo ../ in file paths
CodeMeaning
0Configuration is valid
1Validation errors found
2Configuration file not found
  1. Always validate before running - Catch errors early
  2. Use verbose mode when debugging - Get detailed feedback
  3. Use strict mode in CI/CD - Treat warnings as errors
  4. Validate after editing - Confirm changes are valid
Recommended Workflow
# Edit configuration
vim suite.yaml
# Validate changes
yb validate -c suite.yaml -v
# Run if valid
yb run -c suite.yaml