Retrieves a list containing the default prompt templates used by the FocusGroup package.
These templates guide the behavior of LLM agents (participants and moderator) during
different phases and actions within the simulation.
Value
A named list where each element is a character string representing a prompt template.
Placeholders like \{\{topic\}\}, \{\{persona_description\}\}, etc., are used within
the templates and will be filled dynamically during the simulation.
Details
Users can retrieve this list, modify specific templates, and then pass the modified list
to FocusGroup$new() or higher-level wrapper functions to customize the simulation's prompts.
Participant templates and message construction
Two participant templates ship here, and which one is used depends on the
message construction (see the message_mode argument of
run_focus_group(), or options(focusgroup.message_mode=)).
participant_turn_instructionis the canonical template for the default role-flipped construction. It carries only the current question and the turn cue, because the persona, standing rules, and the transcript are supplied structurally (a system message plus role-separated turns).participant_utterance_subtle_personais the flat template. It inlines the persona and the whole transcript into one user message, which for a participant in a session opens with the sentence that tells it its handle ("In this discussion you are P3."). A custom template that contains\{\{conversation_history\}\}or\{\{persona_description\}\}is treated as a flat template and routed through the flat path.
Probe templates
participant_probe_instruction closes the messages of a private probe
(fg_probe()); \{\{probe_question\}\} is replaced by the question.
participant_probe_reask follows an answer to a probe with a scale
from which no number could be read, in the same private exchange; its
placeholders are \{\{lo\}\} and \{\{hi\}\}, the ends of the
scale, and \{\{probe_question\}\}.
Summary templates
summary_participant, summary_item, summary_disagreements,
summary_trajectory, summary_turn, and summary_session are the prompts
of summarize_focus_group(), one per unit, and summary_reask is the
message that returns a failing reply with its failures. Their placeholders
are \{\{topic\}\}, \{\{unit\}\}, \{\{roster\}\} (speakers and
message counts, computed in code), \{\{transcript\}\},
\{\{probes\}\} (empty unless probe answers are included),
\{\{stages\}\} (trajectory only), \{\{format\}\} (the JSON shape the
reply must take), and, in summary_reask, \{\{failures\}\}. They are
read by summarize_focus_group() alone; changing them in a session's
prompt_templates has no effect, and the templates argument of
summarize_focus_group() replaces them.
Examples
default_prompts <- get_default_prompt_templates()
names(default_prompts)
#> [1] "participant_utterance_subtle_persona"
#> [2] "participant_turn_instruction"
#> [3] "participant_desire_instruction"
#> [4] "participant_probe_instruction"
#> [5] "participant_probe_reask"
#> [6] "participant_desire_to_talk_nuanced"
#> [7] "moderator_opening"
#> [8] "moderator_icebreaker_question"
#> [9] "moderator_engagement_question"
#> [10] "moderator_exploration_question"
#> [11] "moderator_probing_focused"
#> [12] "moderator_summarizing"
#> [13] "moderator_transition"
#> [14] "moderator_manage_participation"
#> [15] "moderator_ending_question"
#> [16] "moderator_closing"
#> [17] "moderator_generic_utterance"
#> [18] "thematic_analysis_prompt"
#> [19] "summary_participant"
#> [20] "summary_item"
#> [21] "summary_disagreements"
#> [22] "summary_trajectory"
#> [23] "summary_turn"
#> [24] "summary_session"
#> [25] "summary_reask"
default_prompts$participant_utterance_subtle_persona
#> [1] "You are a focus group participant.\nYour defining characteristics, lived experiences, priorities, and any prior survey responses are:\n{{persona_description}}\n{{communication_style_instruction}}\n\nThe main topic of this focus group is: {{topic}}.\nThe current question or point of discussion, initiated by the moderator, is: '{{current_moderator_question}}'.\nSummary of earlier discussion (if available):\n{{conversation_summary_so_far}}\nMost recent messages in the conversation:\n{{conversation_history}}\n\nInstructions for your response (persona-anchored and safe to disagree):\n1. Internalize and embody the persona above. Let your worldview, values, priorities, and communication style shape what you say and how you say it. Sound like a distinct person, not a generic commentator.\n2. Do NOT write things like 'As a [role]...' or 'My persona is...'. Show, do not tell: reveal your perspective through specific points, tone, and word choice that fit your persona.\n3. Advance the conversation: respond directly to the current question and to others' points. If you agree, add a new angle or example. If you disagree, do so respectfully: acknowledge their point, then state your different view and give a clear reason or brief example.\n4. Make it concrete. Prefer specific reasons, brief anecdotes, or practical examples over vague generalities. Vary your language and avoid repeating yourself or others verbatim.\n5. Keep it appropriate for a group turn: 2-6 sentences. Aim for one clear claim and one succinct rationale (optionally a short example). Avoid meta-comments about the discussion mechanics.\n6. Psychological safety: it is safe to disagree respectfully. Critique ideas, not people; use civil language; you may address other participants by their labels when relevant.\n7. If asked directly whether you are an AI system, say truthfully that this is a simulated research exercise; otherwise simply stay in character.\n\nBased on all the above, what is your contribution to the discussion now?"
my_prompts <- get_default_prompt_templates()
my_prompts$moderator_opening <- "Welcome all! Let us talk about {{topic}} today."
cfg <- LLMR::llm_config("groq", "openai/gpt-oss-20b",
api_key = LLMR::llm_api_key_env("GROQ_API_KEY"))
agents <- create_agents(2, config = cfg,
direct_persona_descriptions = c("A retired teacher.",
"A night-shift nurse."))
fg <- FocusGroup$new(
topic = "Library hours",
purpose = "Pilot the revised opening.",
agents = agents,
moderator_id = "MOD",
turn_taking_flow = create_conversation_flow("round_robin", agents, "MOD"),
prompt_templates = my_prompts)
#> No question_script provided. Using a minimal default script (opening, generic discussion, closing).
fg$prompt_templates$moderator_opening
#> [1] "Welcome all! Let us talk about {{topic}} today."
