Skip to contents

Helpers that declare a perturbation axis for agent_robustness(). Each returns a small spec the battery expands into design cells and applies to the inputs through the perturb argument of your run_fn. Bare vectors work too (vary = list(model = c("a","b"))).

Usage

vary_models(...)

vary_temperature(...)

vary_prompt(..., prompt = NULL, paraphrase = NULL, .config = NULL)

vary_persona(...)

vary_option_order(..., seed = 110)

Arguments

...

For vary_models/vary_temperature, the levels (model names or temperatures). For vary_prompt, either named template strings or paraphrase = n with .config = to generate n paraphrases. For vary_persona, persona variants (strings or a persona_set). For vary_option_order, the orders ("as_is", "reverse", "random").

prompt

For vary_prompt(paraphrase=): the actual prompt text to paraphrase. The paraphrase set is generated once at build time and is the axis's levels (including the original as the baseline), so run_fn's perturb$prompt(x) returns the cell's paraphrase, not a placeholder.

paraphrase

For vary_prompt: number of paraphrases to generate.

.config

For vary_prompt(paraphrase=): a generative config used once to draft the paraphrases (hashed into the manifest).

seed

For vary_option_order: RNG seed for the random permutation.

Value

An agent_axis object.