Skip to contents

Describes a question asked of each participant at stated points, whose answers are saved but never enter the shared log: no agent sees a probe or its answers afterwards, so asking it does not change the discussion. Asked before and after an injection, the same question measures a position on both sides of it; asked at "start" and "end", it gives ratings before and after a session.

Usage

fg_probe(question, at, label = NULL, participants = NULL, scale = NULL)

Arguments

question

One non-empty string, the question.

at

One point, or a list of points, at which to ask it: fg_after_item(), fg_before_turn(), "start", "before_closing", or "end". "end" comes after the closing line; "before_closing" comes before it.

label

Optional name for the probe in the records; by default "probe_1", "probe_2", ... in the order the probes are given.

participants

Optional character vector of participant ids to ask; NULL asks every participant.

scale

Optional two whole numbers, c(lo, hi) with lo < hi, the ends of the scale on which the question asks for a number. NULL, the default, records the answers as text only.

Value

An object of class fg_probe.

Details

Each participant answers with its persona, the standing rules, and the discussion so far, as for a turn, and the probe as the closing instruction, worded by the participant_probe_instruction template of get_default_prompt_templates(). The answer is the reply's final answer, without any reasoning. A reply that is empty or cut off is retried once with a larger budget; one still empty is recorded as NA, with a warning. The answers are returned in the probes component of the result, with the raw reply beside each.

With scale = c(lo, hi), each answer is also read as a number, recorded in the value column. The reading is strict. Markup ("4"), a restatement of the scale ("1-7:", "on a scale of 1 to 7", "from 1 (strongly against) to 7 (strongly in favor)"), and a denominator equal to hi ("5/7", "6 out of 7") are set aside, as are digits joined to letters ("P3", "V241", "2024s") and, on a scale whose ends lie between -999 and 999, numbers of four or more digits, such as years. What remains must be one whole number from lo to hi. An answer with no number, with two different numbers ("3 or 4"), with a fraction of a point ("4.5"), with a number outside the scale ("-2"), or on another scale ("6/10" on a 1 to 7 scale) is not read, and neither are numbers written in words ("seven"); Arabic-Indic and Persian digits are read as digits. Nor is an answer that negates, compares, or reports someone else's number, whose number need not be the answer: one with "minus", "negative", "not", "never", "no", "except", "at least", "at most", "more than", "less than", "fewer than", "higher", "lower", "above", "below", "over", "under", or "between" (outside the scale's own restatement and the description of its ends), a number followed by "+" ("2+"), "others said", "they said", "everyone said", "someone said", or "P3 said", or a fraction written as one character, such as the half sign. Such an answer is followed by one re-ask in the same private exchange, worded by the participant_probe_reask template, asking for one number from lo to hi alone. An empty reply to the re-ask is not retried, and the earlier answer is kept. A value still unread is NA, and the participants concerned are named in one warning for the probe at that point. The column attempts counts the calls made for each answer, and every call, the re-ask included, is in the result's calls.

Examples

fg_probe(paste("Where do you stand on extending library hours, from 1",
               "(strongly against) to 7 (strongly in favor)?",
               "Answer with the number first."),
         at = list("start", fg_after_item(4), "end"), label = "position",
         scale = c(1, 7))
#> <fg_probe> at start, fg_after_item(4), end, scale 1 to 7
#>   Where do you stand on extending library hours, from 1 (strongly against) to 7 (strongly in favor)? Answer with the number first.