From 6942ac0681eadb3d8a460e56f9bdd2ebf178a9d6 Mon Sep 17 00:00:00 2001 From: Jer Miller Date: Sun, 22 Feb 2026 22:21:58 -0700 Subject: [PATCH] Simplify segmentation prompt with mechanical rules for flash model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace abstract topic-detection instructions with concrete steps a flash model can follow: divide total lines by 100 for segment count, space evenly, adjust to nearest speaker change. Tested against 23-page timestamp-free meeting transcript — produces 14 well-distributed segments. Co-Authored-By: Claude Opus 4.6 --- think/detect_transcript_segment.md | 51 ++++++++++++------------------ 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/think/detect_transcript_segment.md b/think/detect_transcript_segment.md index 22625f7ea..da13edf41 100644 --- a/think/detect_transcript_segment.md +++ b/think/detect_transcript_segment.md @@ -4,33 +4,24 @@ tier: 2 label: Segmentation group: Import --- -You are a transcript analyzer that splits transcripts into ~5-minute segments. - -TASK: Find segment boundaries and return their line numbers with absolute time-of-day timestamps. - -INPUT FORMAT: -- First line: "START_TIME: HH:MM:SS" - the absolute start time of this transcript -- Remaining lines: Transcript with line numbers prepended as "N: content" - -OUTPUT FORMAT: -- JSON array of objects with "start_at" and "line" fields -- "start_at": Absolute time-of-day in HH:MM:SS format -- "line": Line number where this segment begins -- Example: [{"start_at":"12:00:00","line":1},{"start_at":"12:05:23","line":42}] - -SEGMENTATION MODES: - -1. **Timestamped transcripts** — if the text contains timestamps (relative like 00:05:30 or absolute like 14:30:22), use them to find boundaries near 5-minute intervals. Convert relative timestamps by adding to START_TIME. - -2. **Timestamp-free transcripts** — if the text has NO timestamps (e.g. just speaker labels and dialogue), segment by **topic and conversation shifts** instead: - - Find natural break points where the conversation changes subject - - Estimate time from position: assume ~130 words/minute speaking rate, calculate total duration from word count, then assign proportional timestamps from START_TIME - - Aim for segments roughly 5 minutes of estimated speaking time, but prioritize clean topic breaks over exact intervals - - NEVER distribute lines uniformly — segments should vary in size based on where topics actually change - -REQUIREMENTS: -1. First segment always starts at START_TIME on line 1 -2. All output times must be absolute HH:MM:SS -3. Every transcript gets multiple segments unless it is extremely short (under ~2 minutes estimated) - -RESPONSE: Return only the JSON array, no additional text. +Split a transcript into ~5-minute segments. + +INPUT: +- First line: "START_TIME: HH:MM:SS" +- Remaining lines: numbered "N: content" + +OUTPUT: JSON array of {"start_at": "HH:MM:SS", "line": N} + +RULES: +1. First segment is always {"start_at": START_TIME, "line": 1} +2. If the transcript has timestamps, use them to find ~5-minute boundaries. Add relative timestamps (00:05:30) to START_TIME to get absolute times. +3. If the transcript has NO timestamps, follow these steps: + a. Count the total lines in the transcript + b. Divide by 100 to get the number of segments (round up, minimum 2) + c. Space segments roughly evenly by line count + d. Adjust each boundary to the nearest topic or speaker change + e. Space the "start_at" times evenly across 5 minutes per segment from START_TIME +4. All "start_at" times must be absolute HH:MM:SS +5. Do NOT put boundaries in the middle of someone speaking + +Return only the JSON array. -- 2.51.2