Smart Search - Intelligent Search Routing
Automatically route queries to the most appropriate search service using keyword-based priority rules.
Quick Reference
| Priority |
Service |
Trigger Keywords |
Token/Count |
| P0 |
Exa |
code, API, function, framework, library, tutorial, syntax |
5000 |
| P1 |
Metaso |
paper, research, study, journal, thesis, academic |
10 |
| P2 |
Brave |
today, this week, latest, recent, news |
10 |
| P3 |
Bocha |
中文, 国内, 百科, Chinese content |
18 |
| P4 |
GitHub |
github, repo, issue, PR, commit, branch |
10 |
| P5 |
Zai MCP |
image, video, screenshot, OCR, analyze picture |
N/A |
| P6 |
Fetch |
http://, https:// (direct URL) |
5000 |
| P7 |
Brave |
(default fallback) |
10 |
| P8 |
Exa |
English technical docs |
3000 |
Decision Flow
User Input
│
├─ Contains http:// or https:// ──────────────→ Fetch (P6)
│
├─ Image/Video/Screenshot/OCR ─────────────────→ Zai MCP (P5)
│
├─ GitHub/Repo/Issue/PR/Commit ────────────────→ GitHub MCP (P4)
│
├─ Academic/Paper/Research/Thesis ──────────────→ Metaso (P1)
│
├─ Code/API/Framework/Library ──────────────────→ Exa (P0)
│
├─ Today/Latest/News + "AI" ───────────────────→ Brave + Metaso + Top 8 digest
│
├─ 中文/国内 ───────────────────────────────────→ Bocha (P3)
│
└─ Default ─────────────────────────────────────→ Brave (P7)
Token Control
Adjust search depth based on query complexity:
| Level |
Tokens/Count |
Use Case |
| Quick |
5-10 |
Simple queries, definitions |
| Regular |
10-20 |
Common usage, examples (default) |
| Deep |
30-50 |
Multi-condition, architecture |
News Output Format (AI新闻输出格式)
When user searches for daily AI news (今日/当天 AI新闻/资讯), use Brave + Metaso combined and output:
# 今日AI资讯 Top 8
### 1. [新闻标题]
**摘要:** [新闻内容摘要,50-100字]
**来源:** [来源名](链接)
**标签:** #标签1 #标签2 #标签3
**相关性:** ★★★★★
---
### 2. [新闻标题]
**摘要:** ...
Timeliness Judgment (时效性判断)
Before including news, verify timeliness:
| Indicator |
Fresh |
Stale |
| Publish date |
Within 2 days |
Older than 7 days |
| Date string in URL |
Contains current date (2026-02-*) |
No date or old date |
| Source freshness |
News sites, blogs |
Static docs |
| Content keywords |
"今日", "最新", "just announced" |
"历史", "回顾", "总览" |
Priority: Prefer news with publish dates within 2 days. Stale news (>7 days) should be excluded.
Source attribution: Always include clickable source links.
Usage Guidelines
DO
- Analyze keywords before routing
- Implement fallback on failure (30s timeout)
- For AI news: Use Brave + Metaso combined
- Format each news item: 标题 + 摘要 + 来源 + 标签 + 相关性
- Filter to recent 2 days: exclude news older than 48 hours
- Always include clickable source links
DON'T
- Use Exa for news → Brave
- Use Metaso for code → Exa
- Include news older than 2 days in "今日" digest
- Omit source attribution for news
- Combine MCPs redundantly
Fallback Strategy
| Primary |
Fallback 1 |
Fallback 2 |
| Exa |
Brave |
Metaso |
| Metaso |
Bocha |
Brave |
| Brave |
Bocha |
Exa |
| Bocha |
Brave |
Exa |
| GitHub |
Fetch |
- |
| Fetch |
Brave |
- |
Combination Rules
Only for complementary scenarios (max 3 concurrent):
| Scenario |
Combo |
Rationale |
| AI News Digest |
Brave + Metaso |
English + Chinese comprehensive coverage |
| Technical research |
Exa + GitHub |
Code + repos |
| Deep research |
Metaso + Fetch |
Academic + content |
| Comprehensive |
Brave + Bocha |
News + Chinese |
1---2name: smart-search3description: Intelligent routing service that automatically selects the optimal search engine (Exa for code/docs, Metaso for academic, Brave for news, Bocha for Chinese, GitHub for repos, Zai for media, Fetch for URLs) based on query type. Use when users need to: (1) Search or query the web, (2) Fetch specific URL content, (3) Search GitHub repositories/issues/PRs, (4) Analyze images/videos/screenshots, (5) Get daily AI news digest, (6) Find academic papers or research.4license: Apache-2.05---67# Smart Search - Intelligent Search Routing89Automatically route queries to the most appropriate search service using keyword-based priority rules.1011---1213## Quick Reference1415| Priority | Service | Trigger Keywords | Token/Count |16|----------|---------|-----------------|-------------|17| **P0** | Exa | code, API, function, framework, library, tutorial, syntax | 5000 |18| **P1** | Metaso | paper, research, study, journal, thesis, academic | 10 |19| **P2** | Brave | today, this week, latest, recent, news | 10 |20| **P3** | Bocha | 中文, 国内, 百科, Chinese content | 18 |21| **P4** | GitHub | github, repo, issue, PR, commit, branch | 10 |22| **P5** | Zai MCP | image, video, screenshot, OCR, analyze picture | N/A |23| **P6** | Fetch | http://, https:// (direct URL) | 5000 |24| **P7** | Brave | (default fallback) | 10 |25| **P8** | Exa | English technical docs | 3000 |2627---2829## Decision Flow3031```32User Input33 │34 ├─ Contains http:// or https:// ──────────────→ Fetch (P6)35 │36 ├─ Image/Video/Screenshot/OCR ─────────────────→ Zai MCP (P5)37 │38 ├─ GitHub/Repo/Issue/PR/Commit ────────────────→ GitHub MCP (P4)39 │40 ├─ Academic/Paper/Research/Thesis ──────────────→ Metaso (P1)41 │42 ├─ Code/API/Framework/Library ──────────────────→ Exa (P0)43 │44 ├─ Today/Latest/News + "AI" ───────────────────→ Brave + Metaso + Top 8 digest45 │46 ├─ 中文/国内 ───────────────────────────────────→ Bocha (P3)47 │48 └─ Default ─────────────────────────────────────→ Brave (P7)49```5051---5253## Token Control5455Adjust search depth based on query complexity:5657| Level | Tokens/Count | Use Case |58|-------|--------------|----------|59| **Quick** | 5-10 | Simple queries, definitions |60| **Regular** | 10-20 | Common usage, examples (default) |61| **Deep** | 30-50 | Multi-condition, architecture |6263---6465# News Output Format (AI新闻输出格式)6667When user searches for daily AI news (今日/当天 AI新闻/资讯), use **Brave + Metaso** combined and output:6869```70# 今日AI资讯 Top 87172### 1. [新闻标题]7374**摘要:** [新闻内容摘要,50-100字]7576**来源:** [来源名](链接)7778**标签:** #标签1 #标签2 #标签37980**相关性:** ★★★★★8182---8384### 2. [新闻标题]8586**摘要:** ...87```8889## Timeliness Judgment (时效性判断)9091Before including news, verify timeliness:9293| Indicator | Fresh | Stale |94|-----------|-------|-------|95| Publish date | Within 2 days | Older than 7 days |96| Date string in URL | Contains current date (2026-02-*) | No date or old date |97| Source freshness | News sites, blogs | Static docs |98| Content keywords | "今日", "最新", "just announced" | "历史", "回顾", "总览" |99100**Priority**: Prefer news with publish dates within 2 days. Stale news (>7 days) should be excluded.101102**Source attribution**: Always include clickable source links.103104---105106# Usage Guidelines107108## DO109110- Analyze keywords before routing111- Implement fallback on failure (30s timeout)112- **For AI news: Use Brave + Metaso combined**113- Format each news item: 标题 + 摘要 + 来源 + 标签 + 相关性114- **Filter to recent 2 days**: exclude news older than 48 hours115- Always include clickable source links116117## DON'T118119- Use Exa for news → Brave120- Use Metaso for code → Exa121- Include news older than 2 days in "今日" digest122- Omit source attribution for news123- Combine MCPs redundantly124125---126127# Fallback Strategy128129| Primary | Fallback 1 | Fallback 2 |130|---------|-----------|------------|131| Exa | Brave | Metaso |132| Metaso | Bocha | Brave |133| Brave | Bocha | Exa |134| Bocha | Brave | Exa |135| GitHub | Fetch | - |136| Fetch | Brave | - |137138---139140# Combination Rules141142Only for complementary scenarios (max 3 concurrent):143144| Scenario | Combo | Rationale |145|----------|-------|-----------|146| **AI News Digest** | Brave + Metaso | English + Chinese comprehensive coverage |147| Technical research | Exa + GitHub | Code + repos |148| Deep research | Metaso + Fetch | Academic + content |149| Comprehensive | Brave + Bocha | News + Chinese |