Inferensys

Prompt

Conversation Gap Analysis Prompt for Missing Answers

A practical prompt playbook for using Conversation Gap Analysis Prompt for Missing Answers in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the offline analysis job, required inputs, and clear boundaries for when this prompt is the right tool versus when a different approach is needed.

This prompt is designed for offline conversation quality assurance and improvement workflows. Its primary job is to compare user questions against assistant responses across a complete, labeled transcript and identify turns where the assistant provided a non-answer, deflection, or partial response. The ideal user is an AI engineer, QA analyst, or product manager responsible for auditing chatbot performance at scale, measuring answer completeness, or generating a remediation backlog for gaps in assistant behavior. You need a full transcript with clear speaker labels (e.g., 'User:' and 'Assistant:') before using this prompt; it is not a real-time correction tool and will not fix a live conversation.

Use this prompt when you have a batch of completed conversations and need a structured gap report with answer completeness scores and suggested remediation. It is most effective as part of a pre-release regression testing suite or a periodic production audit pipeline. Do not use this prompt for real-time intervention, session state management, or direct user-facing correction. It assumes the conversation is finished and that the analysis can be performed asynchronously. For live systems that need to detect and recover from dropped questions mid-session, pair this analysis output with a state-tracking middleware and a separate 'Conversation Repair Prompt for Forgotten Questions' that acts on the detected gaps.

Before running this prompt, ensure your transcript is clean and consistently formatted. Inconsistent speaker labels, missing turns, or unmarked system messages will degrade the analysis. The prompt works best when combined with a validation layer that checks the output schema for required fields like turn_reference, completeness_score, and gap_type. For high-stakes audits where a missed gap could have compliance or safety implications, always route the generated gap report through a human review step before accepting remediation suggestions. The next step after reading this section is to copy the prompt template, adapt the [INPUT] and [OUTPUT_SCHEMA] placeholders to your transcript format, and wire it into an offline evaluation harness with schema validation and logging.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Conversation Gap Analysis Prompt delivers reliable value and where it introduces operational risk.

01

Good Fit: Post-Conversation QA Pipelines

Use when: analyzing completed support tickets, call transcripts, or chat logs offline to measure answer completeness. Guardrail: Run in batch mode with a human-reviewed golden set to calibrate scoring thresholds before trusting automated pass/fail decisions.

02

Bad Fit: Real-Time Intervention

Avoid when: trying to detect missing answers mid-turn to interrupt or correct a live assistant. Risk: Latency and false positives will degrade user experience. Guardrail: Use a lightweight classifier for real-time detection; reserve full gap analysis for async evaluation loops.

03

Required Input: Full Transcript with Turn Markers

What to watch: The prompt needs speaker-labeled, timestamped turns. Missing or merged turns cause false negatives. Guardrail: Validate input schema before analysis—reject transcripts with fewer than two turns or missing speaker roles. Log schema violations for pipeline debugging.

04

Operational Risk: Scoring Drift Over Time

What to watch: Completeness score distributions shift as conversation patterns change, making static thresholds unreliable. Guardrail: Monitor score distributions weekly. Recalibrate thresholds when the median score shifts by more than 10% or when false positive rates exceed your quality SLA.

05

Operational Risk: Rhetorical Question Misclassification

What to watch: The model flags polite filler questions ('How are you?') or user self-answered questions as gaps. Guardrail: Add few-shot examples distinguishing rhetorical, social, and self-resolved questions from genuine unanswered requests. Track false positive rate by category.

06

Bad Fit: Single-Turn or Stateless Interactions

Avoid when: analyzing isolated Q&A pairs without conversation context. Risk: The prompt over-detects 'gaps' because it expects multi-turn resolution patterns. Guardrail: Use a simpler answer-grounding check for single-turn evaluations. Gate gap analysis behind a minimum turn-count threshold.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A production-ready prompt for auditing conversation transcripts to identify and classify gaps where the assistant failed to answer user questions completely.

The following template is the core instruction set for the Conversation Gap Analysis prompt. It is designed to be dropped into an evaluation harness, a CI/CD pipeline, or a manual QA workflow. The prompt takes a full conversation transcript as input and returns a structured JSON report of every instance where a user's question was not fully answered. Use this as a starting point: replace the placeholder tokens with your actual transcript, output schema requirements, and any domain-specific constraints before deployment.

