Construct prompt: Request the model to extract all transitional, tonal, and filler phrases without substantial reasoning content, return a JSON array in original text order, with each element being a verbatim copy of the string.
(think_text: str)
| 84 | |
| 85 | |
| 86 | def build_prompt(think_text: str) -> str: |
| 87 | """ |
| 88 | Construct prompt: Request the model to extract all transitional, tonal, and filler phrases without substantial reasoning content, |
| 89 | return a JSON array in original text order, with each element being a verbatim copy of the string. |
| 90 | """ |
| 91 | return f"""You are a text analysis expert. |
| 92 | |
| 93 | Task: |
| 94 | Extract all spans of text that are **transitional, filler, or tone-setting phrases** |
| 95 | |
| 96 | --- |
| 97 | |
| 98 | ### What to extract |
| 99 | Include phrases or sentences that: |
| 100 | - Express hesitation, tone, or attitude (e.g., "well", "okay", "so", "let’s see", "I think") |
| 101 | - Indicate transition or setup (e.g., "to begin with", "in this case", "for example", "but if") |
| 102 | - Serve as narration or connection, not analysis |
| 103 | |
| 104 | Do **not** include: |
| 105 | - Actual reasoning, deduction, or explanation |
| 106 | - Code or formula descriptions |
| 107 | - Problem-solving steps |
| 108 | |
| 109 | --- |
| 110 | |
| 111 | ### Output format (STRICT JSON) |
| 112 | Return a JSON array of strings, e.g.: |
| 113 | |
| 114 | ["<span 1>", "<span 2>", ...] |
| 115 | |
| 116 | Rules: |
| 117 | 1. Each span must be **copied verbatim** from the original text. |
| 118 | 2. Preserve order of appearance. |
| 119 | 3. If there are none, return an **empty list**: `[]` |
| 120 | 4. Output **only** the JSON array — no explanation or extra text. |
| 121 | |
| 122 | --- |
| 123 | <input_text> |
| 124 | {think_text} |
| 125 | </input_text> |
| 126 | """ |
| 127 | |
| 128 | |
| 129 |