aigra_generate_items: Generate and review assessment items

View source: R/aigra-user-api.R View source: R/aigra-api.R

aigra_generate_itemsR Documentation

Generate and review assessment items

Description

Runs the AIGRA Python backend pipeline to generate, solve, review, and export assessment items.

This user-facing wrapper accepts an AIGRA tabular item bank that has already been loaded into R as a data frame. To use CSV or XLSX files, first call aigra_read_template() and pass the resulting data frame to this function.

Usage

aigra_generate_items(
  data,
  model = "gemini-3.1-pro-preview",
  provider = "auto",
  gemini.API = NULL,
  openai.API = NULL,
  groq.API = NULL,
  anthropic.API = NULL,
  backend_path = NULL,
  ...
)

aigra_generate_items(
  data,
  model = "gemini-3.1-pro-preview",
  provider = "auto",
  gemini.API = NULL,
  openai.API = NULL,
  groq.API = NULL,
  anthropic.API = NULL,
  backend_path = NULL,
  ...
)

Arguments

data

A data frame with the standard AIGRA tabular columns.

model

Model name to use.

provider

LLM provider. Use "auto", "gemini", "openai", "groq", or "anthropic", depending on the backend configuration.

gemini.API

Optional Gemini API key.

openai.API

Optional OpenAI API key.

groq.API

Optional Groq API key.

anthropic.API

Optional Anthropic API key.

backend_path

Optional path to the AIGRA Python backend.

...

Additional arguments passed to aigra_generate_tabular_items().

Value

A data frame if read_csv is TRUE; otherwise invisibly returns latest CSV path.

A data frame or list returned by the AIGRA tabular generation backend.

Examples

## Not run: 
template <- aigra_read_template("template.xlsx")

result <- aigra_generate_items(
  data = template,
  provider = "gemini",
  model = "gemini-2.5-flash",
  source_language = "English",
  target_language = "English",
  n_clones = 1,
  max_items = 1
)

## End(Not run)

AIGRA documentation built on July 10, 2026, 5:06 p.m.