A point-and-click front end with three tabs. Run a focus group starts a fresh
moderated session live from a topic and a handful of participants, shows the
transcript, and offers a complete .rds session and transcript CSV.
Analyze accepts a finished run, saved session, CSV, or bundled example and
runs the package's descriptive analyses offline; thematic analysis and a
model summary are optional live actions. The continuation experiment takes a
saved focus group up to a message and compares repeated next-message
responses under one control history and several labeled treatment histories.
Running and the continuation experiment generate text and need an API key;
analysis works offline.
Details
The GUI is optional. It needs the suggested packages shiny, bslib, DT, and LLMR.shiny; install them first. Keys are read from environment variables only, never pasted into the app.
The Studio needs LLMR.shiny 0.1.3 or later and stops with an error when an older version is installed.
The usage tile in the sidebar counts the model calls each action made and the tokens they reported, including the calls an action made before it failed. When some calls reported no usage, the token counts are shown as lower bounds. If usage cannot be recorded, a notification says so, and the action's results remain available.
A run that fails partway keeps the turns it completed: the partial transcript can be analyzed and downloaded, and a notice names the phase in which the run stopped. A downloaded session keeps its completion status and the rows its participants were drawn from, but no model configuration or runner function, since a configuration can hold a literal API key.
A continuation from a session saved by FocusGroup 0.5.2 or earlier rebuilds
the saved FGAgent agents with the current class and their saved persona,
style, and records, so that their prompts are unchanged and their usage is
recorded as described in run_focus_group(); agents of other classes are
used as saved.
Examples
if (interactive() &&
all(vapply(c("shiny", "bslib", "DT", "LLMR.shiny"),
requireNamespace, logical(1), quietly = TRUE))) {
run_focus_studio()
}
