diff --git a/src/gateway/chat/handle-chat.ts b/src/gateway/chat/handle-chat.ts index df78452..57958b5 100644 --- a/src/gateway/chat/handle-chat.ts +++ b/src/gateway/chat/handle-chat.ts @@ -962,7 +962,7 @@ async function handleChat( // also explains why weather routing behaved erratically: the model was calling blind. messages.push({ role: 'user', - content: `Reminder: this needs live/current data. Call a tool first (${_availableGroundingHint}) before writing anything. Do NOT answer from memory or training data.${newsRequest ? ' If this message names a specific topic, pass it as news_search\'s query param (a country or region such as "남미"/"유럽" is not a topic — pass its country codes as country instead); otherwise (a bare "뉴스"/"news" request) call news_search several times across different categories (e.g. "top", "business", "technology", "world", "sports") rather than a single bare no-category call — a lone bare call tends to return only 4-5 stories clustered around 1-2 dominant topics; spanning categories like this builds a well-rounded ~8-10 item digest. Do NOT default to unrelated topics from earlier in this conversation unless the user explicitly asks for updates on them.' : ''}${disasterRequest ? ` This question likely has two parts — where the storm/event currently is, and what damage/impact it's causing — and one tool rarely covers both. For CURRENT POSITION/TRACK of a typhoon, call weather_map_screenshot if available (it captures the real KMA/JMA forecast-track map — the exact literal URL is documented in that tool's own schema, do not guess a URL). For DAMAGE/IMPACT/human toll, prefer news_search (query: the event name, e.g. "태풍 돌핀") over web_search — it guarantees real publish dates instead of stale/generic pages. If you do use web_search for either part, do NOT default to a generic "현재 위치/실시간 정보" query; use situational keywords instead (e.g. "태풍 돌핀 상륙 피해", "지진 피해 현황") — those match actual news coverage, while location-lookup phrasing tends to surface blank reference portals. If the first attempt returns thin/generic results, that means the query was wrong, not that nothing is happening — retry with sharper keywords before concluding the event has ended.` : ''}`, + content: `Reminder: this needs live/current data. Call a tool first (${_availableGroundingHint}) before writing anything. Do NOT answer from memory or training data.${newsRequest ? ' If this message names a specific topic, pass it as news_search\'s query param (a country or region such as "남미"/"유럽" is not a topic — pass its country codes as country instead); otherwise (a bare "뉴스"/"news" request) call news_search ONCE with just the country and no category — the tool itself picks the front page or the major politics/economy stories, and extra calls with other categories only return the same list. Do NOT default to unrelated topics from earlier in this conversation unless the user explicitly asks for updates on them.' : ''}${disasterRequest ? ` This question likely has two parts — where the storm/event currently is, and what damage/impact it's causing — and one tool rarely covers both. For CURRENT POSITION/TRACK of a typhoon, call weather_map_screenshot if available (it captures the real KMA/JMA forecast-track map — the exact literal URL is documented in that tool's own schema, do not guess a URL). For DAMAGE/IMPACT/human toll, prefer news_search (query: the event name, e.g. "태풍 돌핀") over web_search — it guarantees real publish dates instead of stale/generic pages. If you do use web_search for either part, do NOT default to a generic "현재 위치/실시간 정보" query; use situational keywords instead (e.g. "태풍 돌핀 상륙 피해", "지진 피해 현황") — those match actual news coverage, while location-lookup phrasing tends to surface blank reference portals. If the first attempt returns thin/generic results, that means the query was wrong, not that nothing is happening — retry with sharper keywords before concluding the event has ended.` : ''}`, }); // 주제어가 앞 턴에 있고 이번 턴엔 명사구만 남은 후속 질문("올라마 클라우드 모델은?")도 같은 // 리마인더를 받아야 한다 — 대화가 깊어질수록 모델이 기억으로 답하기 쉬워지는데, 정작 그때 @@ -1921,7 +1921,7 @@ async function handleChat( ? 'the news_search tool (NOT web_search)' : 'the web_search tool'; const scopeHint = newsRequest - ? ' If this message names a specific topic, pass it as news_search\'s query param (a country or region such as "남미"/"유럽" is not a topic — pass its country codes as country instead); otherwise (a bare "뉴스"/"news" request) call news_search several times across different categories (e.g. "top", "business", "technology", "world", "sports") rather than a single bare no-category call — a lone bare call tends to return only 4-5 stories clustered around 1-2 dominant topics; spanning categories like this builds a well-rounded ~8-10 item digest. Do NOT default to unrelated topics from earlier in this conversation unless the user explicitly asks for updates on them.' + ? ' If this message names a specific topic, pass it as news_search\'s query param (a country or region such as "남미"/"유럽" is not a topic — pass its country codes as country instead); otherwise (a bare "뉴스"/"news" request) call news_search ONCE with just the country and no category — the tool itself picks the front page or the major politics/economy stories, and extra calls with other categories only return the same list. Do NOT default to unrelated topics from earlier in this conversation unless the user explicitly asks for updates on them.' : disasterRequest ? ' Pass the event name as news_search\'s query param (e.g. "태풍 돌핀"). If you must use web_search instead, use situational keywords ("...상륙 피해", "...대피") rather than a generic "현재 위치/실시간 정보" query — the latter tends to surface blank reference portals instead of actual coverage.' : ''; diff --git a/src/tools/news.ts b/src/tools/news.ts index c1adb4d..4afc387 100644 --- a/src/tools/news.ts +++ b/src/tools/news.ts @@ -294,7 +294,7 @@ export const newsSearchTool = { return { success: true, data: { source: 'front-page-rss', country, count: headlines.length }, - stdout: `[주요 매체 1면 — 편집자가 선별한 톱기사]\n\n${formatHeadlines(headlines)}`, + stdout: `[주요 매체 1면 — 편집자가 선별한 톱기사. 이 목록이 답이다 — 다른 분류로 다시 부르지 말 것]\n\n${formatHeadlines(headlines)}`, }; } // 피드가 전부 실패하면 아래 NewsData 경로로 그대로 내려간다.