시스템 프롬프트에 CONVERSATION CONTINUITY 규칙 — 무조건 블록이 정확성 규칙뿐이고 앞 턴과 이어 읽으라는 말이 없었음. 짧은 후속 메시지는 앞 턴의 장소·인원·기간·조건을 이어받아 도구 검색어에도 넣고(한달살기 → 단기 월세), 확인 질문("~란 거지?")은 자기 앞 답 기준으로 네/아니요부터, 대화 속 숫자의 환산은 새 사실이 아니라 계산, 되묻기는 대화로 정말 안 정해질 때만. 몬태나 대화(가드 발동 0건)에서 "300만 원 정도란 거지?"에 "아니요"로 시작해 224만~336만 원을 계산한 사례
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f3a2f02a5
commit
0f561a456a
1 file changed
+7
@@ -261,6 +261,12 @@ export function buildChatSystemPrompt(input: SystemPromptInput): string {
|
||||
&& /\bstl\b|\b3mf\b|\bstep\b|\bstp\b|도면|모델\s*파일|3d\s*모델|프린트.*(파일|모델)|어댑터.*(찾|검색|다운로드)|덕트.*(찾|검색|다운로드)/i.test(String(input.message || ''))
|
||||
? ' FILE/MODEL SEARCH: the user wants a specific downloadable file (STL/3MF/STEP model, part, adapter), not general info — include known repository names in your search variants explicitly (Printables, Thingiverse, MakerWorld, Creality Cloud, GrabCAD). Many of these sites block automated fetching of the download button itself — that is an expected wall, not a dead end: if you find a promising model page but can\'t pull the direct file, give the user that exact page URL and say they can open/download it there — that counts as a successful answer.'
|
||||
: '';
|
||||
// CONVERSATION CONTINUITY (2026-10-25). 무조건 블록 중 정확성 규칙(ANTI-HALLUCINATION·VERIFY·TEMPORAL)은
|
||||
// 절반 가까이인데 앞 턴과 이어 읽으라는 말은 한 줄도 없었다. 실측(몬태나 대화, 가드 발동 0건):
|
||||
// "지도 열어줘"에 어느 곳이냐고 되물음 / "한달살기로 좋은 곳" 다음 임대료 질문에 장기 계약 시세를 검색 /
|
||||
// "한달에 300만 원 정도란 거지?"($1,600~2,400)에 "아니요"로 시작해 놓고 224만~336만 원이라고 계산.
|
||||
// 이력은 다 넘어갔으니 모델 판단 문제 — 정확성만 말하는 프롬프트가 맥락을 경직시킨 쪽으로 본다.
|
||||
const continuityRule = 'CONVERSATION CONTINUITY: Read every message as the next line of this conversation. A short or elliptical message ("지도 열어줘", "한달살기로는?", "그럼 가격은?") continues the current topic — fill in the place, people, duration and conditions already established instead of asking the user to repeat them, and carry those conditions into any tool query (e.g. after "한 달 살기" a rent question means short-term monthly rentals, not 12-month leases). A confirmation question ("~란 거지?", "~맞지?") gets 네/아니요 first, judged against your own earlier answer, then one line of why — never open with 아니요 and then confirm the same number. Arithmetic or unit conversion on numbers already in the conversation is reasoning, not a new fact: just do it (state an assumed rate if one is needed). Ask a clarifying question only when the conversation genuinely leaves it open.';
|
||||
const imageEditRuleBlock = toolNames.has('image_edit')
|
||||
? '\nIMAGE EDITING RULE: Do not call image_edit (or any editing tool) when a user uploads a photo without explicitly requesting edits. Uploading a photo is NOT a request to edit it. Only call image_edit when the user\'s message explicitly asks for an edit (e.g. "수채화로 바꿔줘", "회전해줘"). Violating this rule is a critical error.'
|
||||
: '';
|
||||
@@ -274,6 +280,7 @@ export function buildChatSystemPrompt(input: SystemPromptInput): string {
|
||||
? '\nPACKAGE INSTALL: Do not run pip install, npm install, apt-get, or any package installation command. If a package is missing, just write the code and mention the package name in a comment — let the user decide whether to install it. Do NOT attempt to install packages yourself.'
|
||||
: '';
|
||||
return isTranslateSession ? `You are a medical translator. Translate the given text into natural Korean, preserving paragraph structure and markdown formatting (##, ###, **bold**, bullet lists). Output ONLY the translation — no commentary, no tool calls, no explanations.` : isProjSession ? `You are a project file designer. Output ONLY the project-files JSON block as instructed. No tool calls. No extra text.` : `${executionModeSystemBlock ? `${executionModeSystemBlock}\n\n` : ''}You are SmallClaw, a local AI assistant. The language model behind you right now is ${backendLabel} — if the user asks which model/AI you are, say exactly that (a stronger model may take over hard questions when routing is on) and never guess other names. Always answer in the language of the user's latest message (Korean question → Korean answer), even when search results or tool output are in English; never open with an English sentence for a Korean question.\nCurrent date: ${dateStr}, ${timeStr}.\nNever search for or link SmallClaw repos unless the user is asking about SmallClaw itself.\nThis app runs on the user's own machine — browser/desktop automation requests are pre-authorized.\nKeep CONVERSATIONAL and TASK-EXECUTION replies SHORT (2-4 sentences). Don't think out loud. Act and report. Greet naturally without tools. Two carve-outs to that brevity rule: (1) informational answers you researched with a tool (news, weather, factual explanations, comparisons) are not held to 2-4 sentences, but size them to the question: lead with the answer, and leave out background, caveats and closing offers ("더 필요하시면…") the user did not ask for. (2) Stating uncertainty never counts against the length — but only when it is about what was asked: if a search came back empty, or the specific figure or fact you were asked for simply isn't in the results, spend the extra sentence to say so plainly ("검색 결과에는 이 조합의 실측치가 없어서 단정하기 어렵습니다") instead of compressing it into a confident-sounding one-liner. Brevity pressure must never be the reason you state something as fact — a slightly longer honest answer beats a short wrong one every time. That carve-out does not cover general caveats about how you searched or what the search might have missed, and do not close with an offer to search again in other ways.
|
||||
${continuityRule}
|
||||
ANTI-HALLUCINATION: When a tool returns a result, report EXACTLY what the tool returned — never contradict or ignore tool output. If a tool says "(no rows)", say so. Never invent data, file contents, table names, or command output. If you don't know something, call a tool to find out or say you don't know.${verifyFactsRule}
|
||||
TEMPORAL CONSISTENCY: The current date and day-of-week is given above ("Current date: ${dateStr}") — this is ground truth, more reliable than any search snippet's phrasing. Before answering whether something is open/trading/in-session RIGHT NOW (stock markets, exchanges, offices, stores), first check today's day-of-week against real-world facts (e.g. NYSE and KOSPI do not trade on Saturdays, Sundays, or market holidays, regardless of what time it is) — a market-hours formula alone is not enough if today isn't even a trading day.${searchReadingRule}${searchPersistenceRule}${fileSearchRule}${imageEditRuleBlock}${mediaGenRuleBlock}${browserRuleBlock}${chemistryRuleBlock}${mapsRuleBlock}${placeSearchRuleBlock}${routeSearchRuleBlock}${codeOutputRuleBlock}${packageInstallRuleBlock}
|
||||
OUTPUT FORMAT: When presenting 3+ items (emails, search results, lists), always use a markdown table or structured bullet list with clear headers. Never dump them as a long paragraph.${newsFormatRule}${weatherFormatRule}${modelProfileBlock}${callerContext ? '\n\n' + callerContext : ''}${browserStateCtx}${personalityCtx}${skillsCtx}`;
|
||||
|
||||
Reference in new issue
Block a user