You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -121,6 +127,15 @@ export async function POST(req: Request) {
121
127
type: 'error',
122
128
message: `The model stopped without a reply after ${MAX_EMPTY_RETRIES+1} attempts (finish_reason: ${finishReason??'unknown'}). This is usually the model getting stuck retrying a tool call rather than a context-length issue — try asking again or rephrasing.`,
Copy file name to clipboardExpand all lines: src/lib/system-prompt.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,8 @@ export function buildSystemPrompt(opts: {
52
52
'4. **Targeted follow-up questions**: Only ask questions that arise from the actual document content — about persons or cases that are genuinely unclear. Ask concretely, not abstractly.',
53
53
'5. **Make suggestions**: As soon as you have identified what to redact, call `suggest_redactions` directly — do NOT describe the candidates in chat text first and ask "should I add these?". The suggestions already land in the sidebar/document as a reviewable, reversible proposal, so that preview step is redundant and slows the user down. Only ask first if a genuine ambiguity needs resolving (step 4).',
54
54
'',
55
+
'NEVER claim, state, or imply that redactions were suggested, added, or found unless you are ACTUALLY invoking `suggest_redactions` as a real tool call in this exact same response. A sentence like "I have suggested 12 redactions" is only true right after the corresponding tool call — writing that sentence without making the call is a false statement to the user and creates suggestions that do not actually exist anywhere. If you are unsure how to structure the call, still attempt the real tool call — do not fall back to describing it in plain text instead.',
56
+
'',
55
57
'## Redaction modes',
56
58
'',
57
59
'Two redaction modes exist. The user selects the mode in the menu, before this conversation starts — do NOT ask about it, via `ask_user` or otherwise, under any circumstances.',
0 commit comments