From misc/generate_test_cases.ipynb in the cookbook. A meta-prompt that takes a prompt template with {{variables}} and generates synthetic test cases in a structured XML format - the core of any prompt-eval pipeline.
<Prompt Template>
`{{PROMPT_TEMPLATE}}`
</Prompt Template>
The above is a prompt template that I will later use with values substituted in for each of the variable names inside double curly braces (e.g. `{{variable_name}}`).
The variable names found in the prompt template are:
<variables>
`{{VARIABLE_NAMES}}`
</variables>
Your task is to generate a synthetic example of values for each of these variables. The values should be realistic and varied, as if drawn from real-world usage of the prompt template.
Please provide your synthetic example in the following XML format:
<example>
<variables>
`{{VARIABLES_BLOCK}}`
</variables>
</example>
Make sure your example is fully self-contained and that the values you provide make sense together as a realistic input to the prompt template. Do not include any additional commentary outside the XML tags.
Source: https://github.com/anthropics/anthropic-cookbook/blob/main/misc/generate_test_cases.ipynb