View source: R/LLM_parallel_utils.R
| llm_judge | R Documentation |
Evaluates outputs in a target column against a custom prompt using
llm_mutate_tags() for clean tag-based extraction. The target column value
is available in the prompt template as {.target}.
llm_judge(
.data,
.target,
.config,
prompt,
.tags = c("reasoning", "score"),
.output = "judge_res",
...
)
.data |
Data frame of experiment results. |
.target |
Bare column name containing the output to evaluate. |
.config |
The judge llm_config. |
prompt |
Evaluation prompt template. Use |
.tags |
Tags to extract from the judge response. Defaults to
|
.output |
Name of the column that receives the judge's raw response.
Default |
... |
Passed to |
.data with judge output columns appended.
llm_mutate_tags(), llm_parse_tags()
## Not run:
results |>
llm_judge(
.target = response_text,
.config = judge_cfg,
prompt = "Rate this answer on a 1-5 scale:\n{.target}",
.tags = c("reasoning", "score")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.