text
Analyze the following conversation transcript between a User and an Assistant. For each user turn that contains a question or request for information, evaluate the assistant's subsequent response for answer completeness.

[TRANSCRIPT]

For each user question identified, produce a gap analysis entry with the following structure:
- turn_id: The turn number where the user asked the question.
- user_question: The exact question or request text.
- assistant_response_summary: A brief summary of what the assistant said in response.
- completeness_score: A score from 1 to 5 where 1 is a complete non-answer or deflection, 3 is a partial answer, and 5 is a fully complete and direct answer.
- gap_type: Classify the gap if score is 3 or below. Use one of: [DEFLECTION, NON_ANSWER, PARTIAL_ANSWER, IRRELEVANT_RESPONSE, ACKNOWLEDGMENT_ONLY, CLARIFICATION_LOOP].
- missing_information: What specific information was requested but not provided.
- suggested_remediation: A draft of what a complete answer should have included.
- severity: The impact of this gap on the conversation. Use [LOW, MEDIUM, HIGH, CRITICAL].

[OUTPUT_SCHEMA]
Return a JSON object with a "gaps" array containing one object per identified gap. If no gaps are found, return an empty array.

[CONSTRAINTS]
- Do not flag rhetorical questions or social pleasantries.
- If the user's question was answered across multiple assistant turns, evaluate the combined response.
- If the assistant asked a clarifying question and the user answered, evaluate the assistant's final response to the original question.

To adapt this template, start by replacing [TRANSCRIPT] with your actual dialogue data, ensuring each turn is clearly labeled with a speaker role and a turn number. The [OUTPUT_SCHEMA] placeholder should be replaced with a concrete JSON schema if your application requires strict validation, such as defining required fields and enum values. The [CONSTRAINTS] section is critical for tuning precision; for example, in a customer support context, you might add a constraint to ignore questions about order status if the assistant's response includes a tracking link, as that constitutes a complete answer in that domain. Always test the adapted prompt against a golden dataset of transcripts with known gaps to calibrate the completeness_score thresholds before production use.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Conversation Gap Analysis prompt. Each variable must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of false negatives in gap detection.

PlaceholderPurposeExampleValidation Notes

[TRANSCRIPT]

Full conversation transcript to analyze for gaps

User: How do I reset my password?\nAssistant: You can find that in Settings.\nUser: Where in Settings?\nAssistant: Let me know if you need anything else!

Must be a non-empty string with at least 2 turns. Validate that turn delimiters are consistent and each turn has a speaker label. Null or single-turn transcripts should be rejected before prompt assembly.

[TURN_DELIMITER]

Regex or string pattern separating conversation turns

\n\n

Must be a valid regex or literal string. Test that splitting [TRANSCRIPT] with this delimiter produces the expected number of turns. Mismatched delimiters cause the model to merge turns and miss gaps.

[SPEAKER_LABELS]

Ordered list of speaker identifiers used in the transcript

["User", "Assistant"]

Must be a JSON array of strings matching the labels in [TRANSCRIPT]. Validate that every turn starts with one of these labels followed by a colon or separator. Missing labels cause the model to misattribute questions.

[GAP_DEFINITIONS]

Taxonomy of gap types the prompt should detect

["non_answer", "deflection", "partial_response", "ignored_question"]

Must be a JSON array of strings from the supported gap type enum. Validate against the allowed set. Unknown gap types cause the model to hallucinate detection criteria or miss real gaps.

[COMPLETENESS_THRESHOLD]

Minimum score for a response to be considered complete

0.8

Must be a float between 0.0 and 1.0. Validate range and type. Values below 0.5 produce excessive false positives; values above 0.95 miss genuine partial answers. Default to 0.7 if not specified.

[OUTPUT_SCHEMA]

JSON schema describing the expected gap report structure

{"type": "object", "properties": {"gaps": {"type": "array"}}}

Must be a valid JSON Schema object. Validate parseability before prompt assembly. A missing or invalid schema causes the model to produce unstructured output that downstream parsers cannot consume.

[MAX_GAPS]

Upper bound on the number of gaps to report

20

Must be a positive integer. Validate type and range. Set based on expected transcript length to prevent the model from generating filler gaps when it runs out of real ones. Null allowed if no limit is desired.

