yi-val
Operate YiVal prompt/model evaluation workflows, including YAML configs, CLI runs, data readers, prompt generators, evaluators, AHP selection, enhancers, and custom components.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- yi-val
- license
- Apache 2.0
- metadata
- { "repo": "YiVal/YiVal", "package": "yival", "disco-role": "operating", "version-baseline": "0.0.0 at 22a1fa0" }
- description
- Operate YiVal prompt/model evaluation workflows, including YAML configs, CLI runs, data readers, prompt generators, evaluators, AHP selection, enhancers, and custom components.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/registry-overview.md3.1 KB
- 参考文档references/repo-provenance.md3.4 KB
- 参考文档references/repo-routing-metadata.json517 B
- 参考文档references/troubleshooting.md4.9 KB
- 参考文档references/workflow-map.md4.8 KB
- 脚本scripts/check_install.py4.6 KB
- 脚本scripts/write_minimal_experiment.py4.3 KB
03 SKILL.md 正文
YiVal operating skill
Use this skill when the task involves YiVal or the Python package yival: building or validating experiment YAML, running prompt/model comparisons, evaluating LLM outputs, selecting the best variation, enhancing prompts, or extending YiVal with custom readers/wrappers/evaluators/generators.
YiVal's core flow is:
- produce input examples from a dataset, user input, or a data generator;
- create combinations from wrapper variations and variation generators;
- call a user
custom_function(..., state=ExperimentState); - evaluate outputs with individual, comparison, or all-results evaluators;
- optionally select a best combination, enhance prompts, display results, or open the bot/UI.
First checks
- Install or activate a Python environment with
yivalimportable. The package supports Python>=3.10,<3.13. - If using a checkout, install with
python -m pip install -e .; for trainer workflows addpython -m pip install -e '.[trainers]'only when local fine-tuning is explicitly needed. - If root CLI import fails with
ModuleNotFoundError: pkg_resources, install a compatible setuptools that still exposes the import:python -m pip install 'setuptools<81'. - Run the bundled smoke check from this skill root:
python scripts/check_install.py --check-cli. - For a no-network mini experiment fixture, run:
python scripts/write_minimal_experiment.py --run.
Route map
| User intent | Read |
|---|---|
| Install YiVal, inspect CLI commands, initialize or validate YAML, choose dataset source fields | setup |
Run yival run, yival demo, Dash/interactive/bot workflows, ExperimentRunner, LiteExperimentRunner, outputs |
run |
| Generate synthetic examples or prompt variations with OpenAI/document/chain-of-density/self-exemplar generators | prompt-automation |
| Configure evaluators, AHP selection, human ratings, OpenAI/Alpaca/BERTScore/ROUGE/Python validation, prompt enhancers | evaluation-optimization |
| Implement custom readers, wrappers, evaluators, data generators, variation generators, enhancers, selection strategies, or output parsers | custom-components |
Shared repo references:
- Workflow map: YiVal architecture, execution stages, and cross-sub-skill responsibilities.
- Registry overview: built-in component ids, registration behavior, and config keys.
- Troubleshooting: install, CLI, config, provider, UI, and safety failures.
- Repo provenance: source baseline and coverage limits.
Common fast paths
Create and validate a config
- Read setup.
- Generate a template with either
yival init ...orpython sub-skills/setup/scripts/build_config_template.py .... - Fill in
dataset,custom_function,variations, andevaluators. - Validate with
yival validate config.ymlorpython - <<'PY'usingload_and_validate_config.
Run a dataset-backed prompt comparison
- Read run for the execution model.
- Use
dataset.source_type: dataset,reader: csv_reader, and a CSV with columns matching the custom function arguments. - Wrap tunable prompt strings in
StringWrapper(name=<variation name>, state=state). - Run
yival run config.yml --output_path results.pkland inspect the generated<stem>_0.pklor UI.
Build automated prompt-generation and evaluation
- Read prompt-automation for
openai_prompt_data_generator,document_data_generator, and prompt variation generators. - Read evaluation-optimization for evaluators, AHP criteria names, and enhancers.
- Keep provider-token requirements explicit; built-in OpenAI/Replicate/Alpaca workflows can bill or call network services.
Extend YiVal with a custom component
- Read custom-components.
- Implement the correct base class and config dataclass.
- Add the corresponding
custom_*block to YAML. - Run the root smoke script and a tiny local experiment before running provider-backed experiments.
Scope and safety boundaries
- This skill covers core YiVal experiment setup, runtime, generation, evaluation, selection, enhancement, and custom-component workflows.
- Fine-tuning modules are present in YiVal but are optional and heavier. Treat local SFT, OpenAI fine-tuning jobs, and Replicate fine-tuning as out-of-scope unless the user explicitly requests training and approves required extras, credentials, cost, model downloads, and GPU/runtime needs.
python_validation_evaluatorexecutes model-produced Python withexec. Use only with sandboxed, trusted, tiny code snippets; never run untrusted code in a production or credentialed environment.- OpenAI, Replicate, AlpacaEval, Hugging Face dataset URLs, Google Drive document loading, Streamlit/Dash/ngrok, and some demos require network access, credentials, or public services. Prefer the offline smoke fixture before provider-backed runs.
Expected artifacts and outputs
- CLI runs can display Dash results, write pickled experiment objects as
<output_stem>_<config_index>.pkl, or open interactive/bot modes. - Programmatic runs use
ExperimentRunner(config_path).run(...)for YAML-driven workflows orLiteExperimentRunner(...).run_experiment(enable_selector=True/False)when the caller already holds data, evaluator, token logger, and config objects. - Data rows become
InputData(content={...}, expected_result=...); custom functions should returnMultimodalOutput(text_output=..., image_output=..., video_output=...).
Refresh triggers
Refresh this skill when YiVal changes CLI subcommands, config schema names, registry ids, evaluator/enhancer contracts, OpenAI SDK support, optional trainer dependencies, or result object serialization.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).