Inferensys

Prompt

Follow-Up Question Generation Prompt

A practical prompt playbook for generating the next best follow-up question in research and investigative copilots, ranked by information gain and blocking status.
Finance professional using AI FP&A copilot on laptop, board presentation visible on screen, home office work session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the operational boundaries for a follow-up question generation prompt, clarifying when it adds value and when it introduces risk.

This prompt is designed for research and investigative copilots that must advance a conversation toward resolution when prior turns contain unanswered questions. It takes a conversation transcript and a list of detected unresolved questions as input, then generates the single highest-value follow-up question ranked by information gain and blocking status. Use this when your system has already identified what remains unanswered and needs to decide what to ask next.

Do not use this for casual chat, simple FAQ bots, or workflows where the assistant should answer immediately rather than investigate further. This prompt assumes you already have a working pending question detection layer upstream. Deploying it without that layer will produce hallucinated follow-ups to questions that were already answered, eroding user trust. The prompt is also inappropriate for high-urgency support scenarios where asking another question delays resolution; in those cases, route to a human agent or execute the best available answer with a confidence disclaimer.

Before integrating this prompt, verify that your upstream detection system distinguishes between explicit questions, implicit information needs, and rhetorical questions. The follow-up generator is only as good as the unresolved question list it receives. If your detection layer produces false positives, this prompt will amplify the error by asking unnecessary clarifying questions. Implement a severity scoring step before this prompt to filter out low-impact unresolved items, and set a maximum question budget per session to prevent infinite clarification loops.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Follow-Up Question Generation Prompt works, where it fails, and what you must provide before deploying it into a research or investigative copilot.

01

Good Fit: Investigative Workflows

Use when: the assistant must advance a multi-turn investigation, such as technical root-cause analysis, due diligence, or research synthesis. The prompt excels at ranking questions by information gain and identifying blocking unknowns. Guardrail: Always provide a structured list of unresolved questions with turn references; the prompt cannot detect gaps it cannot see.

02

Bad Fit: Open-Ended Chat

Avoid when: the conversation has no explicit investigative goal or the user expects social chit-chat. The prompt will generate questions that feel interrogative or off-topic. Guardrail: Gate the prompt behind a workflow classifier. Only invoke it when the session state indicates an active investigation with explicit unresolved items.

03

Required Inputs

Must provide: a structured list of unresolved questions with turn references, the current conversation context, and the investigation objective. Without these, the model will hallucinate gaps or ask already-answered questions. Guardrail: Validate input completeness before invocation. If unresolved questions are missing, fall back to a clarification prompt instead.

04

Operational Risk: Redundant Questions

What to watch: the model may generate a follow-up question that has already been answered earlier in the conversation, especially in long sessions with compressed context. Guardrail: Include a deduplication check in the harness that compares generated questions against the conversation history before surfacing to the user. Log and suppress duplicates.

05

Operational Risk: Premature Narrowing

What to watch: the model may focus on a single unresolved question and ignore higher-priority blocking items, leading the investigation down a low-value path. Guardrail: Require the prompt to output a ranked list with explicit information-gain justification. The harness should validate that the top-ranked question addresses a blocking dependency before presenting it.

06

Human-in-the-Loop Threshold

What to watch: in regulated or high-stakes investigations, an automated follow-up question may commit the assistant to a line of inquiry that a human reviewer would not approve. Guardrail: For domains like legal review, clinical investigation, or audit, route the generated question to a human approval queue before surfacing it to the user or logging it as an official inquiry step.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

The reusable prompt with square-bracket placeholders for generating the next best follow-up question in a research or investigative copilot.

This template is designed to be wired into your copilot immediately after the pending question detection step completes. It takes a structured list of unresolved questions, the conversation history, and the investigation's goal to produce a single, high-value follow-up question. The prompt is engineered to prioritize questions that are blocking progress and have high information gain, while strictly avoiding territory that has already been covered. Use this as the core reasoning step in your follow-up generation pipeline.

text
You are an investigative research assistant. Your task is to analyze the current state of an investigation and generate the single best follow-up question to advance toward resolution.

## INVESTIGATION GOAL
[INVESTIGATION_GOAL]

## CONVERSATION HISTORY
[CONVERSATION_HISTORY]

## UNRESOLVED QUESTIONS
These questions have been identified as asked but not yet answered. Each includes a severity and blocking status.
[UNRESOLVED_QUESTIONS]

## ALREADY ANSWERED TOPICS
Do not ask about these topics. They have been sufficiently addressed.
[ANSWERED_TOPICS]

## INSTRUCTIONS
1. Review the investigation goal, conversation history, and unresolved questions.
2. Identify the single unresolved question that, if answered, would most advance the investigation. Prioritize:
   - Questions marked as "blocking" over "non-blocking".
   - Questions with higher severity scores.
   - Questions whose answers would unlock or invalidate other pending questions.