[CONTEXT_WINDOW_BUDGET]

Token budget reserved for this prompt within the full context window

4000

Must be a positive integer. Validate that [TRANSCRIPT] length plus prompt overhead does not exceed this budget. Exceeding the budget causes silent truncation and missed gaps at the end of long transcripts.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Conversation Gap Analysis prompt into a production pipeline with validation, retries, logging, and human review.

This prompt is designed for offline batch processing, not a real-time endpoint. The analysis requires the full conversation transcript, which is only available after the session closes. Store transcripts in a database with a status field (active, closed, analyzed, reviewed). Run the gap analysis as an asynchronous job triggered by a conversation close event or a scheduled cron that picks up unprocessed closed transcripts. This decouples the analysis cost and latency from the user-facing assistant response time.

Parsing and validation are critical. The prompt requests a JSON output with a specific schema. Always parse the model response and validate each gap entry against the expected schema before storing results. If the model returns malformed JSON, use a repair prompt that feeds the raw output and the schema back to the model with stricter formatting instructions, or implement a retry with a lower temperature and explicit JSON mode. Do not silently accept partial or malformed gap reports. Validate that turn_reference values map to actual turns in the source transcript and that completeness_score falls within the expected 0.0–1.0 range.

Observability and drift detection should be built in from day one. Log the completeness_score distribution over time to detect systemic drift in assistant behavior—a downward trend may indicate a model update, prompt change, or knowledge base issue that is causing more non-answers. For high-severity gaps (e.g., severity: critical or completeness_score < 0.3), trigger a human review workflow by creating a ticket in your QA queue with the gap details and source transcript. Consider running this prompt on a daily sample of conversations rather than every conversation to manage cost, reserving full-coverage analysis for high-stakes or regulated use cases.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the gap analysis report. Use this contract to parse and validate the model output before storing or displaying results.

Field or ElementType or FormatRequiredValidation Rule

gap_report

object

Top-level object must contain 'conversation_id', 'analysis_timestamp', and 'turns' array

conversation_id

string

Must match the [CONVERSATION_ID] input exactly; reject on mismatch

analysis_timestamp

ISO 8601 string

Must parse as valid datetime; reject if unparseable or in the future

turns

array of objects

Array length must equal the number of user turns in [TRANSCRIPT]; reject if count mismatch

turns[].turn_id

integer

Must be a positive integer matching a user turn index from [TRANSCRIPT]; reject duplicates

turns[].user_question

string

Must be non-empty; reject if null or whitespace-only

turns[].assistant_response_summary

string

Must be non-empty; null allowed only if assistant did not respond to this turn

turns[].answer_completeness

enum: complete | partial | non_answer | deflection

Must be one of the four enum values; reject any other string

turns[].gap_description

string or null

Required when answer_completeness is not 'complete'; must be non-empty in those cases; null allowed for complete answers

turns[].missing_elements

array of strings

Required when answer_completeness is 'partial'; must contain at least one element; empty array allowed only for complete or non_answer turns

turns[].remediation_suggestion

string or null

Required when answer_completeness is not 'complete'; must be non-empty in those cases; null allowed for complete answers

turns[].confidence_score

number 0.0-1.0

Must be a float between 0.0 and 1.0 inclusive; reject if out of range or non-numeric

PRACTICAL GUARDRAILS

Common Failure Modes

Conversation gap analysis fails in predictable ways. These are the most common production failure modes and the specific guardrails that prevent them.

01

False Positives on Rhetorical Questions

What to watch: The prompt flags rhetorical questions, social phatic expressions ('How are you?'), and user self-talk as unanswered questions. This inflates gap counts and erodes trust in the report. Guardrail: Add explicit exclusion criteria for rhetorical markers, greeting patterns, and questions the user immediately self-answers. Include few-shot examples of non-actionable questions that should be filtered.

02

Implicit Question Blindness

