This prompt is built for analytics and audit teams who need to partition a completed, speaker-labeled transcript into labeled phases. The primary job-to-be-done is turning a linear conversation log into a structured map of turn-indexed boundaries, each with a phase label and a transition justification. This is a post-hoc analysis tool, not a real-time decision engine. Use it when you need to understand conversation structure at scale—for quality assurance, compliance review, or conversation analytics—and you have a full transcript with clear turn markers and speaker labels.
Prompt
Conversation Phase Segmentation Prompt

When to Use This Prompt
Determine if the Conversation Phase Segmentation Prompt fits your analytics or audit workflow before integrating it into a production pipeline.
The prompt assumes a clean, complete transcript. It does not handle real-time streaming, partial transcripts, ambiguous speaker attribution, or overlapping speech. If your use case requires detecting a topic shift as it happens to trigger a context reset or a system prompt switch, this is the wrong tool; use the Topic Shift Detection Prompt Template instead. Similarly, if you need to track a user's progress through a defined workflow like a support ticket lifecycle, the Conversation Phase Transition Classifier Prompt is a better fit. This prompt is for structural analysis of a finished conversation, not for guiding an ongoing one.
Before integrating this prompt into a production pipeline, confirm that your transcripts include consistent turn markers (e.g., [T1] User:, [T2] Assistant:) and that you have a defined phase taxonomy. The prompt's value is directly tied to the clarity of that taxonomy. If your phases are vague or overlapping, the output boundaries will be unreliable. Plan to evaluate the output against a human-annotated gold set to measure boundary accuracy and consistency. For high-stakes compliance or audit use cases, always include a human review step before treating the segmentation as an official record.
Use Case Fit
Where Conversation Phase Segmentation works well and where it introduces risk. This prompt partitions transcripts into labeled phases for analytics and audit teams, but its reliability depends on conversation structure, annotation quality, and operational constraints.
Strong Fit: Structured Support Transcripts
Use when: conversations follow a known workflow with distinct stages (greeting, diagnosis, resolution, confirmation). The prompt excels at detecting phase boundaries in support tickets, troubleshooting sessions, and scripted intake flows. Guardrail: provide a phase taxonomy with clear definitions and at least two annotated examples per phase to anchor model behavior.
Poor Fit: Open-Ended Creative Dialogue
Avoid when: conversations are exploratory, social, or creative with no fixed structure. The prompt will hallucinate phase boundaries in free-form chats, brainstorming sessions, or casual conversations where no ground-truth segmentation exists. Guardrail: run a pre-check using a Topic Coherence Scoring prompt to confirm sufficient structure before attempting segmentation.
Required Inputs: Annotated Gold Sets
Risk: deploying without human-annotated reference transcripts produces unverifiable segmentations. The prompt's evaluation criteria depend on boundary accuracy against gold sets, and without them you cannot measure drift or regression. Guardrail: maintain a versioned evaluation dataset of at least 50 annotated transcripts covering edge cases like interruptions, topic returns, and ambiguous transitions.
Operational Risk: Boundary Disagreement
Risk: different human annotators disagree on phase boundaries 15-30% of the time in complex conversations. The model will inherit this ambiguity and produce segmentations that satisfy no single stakeholder. Guardrail: define inter-annotator agreement thresholds before deployment and use majority-vote or adjudicated gold labels. Surface boundary confidence scores in the output so downstream systems can treat low-confidence boundaries differently.
Scale Risk: Long Transcript Costs
Risk: processing full transcripts with many turns through a segmentation prompt consumes significant context window budget and inference cost, especially for hour-long support calls or multi-session logs. Guardrail: implement a pre-segmentation step using a lightweight Topic Shift Detection prompt to identify candidate boundaries, then run full phase labeling only on confirmed shift regions.
Production Risk: Silent Phase Drift
Risk: as conversation patterns change over time (new products, policy changes, seasonal topics), the phase taxonomy becomes stale and segmentation accuracy degrades without obvious errors. Guardrail: schedule recurring evaluation runs against fresh production samples and monitor phase distribution shifts. Trigger a review when any phase label's frequency changes by more than 20% month-over-month.
Copy-Ready Prompt Template
A copy-ready prompt for partitioning conversation transcripts into labeled phases with turn-indexed boundaries and transition justifications.
This prompt template is designed to be pasted directly into your model request. It instructs the model to act as a conversation analyst, segmenting a provided transcript into distinct phases based on a user-supplied taxonomy. The output is a structured JSON object mapping turn indices to phase labels, including the evidence and reasoning behind each transition. This is a high-precision task suitable for analytics, audit, and quality assurance workflows where boundary accuracy is critical.
textYou are an expert conversation analyst. Your task is to segment the following conversation transcript into distinct phases. **Input Transcript:** [TRANSCRIPT] **Phase Taxonomy:** [PHASE_TAXONOMY] **Output Schema:** [OUTPUT_SCHEMA] **Constraints:** [CONSTRAINTS] **Instructions:** 1. Read the entire transcript carefully. 2. Identify every point where the conversation transitions from one phase to another, strictly using the provided Phase Taxonomy. 3. For each transition, determine the exact turn index where the new phase begins. 4. Provide a concise justification for each transition, citing specific dialogue or context shifts as evidence. 5. Ensure the output is a single, valid JSON object conforming to the Output Schema. Do not include any text outside the JSON object.
To adapt this template, replace the square-bracket placeholders with your specific assets. [TRANSCRIPT] should be your full conversation text, ideally with turn indices or speaker labels. [PHASE_TAXONOMY] is a list of your defined phase labels (e.g., 'greeting', 'problem_description', 'troubleshooting', 'resolution', 'closing'). [OUTPUT_SCHEMA] must be a strict JSON schema definition, including required fields like turn_index, phase_label, and justification. Use [CONSTRAINTS] to enforce rules like 'every turn must be assigned a phase' or 'transitions can only occur at speaker changes'. For high-stakes audit use cases, always route the output to a human review queue before finalizing any report.
Prompt Variables
Required inputs for the Conversation Phase Segmentation Prompt. Validate each placeholder before sending to the model to prevent boundary errors and mislabeled phases.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[TRANSCRIPT] | Full conversation transcript to segment into phases | USER: Hi, I need help with my account. AGENT: Sure, can you provide your email? USER: user@example.com | Must be non-empty string. Validate minimum 2 turns present. Check for turn delimiter consistency (USER:/AGENT:). Reject if only one speaker. |
[PHASE_TAXONOMY] | List of valid phase labels with definitions | ["greeting", "authentication", "problem_description", "troubleshooting", "resolution", "closing"] | Must be a JSON array of strings. Validate no duplicate labels. Each label must have a corresponding definition in [PHASE_DEFINITIONS]. Reject if taxonomy is empty. |
[PHASE_DEFINITIONS] | Mapping of phase labels to their semantic descriptions | {"greeting": "Initial pleasantries and rapport building", "authentication": "Identity verification steps"} | Must be a JSON object with keys matching [PHASE_TAXONOMY] exactly. Validate each definition is a non-empty string. Schema check required before prompt assembly. |
[TURN_DELIMITER] | String pattern separating individual turns in the transcript | "\n\n" or "---" | Must be a non-empty string. Validate that splitting [TRANSCRIPT] by this delimiter produces the expected turn count. Reject if delimiter not found in transcript. |
[SPEAKER_PREFIXES] | Prefixes identifying speaker roles in each turn | ["USER:", "AGENT:"] | Must be a JSON array of strings. Validate each turn in [TRANSCRIPT] starts with one of these prefixes. Reject if unknown speaker prefix detected. |
[OUTPUT_SCHEMA] | Expected JSON structure for phase boundaries | {"phases": [{"phase_label": "string", "start_turn_index": 0, "end_turn_index": 3, "transition_justification": "string"}]} | Must be a valid JSON Schema object. Validate that required fields include phase_label, start_turn_index, end_turn_index, and transition_justification. Reject if schema allows overlapping turn ranges. |
[MAX_PHASES] | Upper bound on number of phases to prevent over-segmentation | 8 | Must be a positive integer. Validate that value is less than or equal to total turn count in [TRANSCRIPT]. Reject if set to 0 or exceeds reasonable segmentation granularity for transcript length. |
[GOLD_ANNOTATIONS] | Optional human-annotated phase boundaries for evaluation | null or {"phases": [...]} | If provided, must match [OUTPUT_SCHEMA] structure. Validate no overlapping turn ranges. Use for boundary accuracy scoring against model output. Null allowed when running without evaluation. |
Implementation Harness Notes
How to wire the Conversation Phase Segmentation Prompt into an analytics pipeline or audit workflow.
This prompt is designed for offline or batch processing of completed transcripts, not for real-time chat. The primary integration point is a post-conversation analytics pipeline where transcripts are stored and ready for structured analysis. The harness must accept a full transcript as input, invoke the LLM with the segmentation prompt, validate the returned phase boundaries, and store the structured output for downstream consumption by audit tools, conversation intelligence dashboards, or compliance review systems. Because the output is used for audit and analytics rather than live user-facing decisions, the implementation can tolerate higher latency in exchange for higher accuracy and consistency checks.
The implementation should wrap the prompt in a processing function that enforces a strict output contract. After receiving the LLM response, parse the JSON and validate that: (1) every turn index in the transcript is assigned to exactly one phase, (2) phase boundaries are monotonically increasing and cover the full transcript range, (3) phase labels come from a predefined taxonomy you supply in [PHASE_TAXONOMY], and (4) each transition includes a non-empty justification string. If validation fails, implement a retry loop (up to [MAX_RETRIES]) that re-submits the prompt with the validation errors appended as feedback. Log every validation failure and retry attempt for later analysis of prompt brittleness. For high-stakes audit use cases, route transcripts that fail validation after all retries to a human review queue rather than silently accepting malformed output.
Model selection matters for this task. Use a model with strong instruction-following and JSON output capabilities, and prefer models that support structured output modes or JSON mode to reduce parsing failures. If your transcript exceeds the model's context window, you must pre-process it by splitting the transcript into overlapping chunks, running segmentation on each chunk independently, and then reconciling boundary conflicts in a post-processing merge step. The merge step should resolve disagreements at chunk boundaries by preferring the segmentation from the chunk that contains more surrounding context for the disputed turn. Store the final output with metadata including the model version, prompt version, timestamp, and validation status so that downstream audit queries can trace any segmentation decision back to its source conditions.
Expected Output Contract
Defines the exact structure, types, and validation rules for the Conversation Phase Segmentation Prompt response. Use this contract to parse the model output, validate correctness, and detect malformed responses before downstream ingestion.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
segments | Array of objects | Must be a non-empty array. Each element must conform to the segment object schema defined in subsequent rows. | |
segments[].turn_range | Object with start_turn and end_turn integers | start_turn must be >= 1. end_turn must be >= start_turn. Ranges must not overlap between segments. All turn indices must be covered from the first to the last turn of the input transcript. | |
segments[].phase_label | String from a predefined taxonomy | Must match one of the labels in the provided [PHASE_TAXONOMY] exactly. Case-sensitive check required. Reject unknown labels. | |
segments[].transition_justification | String | Must be non-empty and contain a direct reference to at least one turn index or user utterance that triggered the phase change. Null or empty string is a failure. | |
segments[].confidence_score | Float between 0.0 and 1.0 | Must be a valid float. Values outside the 0.0-1.0 range are invalid. If the model cannot provide a score, the parser should default to null and flag for human review. | |
segments[].key_topics | Array of strings | If present, each string must be non-empty. An empty array is allowed to represent no dominant topic. Null is allowed if the field is omitted entirely. | |
segments[].unresolved_items | Array of strings | If present, each string must describe an open question or incomplete task from the segment. Null is allowed. An empty array means no unresolved items were detected. | |
metadata.phase_taxonomy_version | String | If present, must match the version identifier of the [PHASE_TAXONOMY] provided in the prompt. A mismatch triggers a warning and potential re-run with a corrected prompt. |
Common Failure Modes
Conversation phase segmentation prompts fail in predictable ways. These cards cover the most common production failure modes and how to guard against them before they corrupt your analytics pipeline.
Boundary Drift on Gradual Transitions
What to watch: The model places phase boundaries too late when topics shift gradually across multiple turns. Subtle transitions like moving from problem description to solution exploration get merged into a single phase, producing inaccurate analytics. Guardrail: Include few-shot examples of gradual transitions with explicit boundary markers. Add a secondary check that asks the model to identify the first turn where the dominant intent changed, not just where the new phase is fully established.
Over-Segmentation of Clarification Turns
What to watch: The model treats every clarification question or follow-up as a new phase boundary, fragmenting coherent multi-turn exchanges into dozens of micro-phases. A simple back-and-forth to confirm a detail becomes three separate phases. Guardrail: Define a minimum phase length constraint in the prompt. Instruct the model that clarification turns within the same intent should be absorbed into the parent phase. Validate output by checking that adjacent phases have distinct intent labels, not just different surface wording.
Inconsistent Phase Labeling Across Sessions
What to watch: The same conversation structure gets labeled with different phase names across runs. One run labels a segment as 'troubleshooting' while another labels an identical pattern as 'diagnosis,' breaking downstream aggregation and reporting. Guardrail: Provide a closed taxonomy of allowed phase labels with definitions and examples. Use structured output with enum validation on the phase label field. Run consistency checks by prompting the same transcript multiple times and measuring label agreement.
Missing Phase Transitions at Explicit Markers
What to watch: The model misses obvious phase transitions signaled by explicit user language like 'okay that's fixed, now I need help with billing.' These high-confidence boundary signals get absorbed into the prior phase because the model overweights topical continuity. Guardrail: Add a pre-processing step that flags explicit transition phrases before segmentation. Include examples in the prompt where explicit verbal markers override topical similarity. Evaluate boundary recall specifically on turns containing known transition phrases.
Context Window Truncation Artifacts
What to watch: Long transcripts that exceed context windows get truncated mid-conversation, producing phase boundaries at arbitrary cut points rather than genuine transitions. The model hallucinates a phase label for the partial segment at the end. Guardrail: Implement chunked processing with overlap windows. Require the model to output a truncated flag when it cannot see the full conversation. Validate that the final phase boundary in any output aligns with a natural transition point, not the end of the input window.
Cross-Talk Contamination in Multi-Participant Transcripts
What to watch: In transcripts with multiple speakers, the model segments based on speaker changes rather than topic changes. A handoff between agents within the same phase gets labeled as a phase boundary, inflating transition counts. Guardrail: Instruct the model to segment on intent and topic shifts, not speaker identity. Include multi-participant examples in few-shot prompts where speaker changes do not trigger phase boundaries. Validate by comparing segmentation against single-speaker versions of the same conversation content.
Evaluation Rubric
Use this rubric to evaluate Conversation Phase Segmentation output against human-annotated gold sets. Each criterion targets a specific failure mode observed in production phase detection systems.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Boundary Index Accuracy | Predicted phase boundary turn indices match gold annotations within ±1 turn tolerance for 90% of boundaries | Systematic offset >2 turns from gold boundaries or missed boundaries on clear topic shifts | Compute Jaccard similarity between predicted boundary indices and gold boundary indices across test set; flag conversations with similarity <0.85 |
Phase Label Agreement | Predicted phase labels match gold labels for 85% of segments when boundary alignment is within tolerance | Consistent label confusion between similar phases (e.g., troubleshooting vs diagnosis) or generic label overuse | Build confusion matrix from aligned segments; calculate Cohen's kappa against gold labels; investigate label pairs with kappa <0.7 |
Transition Justification Quality | Justification text identifies the specific user utterance or assistant action that triggered the phase change in 80% of transitions | Vague justifications (e.g., 'topic changed') without citing evidence or justifications that reference future turns not yet spoken | Human reviewer rates 100 random transition justifications on 1-5 scale for evidence grounding; pass if mean score ≥4.0 |
Over-Segmentation Rate | Fewer than 10% of gold single-phase segments are split into multiple predicted phases | Predicted phase count exceeds gold phase count by >20% on same conversation; rapid oscillation between phases within one topic | Count predicted phases per conversation; flag conversations where predicted_count > 1.2 * gold_count; review for flickering on clarification turns |
Under-Segmentation Rate | Fewer than 10% of gold multi-phase segments are merged into a single predicted phase | Predicted phase count is less than 80% of gold phase count; gradual topic drift goes undetected across >5 turns | Count predicted phases per conversation; flag conversations where predicted_count < 0.8 * gold_count; review for missed drift on gradual shifts |
Consistency Across Similar Conversations | Phase segmentation of two conversations following the same workflow produces boundary indices within ±2 turns of each other for 90% of equivalent transitions | Same workflow type produces wildly different phase counts or boundary placements across similar transcripts | Pair conversations by workflow template; compute variance of phase count and mean boundary position; flag pairs with count difference >2 or mean boundary offset >3 turns |
Small Talk Resilience | Social turns, greetings, and off-topic digressions do not trigger phase boundaries in task-oriented segments | Greeting or sign-off turns classified as phase transitions; small talk within a task phase causes boundary insertion | Inject small talk turns into gold-annotated transcripts; measure false boundary rate on injected turns; pass if <5% of small talk turns trigger boundaries |
Correction Turn Handling | User correction turns (e.g., 'no, I meant...') within a phase do not trigger new phase boundaries unless they represent a genuine topic reset | Every user correction creates a new phase; correction cascades produce multiple spurious boundaries | Identify correction turns in gold set; measure boundary insertion rate on correction turns; pass if <15% of corrections trigger boundaries when gold shows no phase change |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a small set of phase labels and relaxed output validation. Focus on getting boundary detection logic right before adding schema constraints. Start with a short transcript and manually verify the phase boundaries.
Prompt modification
- Reduce the phase taxonomy to 3-5 broad categories instead of a full domain-specific taxonomy.
- Remove strict JSON schema requirements; accept a simple list of
[turn_index, phase_label, brief_reason]. - Add a fallback instruction:
If uncertain about a boundary, mark it as [UNCLEAR] and continue.
Watch for
- Over-segmentation on short transcripts where every turn becomes its own phase.
- Missing transitions when the conversation drifts gradually rather than shifting abruptly.
- The model inventing phase labels not in your provided taxonomy.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us