3. Formulate a precise, neutral follow-up question that targets the missing information directly. Do not repeat the original question verbatim if the context has evolved; refine it based on what has been learned.
4. Ensure the question does not ask about any topic listed in "Already Answered Topics".
5. If no unresolved question is worth asking (all are low severity, non-blocking, or stale), output an empty question and explain why.

## OUTPUT SCHEMA
Return a single JSON object with the following fields:
- `selected_question_id`: The ID of the unresolved question you are following up on, or null if none.
- `follow_up_question`: The generated follow-up question text, or an empty string if none.
- `rationale`: A brief explanation of why this question was chosen and how it advances the investigation.
- `information_gain_rationale`: What specific missing information this question targets and why it matters.
- `skip_reason`: If no question is generated, explain why (e.g., all questions are stale, low severity, or already implicitly answered).

## CONSTRAINTS
- Do not fabricate answers or assume information not present in the conversation history.
- Do not ask leading questions that assume unverified facts.
- Keep the follow-up question to a single sentence.
- If the highest-priority question is ambiguous, choose the interpretation most consistent with the investigation goal.

To adapt this template, replace each square-bracket placeholder with data from your application layer. [INVESTIGATION_GOAL] should be a concise statement of what the user or system is trying to resolve. [CONVERSATION_HISTORY] should be the recent turns, formatted with speaker labels. [UNRESOLVED_QUESTIONS] must be the structured output from your pending question detection step, including IDs, text, severity scores, and blocking flags. [ANSWERED_TOPICS] is a critical guardrail: populate it with a summary of topics already resolved to prevent the model from circling back to dead ends. After generating the question, validate the output against the schema, check that the selected_question_id references a real entry in your unresolved list, and confirm the question does not overlap with any answered topic. For high-stakes investigations, route the generated question through a human review step before presenting it to the user or executing it via tool use.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the follow-up question generation prompt needs to work reliably. Validate each before assembly to prevent hallucinated questions, repeated territory, or irrelevant probes.

PlaceholderPurposeExampleValidation Notes

[CONVERSATION_HISTORY]

Full transcript of the current session with speaker labels and turn indices

USER_T1: What caused the latency spike? ASSISTANT_T2: Checking logs now. USER_T3: Also, did we deploy anything yesterday?

Must include turn indices. Validate that history is not truncated mid-turn. Minimum 2 turns required. If empty, prompt must return empty question list.

[UNRESOLVED_QUESTIONS]

Structured list of questions detected as asked but not yet answered, with turn references

[{"question": "What caused the latency spike?", "turn": 1, "status": "unanswered"}]

Validate each entry has question text, turn reference, and status field. Null allowed if no unresolved questions exist. If null, prompt should return empty output.

[RESOLVED_QUESTIONS]

Structured list of questions already answered in the session, with answer summaries

[{"question": "Did we deploy yesterday?", "turn": 3, "answer_summary": "Yes, v2.4.1 at 14:30 UTC"}]

Used to prevent the model from re-asking answered questions. Validate answer_summary is non-empty for each entry. Null allowed for first-turn scenarios.

[CURRENT_TOPIC]

Brief description of the active conversation topic or phase

Investigating production incident: latency spike in payment service

Must be a single string under 200 characters. Validate it is not stale relative to the last user turn. If topic shift detected, update before calling prompt.

[DOMAIN_CONTEXT]

Optional domain-specific constraints, terminology, or investigation scope

SRE incident investigation. Focus on infrastructure, deployments, and metrics. Avoid business logic questions.

Null allowed. If provided, validate it does not contradict the conversation history. Use to scope question relevance.

[MAX_QUESTIONS]

Integer cap on the number of follow-up questions to generate

3

Must be an integer between 1 and 5. Default to 3 if not specified. Validate range before prompt assembly. Higher values risk question quality degradation.

[INFORMATION_GAIN_WEIGHT]

Float controlling the balance between information gain and blocking status in ranking

0.7

Must be a float between 0.0 and 1.0. 1.0 ranks purely by information gain, 0.0 ranks purely by blocking status. Default 0.6. Validate range.

[OUTPUT_SCHEMA]

Expected JSON schema for the generated follow-up questions

{"questions": [{"text": "...", "targets_unresolved_id": "...", "rationale": "...", "information_gain": "high"}]}

Validate schema has required fields: text, targets_unresolved_id, rationale, information_gain. information_gain must be one of high, medium, low. targets_unresolved_id must reference an id in UNRESOLVED_QUESTIONS or be null for new questions.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Follow-Up Question Generation Prompt into a research copilot application with validation, retries, and state management.

