Prompt Template Rendering
Use this skill when a recovery or implementation needs to convert structured NLP examples into the text-to-text prompted format used by T0/P3-style multitask training. Do not use it to choose train/evaluation splits or to score model outputs; those are separate contracts.
Inputs
- JSON examples containing fields referenced by prompt templates.
- Template specifications with
dataset_id,template_id,input_format,target_field, and optionalanswer_choices.
Outputs
- Rendered records containing
dataset_id,task_family,example_id,template_id,source,target, andlabel.
Workflow
- Validate that every placeholder in
input_formatexists in the raw example. - Format the source string with Python-style named placeholders.
- Resolve the target from
target_field; ifanswer_choicesis supplied, map numeric or symbolic labels to target text. - Preserve metadata for downstream leakage checks and prompt robustness evaluation.
Validation
Run python tests/test_prompt_template_rendering.py or validate the whole tree with the Distiller skill validator.
Limitations
This skill implements deterministic rendering only; it does not provide the original PromptSource package or full dataset loading.