fix: news_search 쿼리 설명 정정 — 커버리지 문제 아니라 구문 매칭 문제였음
이전 커밋에서 "country 파라미터 누락이 원인"이라 진단했는데, 사용자가
"국내 사이트로 검색하면 쏟아질 텐데?"라고 반박해서 NewsData.io API를
직접 여러 조합으로 호출해 재검증했다:
q="태풍 돌핀"+country=kr → 0건
q="태풍"+country=kr → 12건 (돌핀 기사 포함)
q="돌핀"+country=kr → 5건 (전부 관련 기사)
실제 원인은 country 누락이 아니라 **일반 카테고리어("태풍")와 고유명사
("돌핀")를 한 쿼리에 붙여 쓴 것**이었다. 실제 기사 제목은 "태풍 '돌핀'"
처럼 따옴표가 끼어 있어 "태풍 돌핀"이라는 연속 문자열과 리터럴 매칭이
안 됐다. 이전 커밋의 country 안내 자체는 여전히 유효하지만(비영어
쿼리엔 필요), 그것만으론 이 사고를 설명 못 했다.
query 파라미터 설명에 실제 API 호출로 검증한 세 가지 결과를 근거로
"특정 개체/사건이 있으면 카테고리어와 합치지 말고 그 이름 하나만
쓸 것"이라는 지침을 추가했다.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -828,7 +828,7 @@ export function createBuildTools(isOrchestrationSkillEnabled: () => boolean) {
|
||||
parameters: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
query: { type: 'string', description: 'Optional keyword/topic filter (e.g. "economy", "South America"). Omit for general top headlines. IMPORTANT: this is matched literally against article text, not translated — for a broad "top news for this country/region" request with no specific topic, do NOT pass the user\'s original-language request text as query (e.g. a Korean phrase will match zero articles in a country whose news is written in English/Polish/etc). Omit query in that case and rely on country/category alone. Real incident 2026-08-10: query="태풍 돌핀" (Korean, specific topic) with country omitted returned "(no articles found)" for a story that had 6+ Korean outlets covering it that same day — the query text was Korean but the search pool defaulted to a mostly-English index with no country/language filter to scope it. If your query text is non-English, ALWAYS also pass country (e.g. "kr" for Korean) so it searches that language\'s sources — a bare non-English query with no country/language set is a near-guaranteed empty result even for major breaking news.' },
|
||||
query: { type: 'string', description: 'Optional keyword/topic filter (e.g. "economy", "South America"). Omit for general top headlines. IMPORTANT: matched literally against article text, not translated — for a broad "top news for this country/region" request with no specific topic, do NOT pass the user\'s original-language request text as query (e.g. a Korean phrase will match zero articles in a country whose news is written in English/Polish/etc). Omit query in that case and rely on country/category alone. If your query text is non-English, ALWAYS also pass country (e.g. "kr" for Korean) so it searches that language\'s sources. SECOND pitfall, verified 2026-08-09/10 by calling the live API directly: even WITH country set, combining a generic category word with a specific proper noun in one query — e.g. query="태풍 돌핀" (typhoon + the storm\'s name) — returned ZERO results for a story 10+ Korean outlets were actively covering that same day, because the literal text matched was "태풍 \'돌핀\'" (quote marks around the name) in real headlines, not the exact contiguous phrase "태풍 돌핀". query="돌핀" alone (just the proper noun, no category word) correctly returned 5 relevant articles; query="태풍" alone (just the category word) also worked (12 results, mostly about the same storm during typhoon season). When a specific named entity/event exists, query with JUST that name — do not prefix or combine it with a generic category word in the same string.' },
|
||||
country: { type: 'string', description: 'Optional ISO 3166-1 alpha-2 country code, e.g. "kr" (Korea), "us", "br" (Brazil), "jp". Comma-separated list for multiple countries, MAX 5 (e.g. "de,fr,gb,it,es"); extras beyond 5 are dropped, not an error. There is NO code for continents/regions ("eu"/"europe" will error with "country does not exist") — for a regional request (e.g. "Eastern Europe"), pass up to 5 country codes for that region instead (e.g. "pl,cz,hu,ro,sk" for Eastern Europe). Omit country entirely for worldwide.' },
|
||||
language: { type: 'string', description: 'Optional ISO 639-1 language code, e.g. "ko", "en". IGNORED whenever country is also set — only pass language when country is omitted.' },
|
||||
category: { type: 'string', description: '"business"|"entertainment"|"environment"|"food"|"health"|"politics"|"science"|"sports"|"technology"|"top"|"tourism"|"world". "world" is IGNORED when country is also set — for a specific country\'s news, omit category or use "top"/"politics"/etc. instead.' },
|
||||
|
||||
Reference in New Issue
Block a user