The Follow-Up Question Generation Prompt is designed to be called by an application orchestrator, not exposed directly to end users. The orchestrator is responsible for maintaining the conversation state, tracking which questions have been asked and answered, and deciding when to invoke this prompt. The prompt expects a structured input containing the current conversation transcript, a list of previously identified unresolved questions, and any domain constraints or research goals. The application should call this prompt after each assistant response or when the system detects that the conversation has stalled on an unresolved thread.

To wire this into a production system, implement a state management layer that persists a pending_questions array across turns. Each entry should include a unique question ID, the original turn reference, the question text, a status enum (unresolved, partially_answered, addressed, retired), and a timestamp. Before calling the prompt, the orchestrator should filter out questions with status addressed or retired and serialize the remaining items into the [UNRESOLVED_QUESTIONS] placeholder. After receiving the model's output, validate the generated follow-up question against a checklist: (1) the question is not already answered in the transcript, (2) it does not duplicate a previously asked follow-up, (3) it is ranked by information gain with a clear rationale, and (4) it respects any [CONSTRAINTS] such as domain boundaries or prohibited question types. If validation fails, retry with the validation errors injected into the prompt as additional context, up to a maximum of two retries before falling back to a human reviewer or a simpler clarification question.

For model selection, use a capable reasoning model (such as GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro) because the task requires cross-turn inference, information gain estimation, and avoidance of already-covered territory. Lighter models often fail on the 'already-answered' check and generate repetitive questions. Log every generated follow-up question along with its rationale, the input state snapshot, and the validation result. This trace data is essential for debugging dropped-question failures and for tuning the prompt's sensitivity to implicit answers. In high-stakes research or investigative domains, route generated questions through a human approval queue before they are shown to the user, especially when the question implies a sensitive line of inquiry or when the system confidence score falls below a configurable threshold. Avoid wiring this prompt directly into a user-facing message without state checks—sending a follow-up question that was already answered is the most common production failure mode and erodes user trust quickly.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the JSON output of the Follow-Up Question Generation Prompt. Use this contract to build a parser, validator, and retry logic in your application harness.

Field or ElementType or FormatRequiredValidation Rule

follow_up_question

string

Must be a single interrogative sentence ending with '?'. Length between 10 and 300 characters. Must not be answerable with information already present in [CONVERSATION_HISTORY].

question_type

enum: ['clarification', 'information_gathering', 'hypothesis_test', 'blocking_removal']

Must match exactly one of the four enum values. Reject any output with a non-enum string.

target_unresolved_item_id

string | null

If the question targets a specific item from [UNRESOLVED_ITEMS], this must be a valid ID from that list. If the question is a new line of inquiry, value must be null. Validate ID existence in the input payload.

information_gain_rank

integer

Must be an integer from 1 to N, where N is the count of candidate questions generated. No ties allowed. Rank 1 indicates the highest expected information gain. Validate uniqueness across the batch.

blocking_status

boolean

Must be true if the question addresses a blocker preventing progress toward [RESOLUTION_GOAL]. Must be false if the question is exploratory. Validate consistency with question_type: 'blocking_removal' type must have blocking_status true.

already_answered_territory_check

object

Must contain two boolean fields: 'pass' and 'requires_human_review'. 'pass' must be true if the question does not revisit answered topics. If 'pass' is false, the question must be discarded or flagged. 'requires_human_review' must be true if confidence in the check is below 0.9.

source_grounding

array of objects

Each object must have fields: 'unresolved_item_id' (string, nullable), 'turn_reference' (integer, nullable), and 'rationale' (string, 20-200 chars). Array must not be empty. Validate that at least one entry references a specific turn or unresolved item from the input.

confidence_score

number

Must be a float between 0.0 and 1.0 inclusive. Scores below 0.7 should trigger a human review flag in the harness. Reject scores outside the range.

PRACTICAL GUARDRAILS

Common Failure Modes

Follow-up question generation fails in predictable ways. These cards cover the most common production failure modes and how to guard against them before they erode user trust.

01

Re-asking Already-Answered Questions

What to watch: The model generates a follow-up question that the user or document already addressed earlier in the session, making the assistant appear inattentive. This is the most common failure mode and directly erodes user confidence. Guardrail: Inject a structured list of resolved questions into the prompt context and include an explicit instruction: 'Do not ask any question that appears in the resolved list. If all high-priority questions are resolved, output NO_FOLLOW_UP.' Validate output against the resolved set before surfacing to the user.

02

Low-Information-Gain Questions

What to watch: The model generates a question that is easy to answer but advances the investigation by zero meaningful steps—yes/no trivia, tangential details, or questions whose answers won't change the decision or next action. This wastes the user's attention and context budget. Guardrail: Include an information-gain scoring rubric in the prompt: 'Rank candidate questions by how much the answer would change the current hypothesis, unblock a pending decision, or eliminate a major uncertainty. Discard questions scoring below threshold.' Pair with an eval that measures whether the answer to the generated question actually changed downstream outputs.

