
Run a focus group quickly with sensible defaults and cost controls
Source:R/convenience_wrappers.R
fg_quick.RdQuick focus group runner with safe defaults and cost controls
Arguments
- topic
Character. Focus group topic.
- participants
Integer. Number of participants (excluding moderator). Default 6.
- flow
Character. Turn-taking flow: one of "desire_based", "round_robin", "probabilistic".
- model_config
Optional `LLMR::llm_config`. If `NULL`, uses OpenAI gpt-4o-mini with small caps.
- seed
Optional integer. Seeds R's RNG (speaker selection and other in-package sampling); it does NOT make the LLM output reproducible, since at `temperature > 0` the provider samples server-side.
- mode
Character. Currently informational ("quick" or "pro"). Default "quick".
- msg_mode
How each agent's turn is presented to the model. `"roleflip"` (default) puts the agent's own prior turns in the assistant role and others' in labeled user messages (reduces self-repetition); `"flat"` is the legacy single-user-message transcript.
- verbose
Logical. Print progress.
- max_participant_responses
Optional integer. Maximum participant responses per moderator question before the moderator advances.
Value
A list with elements: `transcript` (data frame), `summary` (character), `participants` (list), `totals` (list), `config_meta` (list), and `focus_group` (the `FocusGroup` object).
Examples
if (FALSE) { # \dontrun{
Sys.setenv(OPENAI_API_KEY = "...")
res <- fg_quick("Library funding priorities", participants = 4)
head(res$transcript)
cat(res$summary)
} # }