prompt-automation
Configure YiVal data generators and prompt variation generators for synthetic examples, document questions, chain-of-density prompts, and self-exemplar prompts.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- prompt-automation
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Configure YiVal data generators and prompt variation generators for synthetic examples, document questions, chain-of-density prompts, and self-exemplar prompts.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/generators-reference.md3.5 KB
- 参考文档references/prompt-workflows.md2.6 KB
- 参考文档references/provider-cache-notes.md1.7 KB
- 参考文档references/troubleshooting.md1.8 KB
- 脚本scripts/inspect_prompt_components.py1.8 KB
03 SKILL.md 正文
YiVal prompt automation
Use this sub-skill when the task involves generating input examples, generating prompt variations, caching generated prompts/data, using yival gen/yival task, or wiring OpenAI/document/chain-of-density/self-exemplar generators into a YiVal config.
Read first
- Generators reference: built-in data and variation generators, config fields, and registry ids.
- Prompt workflows: common auto-prompt experiment patterns.
- Provider and cache notes: credentials, output paths, rate limits, and offline alternatives.
- Prompt automation troubleshooting: generation-specific failures.
Useful helper:
python sub-skills/prompt-automation/scripts/inspect_prompt_components.pyprints built-in generator ids and default configs after importing their modules.
Built-in generator map
| Need | YAML location | Registry id |
|---|---|---|
| Generate synthetic input examples from a function/task description | dataset.data_generators |
openai_prompt_data_generator |
| Generate questions from text/file/Google Drive document content | dataset.data_generators |
document_data_generator |
| Generate optimized prompt strings with OpenAI | variations[].generator_name |
openai_prompt_based_variation_generator |
| Use the fixed chain-of-density summarization prompt | variations[].generator_name |
chain_of_density_prompt_generator |
| Use a self-exemplar prompt template | variations[].generator_name |
self_exemplar |
Minimal auto-prompt shape
description: Auto prompt experiment
custom_function: my_task.headline
dataset:
source_type: machine_generated
data_generators:
openai_prompt_data_generator:
number_of_examples: 2
chunk_size: 1000
model_name: gpt-4
output_path: generated_examples.pkl
input_function:
name: headline_generation
description: Generate a landing page headline for a tech startup business.
parameters:
tech_startup_business: str
variations:
- name: task
generator_name: openai_prompt_based_variation_generator
generator_config:
number_of_variations: 2
model_name: gpt-4
output_path: generated_prompts.pkl
variables:
- tech_startup_business
prompt:
- role: system
content: Write concise prompts for GPT-4.
variations:
- value_type: str
value: Generate landing page headline for {tech_startup_business}
instantiated_value: Generate landing page headline for {tech_startup_business}
variation_id: null
The custom function should use StringWrapper(name="task", variables={"tech_startup_business": tech_startup_business}, state=state) so generated/manual prompt values are applied.
Workflow guidance
- Start with a tiny run: one or two generated examples and one or two variations.
- Always set
output_pathfor provider-backed generators so reruns load cached pickles instead of paying/calling again. - Keep
variablesexplicit for prompt variation generation; generated prompt outputs must contain{variable}placeholders when configured. - For document generation, start with
source: textbefore file or Google Drive sources. - Route generated outputs into evaluation-optimization for evaluator, selector, and enhancer design.
Safety and cost boundaries
- OpenAI generators call network services and can bill. Confirm credentials and budget before running.
- Document file/drive sources can invoke loaders, OCR, Google APIs, and local file reads. Use only approved documents.
- Retrieval demos that use embeddings/FAISS/OpenAI are reference patterns, not default runtime paths.
- If the user only needs a static prompt list, use manual
variationsinstead of provider-backed generation.
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).