% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/semantic_analysis.R
\name{generate_cluster_labels}
\alias{generate_cluster_labels}
\title{Generate Cluster Label Suggestions (Human-in-the-Loop)}
\usage{
generate_cluster_labels(
  cluster_keywords,
  provider = "auto",
  model = NULL,
  temperature = 0.3,
  max_tokens = 50,
  api_key = NULL,
  verbose = TRUE
)
}
\arguments{
\item{cluster_keywords}{List of keywords for each cluster.}

\item{provider}{AI provider to use: "auto" (default), "openai", or "gemini".
"auto" picks the first provider with an available API key.}

\item{model}{Model name. If NULL, uses provider defaults: "gpt-4.1-mini" (OpenAI),
"gemini-2.5-flash-lite" (Gemini).}

\item{temperature}{Temperature parameter (default: 0.3).}

\item{max_tokens}{Maximum tokens for response (default: 50).}

\item{api_key}{API key for OpenAI or Gemini. If NULL, uses environment variable.}

\item{verbose}{Logical, if TRUE, prints progress messages.}
}
\value{
A list of generated labels.
}
\description{
Suggests descriptive labels for clusters using AI. Labels are suggestions
for human review - users should edit and approve before using.
Supports OpenAI or Gemini for AI generation.
}
\examples{
if (interactive()) {
  cluster_keywords <- list(
    "1" = c("calculator", "arithmetic", "elementary", "remedial"),
    "2" = c("computer", "instruction", "multiplication", "drill")
  )
  labels_openai <- generate_cluster_labels(cluster_keywords, provider = "openai")
  labels_gemini <- generate_cluster_labels(cluster_keywords, provider = "gemini")
}
}
\concept{semantic}