What to watch: The prompt misses questions stated as statements ('I can't figure out how to reset my password') or embedded in multi-sentence turns. The gap report undercounts real user needs. Guardrail: Include explicit instruction to detect implicit information-seeking intent, not just interrogative syntax. Test with a golden set of declarative and embedded questions. Add a confidence flag for implicit detections.

03

Partial Answer Misclassification

What to watch: The assistant provided a technically relevant but incomplete response, and the gap analyzer marks it as 'answered' because some information was present. Users remain stuck on the unaddressed portion. Guardrail: Require the prompt to assess answer completeness on each sub-question within a turn, not just topical relevance. Output a completeness score per sub-question with a threshold below which the item is flagged as unresolved.

04

Deflection Disguised as Answer

What to watch: The assistant responded with a policy statement, a link to documentation, or a request for more information, and the gap analyzer treats this as a resolved answer. The user's actual question was never addressed. Guardrail: Add a deflection detection layer that classifies response types (direct answer, clarification request, policy deflection, escalation, resource pointer). Flag any response type other than 'direct answer' for human review or lower completeness scoring.

05

Context Window Truncation Artifacts

What to watch: Long conversations exceed the context window, causing the gap analyzer to process only recent turns. Questions from earlier in the session are silently dropped from the analysis. Guardrail: Implement sliding window analysis with overlapping segments, or pre-extract all user questions before running gap analysis. Include a 'transcript completeness' field in the output that warns when the full conversation couldn't be processed.

06

Temporal Misordering of Resolution

What to watch: A question asked on turn 5 is answered on turn 3 (due to assistant anticipation or context carryover from a prior session). The gap analyzer marks it as unresolved because it only looks forward. Guardrail: Instruct the prompt to check both forward and backward for answer evidence. Include a 'resolved at turn' field that can reference turns before or after the question. Validate against conversations with out-of-order resolutions.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to evaluate the quality of the Conversation Gap Analysis output before integrating it into a production QA pipeline. Each criterion targets a specific failure mode common to gap detection prompts.

CriterionPass StandardFailure SignalTest Method

Recall on Explicit Questions

All direct questions (ending with '?') are identified with a turn reference

A direct question from the transcript is missing from the gap report

Run against a golden transcript with 10 known explicit questions; assert 100% recall

Precision on Rhetorical Questions

Rhetorical questions and social phatics ('How are you?') are excluded from the gap list

A greeting or rhetorical question appears as an unresolved gap

Include 5 rhetorical questions in the test transcript; assert none appear in the output

Answer Completeness Classification

Each response is correctly classified as 'full_answer', 'partial_answer', 'deflection', or 'non_answer'

A direct answer is misclassified as a deflection, or a non-answer is classified as partial

Use a labeled set of 20 question-response pairs with known classifications; assert >90% accuracy

Turn Reference Accuracy

Each gap entry references the correct turn index or message ID from the source transcript

A gap entry points to the wrong turn, making remediation impossible

Validate that every [TURN_REF] in the output maps to a turn containing the identified question

Remediation Suggestion Relevance

Suggested remediation directly addresses the unanswered question using available context

Remediation is generic ('Provide a better answer') or hallucinates information not in the transcript

Spot-check 10 remediation suggestions; assert each contains specific reference to the question's subject matter

Confidence Score Calibration

Low confidence scores (<0.7) correlate with genuinely ambiguous cases; high scores (>0.9) with clear gaps

A clear non-answer receives a low confidence score, or an ambiguous indirect answer receives 0.95+

Bin 50 gap entries by confidence score; manually verify that low-confidence bins contain edge cases and high-confidence bins contain clear failures

Output Schema Compliance

Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed

Output is missing required fields, contains malformed JSON, or uses wrong types for severity scores

Validate output against the JSON Schema definition; assert zero schema violations on a 20-transcript test suite

Empty Transcript Handling

Returns an empty gap list with a summary indicating no gaps found, not an error or hallucinated gaps

Output invents gaps for a transcript where every question was answered completely

Feed a transcript with 10 questions all correctly answered; assert gaps array is empty and summary is appropriate

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single conversation transcript and lighter validation. Remove the answer completeness scoring schema initially and focus on binary detection (answered vs. not answered). Run on 10-20 transcripts manually before building automation.

Prompt modification

Replace the detailed scoring rubric with a simpler instruction:

For each user question in [TRANSCRIPT], classify the assistant response as ANSWERED, PARTIAL, DEFLECTED, or NO_ANSWER. Return a JSON array with turn_index, question_text, and classification.

Watch for

  • False positives on rhetorical questions and social phatic turns
  • Missed implicit questions embedded in statements
  • Over-flagging clarification requests as non-answers
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.