| dragon_map_pairs | R Documentation |
For dragon_prefer(). Each row holds one prompt and two candidate replies:
the one you prefer and the one you want the model to move away from. As in
dragon_map(), each argument is a column name or a glue::glue() template
combining several columns.
dragon_map_pairs(dataset, prompt, chosen, rejected, system = NULL)
dataset |
A |
prompt |
Column name or template for the user turn. |
chosen |
Column name or template for the preferred reply. |
rejected |
Column name or template for the reply to move away from. |
system |
Optional column name or template for the system prompt. A template with no braces and no matching column is used as a constant system prompt for every row. |
The dataset with the mapping attached.
df <- data.frame(
q = c("What is 2 + 2?", "Capital of France?"),
good = c("4", "Paris"),
bad = c("5", "Lyon")
)
ds <- dragon_map_pairs(dragon_dataset(df), prompt = "q", chosen = "good", rejected = "bad")
dragon_preview(ds, n = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.