Skip to contents

The interviewer works through a question list (or drafts one), asking one question at a time with an optional adaptive follow-up probing the respondent's previous answer. Returns a tidy question/answer frame, the format interview studies analyze.

Usage

interview(
  interviewer,
  respondent,
  topic,
  questions = NULL,
  n_questions = 5L,
  follow_up = TRUE,
  msg_mode = NULL,
  quiet = FALSE,
  ...
)

Arguments

interviewer, respondent

Agents.

topic

Interview topic.

questions

Character vector; if NULL the interviewer drafts n_questions.

n_questions

Number of questions to draft when questions is NULL.

follow_up

If TRUE (default), each scripted question may be followed by one adaptive probe based on the answer.

msg_mode

Message construction, "roleflip" (default) or "flat"; NULL uses getOption("LLMRagent.msg_mode"). See conversation().

quiet

FALSE prints the exchange live.

...

Passed to the underlying LLMR calls.

Value

A tibble: order, type ("scripted" or "probe"), question, answer.

Examples

if (FALSE) { # \dontrun{
cfg <- LLMR::llm_config("groq", "openai/gpt-oss-20b", temperature = 0.8)
iv <- interview(
  interviewer = agent("Interviewer", cfg,
                      persona = "A careful qualitative researcher."),
  respondent  = agent("Respondent", cfg,
                      persona = "A first-generation college student, reflective."),
  topic = "Experiences with online learning",
  n_questions = 3
)
iv
} # }