03

Ignoring Blocking Dependencies

What to watch: The model asks an interesting but non-blocking question while a critical unresolved item sits untouched. The user answers the follow-up, but the workflow remains stuck because the real blocker was never surfaced. Guardrail: Maintain an explicit blocking-status field for each pending question in the state object. Instruct the prompt: 'Before generating any follow-up, scan the pending questions list. If any question is marked BLOCKING, you must ask that question or explain why it cannot yet be asked. Never skip a blocking question in favor of a non-blocking one.'

04

Question Drift Across Turns

What to watch: Over multiple turns, the model's follow-up questions gradually drift away from the original investigation goal, chasing interesting but irrelevant threads. By turn five, the assistant is exploring a completely different topic than what the user asked about. Guardrail: Anchor every follow-up prompt with the original investigation objective and a running summary of what has been established. Add a drift check instruction: 'Before finalizing the follow-up question, verify that answering it would directly advance the original objective stated at session start. If not, discard and re-rank.'

05

Assumption-Laden Questions

What to watch: The model generates a follow-up that embeds an unverified assumption from a prior turn, treating a hypothesis as established fact. The user may not notice and answers the question as framed, propagating the error downstream. Guardrail: Include an assumption-audit step in the prompt: 'For each candidate follow-up question, list the factual premises it depends on. Mark any premise that has not been explicitly confirmed by the user or source evidence. If unconfirmed premises exist, either reframe the question to avoid the assumption or flag it for clarification instead.'

06

Over-generation When Silence Is Correct

What to watch: The model generates a follow-up question even when the investigation is complete, all blocking questions are resolved, and the user is ready to act. The unnecessary question makes the assistant seem pushy or unaware that the job is done. Guardrail: Add a termination condition to the prompt: 'If all pending questions are resolved, the original objective is achieved, and no new blocking uncertainties have emerged, output STOP. Do not fabricate a question to fill space.' Pair with an eval that measures the false-positive rate of follow-up generation on completed workflows.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks on a golden dataset of 50+ conversation transcripts with known unresolved questions. Each criterion should be scored independently, and the aggregate pass rate must meet the threshold defined in your release gate before shipping a new prompt version.

CriterionPass StandardFailure SignalTest Method

Relevance to unresolved question

Generated question directly addresses a question explicitly marked as unresolved in the golden transcript

Question targets a topic already answered or a topic never raised by the user

LLM-as-judge pairwise comparison against expected follow-up; require >= 0.85 relevance score

Information gain ranking

Selected question is ranked highest for expected information gain among all unresolved questions in the transcript

Question chosen has low information gain or is a trivial clarification when a blocking question exists

Rank correlation test against human-annotated priority order on golden set; Spearman's rho >= 0.80

Avoidance of already-answered territory

Generated question does not re-ask for information already provided in the transcript

Question repeats a query whose answer is explicitly present in prior turns

String match and semantic similarity check against prior answer spans; false positive rate < 5%

Blocking status detection

If a blocking unresolved question exists, the generated question addresses it first

Non-blocking question generated when a blocking question remains open

Check against golden labels for blocking questions; precision on blocking-first selection >= 0.90

Clarity and specificity

Question is self-contained and specific enough that a human could answer it without re-reading the full transcript

Vague, overly broad, or context-dependent question that requires implicit knowledge

Human eval on 50-sample subset; clarity rating >= 4 on 5-point Likert scale

Tone and conversational fit

Question reads naturally in the conversation flow and does not disrupt the established tone

Overly formal, robotic, or jarring phrasing that breaks conversational continuity

Human eval on tone appropriateness; acceptable rating on >= 90% of samples

No hallucinated user intent

Question is grounded in an actual user utterance or explicit gap in the transcript

Question invents a user need or concern not present in the conversation

Manual audit of generated questions against transcript evidence; hallucination rate < 2%

Output schema compliance

Generated output matches the required [OUTPUT_SCHEMA] with all required fields present and valid

Missing fields, extra fields, or type mismatches in the structured output

Schema validation pass rate >= 99% on golden dataset; fail the release if any schema violation occurs

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a simple conversation transcript. Remove the strict output schema and eval harness. Use a single-turn call to generate follow-up questions from a static transcript. Focus on testing whether the model identifies genuinely unresolved questions rather than re-asking answered ones.

Prompt modification

  • Remove [OUTPUT_SCHEMA] and replace with: Return a numbered list of follow-up questions.
  • Drop the [CONSTRAINTS] block for information gain ranking.
  • Use a short, hand-crafted transcript with 3-4 turns and 1-2 known unresolved questions.

Watch for

  • Questions that rephrase already-answered material.
  • Over-generation: producing 10+ questions when only 2 are unresolved.
  • Missing implicit questions the user hinted at but didn't ask directly.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.