Skip to contents

Injects tag instructions into each experiment row, runs call_llm_par(), then parses XML-like tags from each response via llm_parse_tags_col().

Usage

call_llm_par_tags(experiments, .tags, .fields = NULL, ...)

Arguments

experiments

Tibble with config and messages list-columns.

.tags

Character vector of tag names to request and parse.

.fields

NULL to extract all tags, a character vector of tags, a named vector such as c(person_age = "age"), or FALSE to skip field extraction.

...

Passed to call_llm_par().

Value

A tibble of class llmr_experiment: the call_llm_par() result with XML-like tags parsed by llm_parse_tags_col() (adds tags_ok, tags_data, and one column per requested tag or field).

Details

Character messages may refer to metadata columns of experiments (any column other than config and messages) as {column}. Each such placeholder is replaced by that row's value, inserted as text. Nothing inside braces is evaluated, and braces that do not name a column, such as example JSON or LaTeX, are sent as written. Doubled braces such as {{column}} are also sent as written, so template text from Jinja, Mustache, or Handlebars reaches the model unchanged. A placeholder that looks like a name but matches no column is sent as written, with a warning.