% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/agent-review.R
\name{tr_agent_review}
\alias{tr_agent_review}
\title{Review a clinical modelling pipeline for common pitfalls}
\usage{
tr_agent_review(data, model, use_agent = TRUE)
}
\arguments{
\item{data}{The data frame used to fit the model.}

\item{model}{A fitted \code{triageR_model} object from \code{tr_fit()}.}

\item{use_agent}{Logical. If \code{TRUE} (default), also generates an
AI-written plain-language summary of the findings via \code{ellmer}.}
}
\value{
A \code{triageR_review} object (list) containing a tibble of flags
and, if \code{use_agent = TRUE}, an AI-generated summary.
}
\description{
Runs a series of rule-based checks for common clinical-ML pitfalls
(class imbalance, low events-per-variable, possible leakage, near-zero
variance predictors), then optionally asks an LLM to summarize the
findings in plain language.
}
\examples{
\dontrun{
tr_agent_review(data, model)
}
}
