% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tags_mode.R
\name{llm_parse_tags_col}
\alias{llm_parse_tags_col}
\title{Parse XML-like tag fields from a column}
\usage{
llm_parse_tags_col(
  .data,
  tags,
  tags_col = "response_text",
  fields = NULL,
  prefix = ""
)
}
\arguments{
\item{.data}{data.frame/tibble.}

\item{tags}{Character vector of tag names to parse.}

\item{tags_col}{Column name to parse from. Default \code{"response_text"}.}

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

\item{prefix}{Optional prefix for extracted columns.}
}
\value{
\code{.data} with tag diagnostics and extracted columns.
}
\description{
Appends \code{tags_ok}, \code{tags_data}, and one column per requested tag or field.
}
\examples{
df <- data.frame(response_text = "<age>21</age><job>student</job>")
llm_parse_tags_col(df, tags = c("age", "job"))
llm_parse_tags_col(df, tags = c("age", "job"), fields = c(person_age = "age"))

}
\seealso{
\code{\link[=llm_parse_tags]{llm_parse_tags()}}, \code{\link[=llm_mutate_tags]{llm_mutate_tags()}}, \code{\link[=llm_parse_structured_col]{llm_parse_structured_col()}}
}
