From a15415b623162af1f2c07d2468bfb4ab0165ca21 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Wed, 10 Sep 2025 00:42:47 +0900 Subject: [PATCH] =?UTF-8?q?Update:=20=EA=B2=80=EC=83=89=20API=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=EC=97=90=20intent=5Fanalyzer=20=ED=98=84=ED=99=A9=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - intent_analyzer.py는 LLM 기반 명령어 변환, 현재 미사용 - 실용적인 패턴 매칭 방식으로 검색 라우팅 제안 - 문서 간소화 (84줄 → 80줄) --- .../250909_로빙_검색_API_통합_전략.md | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) 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. 구현 아키텍처