diff --git a/ideas/250909_로빙_검색_API_통합_전략.md b/ideas/250909_로빙_검색_API_통합_전략.md index b418f50..d284e2f 100644 --- a/ideas/250909_로빙_검색_API_통합_전략.md +++ b/ideas/250909_로빙_검색_API_통합_전략.md @@ -19,21 +19,17 @@ - **Exa API**: 심층 분석용 (유료) - **SearxNG**: 자체 호스팅 폴백 -## 2. 쿼리 라우팅 규칙 +## 2. 의도 분석 현황 & 라우팅 + +현재 intent_analyzer.py는 LLM으로 명령어 변환(/news, /digest)만 수행, 미사용 상태. +검색 의도 추가: LLM 프롬프트에 "검색 요청은 /search로" 또는 직접 패턴 매칭. ```python -class QueryRouter: - def route(self, query, query_type): - if query_type == 'fact': - return 'duckduckgo' # 즉답형 - elif query_type == 'general': - return 'tavily' # 기본 - elif query_type == 'navigational': - return 'serper' # Google SERP - elif query_type == 'deep_research': - return 'exa' # 심층 분석 - else: - return 'brave' # 다양성 보완 +# rb8001/app/services/search_service.py +def route_by_pattern(query): + if "뉴스" in query: return 'news_api' + if "언제" in query: return 'duckduckgo' # 즉답 + return 'tavily' # 기본 검색 ``` ## 3. 구현 아키텍처