local-rag-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLocal RAG Search Skill
本地RAG搜索技能
This skill enables you to effectively use the mcp-local-rag MCP server for intelligent web searches with semantic ranking. The server performs RAG-like similarity scoring to prioritize the most relevant results without requiring any external APIs.
本技能可让你借助mcp-local-rag MCP服务器,通过语义排序实现智能网页搜索。该服务器无需调用任何外部API,即可执行类RAG的相似度评分,优先返回最相关的结果。
Available Tools
可用工具
1. rag_search_ddgs
- DuckDuckGo Search
rag_search_ddgs1. rag_search_ddgs
- DuckDuckGo搜索
rag_search_ddgsUse this for privacy-focused, general web searches.
When to use:
- User prefers privacy-focused searches
- General information lookup
- Default choice for most queries
Parameters:
- : Natural language search query
query - : Initial results to fetch (default: 10)
num_results - : Most relevant results to return (default: 5)
top_k - : Include source URLs (default: true)
include_urls
适用于注重隐私的通用网页搜索。
适用场景:
- 用户偏好注重隐私的搜索方式
- 通用信息查询
- 大多数查询的默认选择
参数:
- : 自然语言搜索查询词
query - : 初始获取的结果数量(默认值:10)
num_results - : 返回的最相关结果数量(默认值:5)
top_k - : 是否包含来源URL(默认值:true)
include_urls
2. rag_search_google
- Google Search
rag_search_google2. rag_search_google
- Google搜索
rag_search_googleUse this for comprehensive, technical, or detailed searches.
When to use:
- Technical or scientific queries
- Need comprehensive coverage
- Searching for specific documentation
适用于全面、技术类或精细化搜索。
适用场景:
- 技术或科学类查询
- 需要全面覆盖信息
- 搜索特定文档
3. deep_research
- Multi-Engine Deep Research
deep_research3. deep_research
- 多引擎深度研究
deep_researchUse this for comprehensive research across multiple search engines.
When to use:
- Researching complex topics requiring broad coverage
- Need diverse perspectives from multiple sources
- Gathering comprehensive information on a subject
Available backends:
- : Privacy-focused general search
duckduckgo - : Comprehensive technical results
google - : Microsoft's search engine
bing - : Privacy-first search
brave - : Encyclopedia/factual content
wikipedia - ,
yahoo,yandex,mojeek: Alternative enginesgrokipedia
Default:
["duckduckgo", "google"]适用于跨多个搜索引擎开展全面研究。
适用场景:
- 研究需要广泛覆盖信息的复杂主题
- 需要从多来源获取多样化视角
- 收集某一主题的全面信息
可用后端引擎:
- : 注重隐私的通用搜索
duckduckgo - : 全面的技术类结果
google - : 微软搜索引擎
bing - : 隐私优先的搜索引擎
brave - : 百科/事实类内容
wikipedia - ,
yahoo,yandex,mojeek: 替代引擎grokipedia
默认值:
["duckduckgo", "google"]4. deep_research_google
- Google-Only Deep Research
deep_research_google4. deep_research_google
- 仅Google深度研究
deep_research_googleShortcut for deep research using only Google.
仅使用Google进行深度研究的快捷方式。
5. deep_research_ddgs
- DuckDuckGo-Only Deep Research
deep_research_ddgs5. deep_research_ddgs
- 仅DuckDuckGo深度研究
deep_research_ddgsShortcut for deep research using only DuckDuckGo.
仅使用DuckDuckGo进行深度研究的快捷方式。
Best Practices
最佳实践
Query Formulation
查询词构建
-
Use natural language: Write queries as questions or descriptive phrases
- Good: "latest developments in quantum computing"
- Good: "how to implement binary search in Python"
- Avoid: Single keywords like "quantum" or "Python"
-
Be specific: Include context and details
- Good: "React hooks best practices for 2024"
- Better: "React useEffect cleanup function best practices"
-
使用自然语言: 将查询词写成问题或描述性短语
- 示例:"量子计算的最新发展"
- 示例:"如何用Python实现二分查找"
- 避免:使用单个关键词,如“量子”或“Python”
-
明确具体: 包含上下文和细节
- 示例:"2024年React Hooks最佳实践"
- 更优:"React useEffect清理函数最佳实践"
Tool Selection Strategy
工具选择策略
-
Single Topic, Quick Answer → Useor
rag_search_ddgsrag_search_googlerag_search_ddgs( query="What is the capital of France?", top_k=3 ) -
Technical/Scientific Query → Use
rag_search_googlerag_search_google( query="Docker multi-stage build optimization techniques", num_results=15, top_k=7 ) -
Comprehensive Research → Usewith multiple search terms
deep_researchdeep_research( search_terms=[ "machine learning fundamentals", "neural networks architecture", "deep learning best practices 2024" ], backends=["google", "duckduckgo"], top_k_per_term=5 ) -
Factual/Encyclopedia Content → Usewith Wikipedia
deep_researchdeep_research( search_terms=["World War II timeline", "WWII key battles"], backends=["wikipedia"], num_results_per_term=5 )
-
单一主题、快速解答 → 使用或
rag_search_ddgsrag_search_googlerag_search_ddgs( query="法国的首都是哪里?", top_k=3 ) -
技术/科学类查询 → 使用
rag_search_googlerag_search_google( query="Docker多阶段构建优化技巧", num_results=15, top_k=7 ) -
全面研究 → 使用并搭配多个搜索词
deep_researchdeep_research( search_terms=[ "机器学习基础", "神经网络架构", "2024年深度学习最佳实践" ], backends=["google", "duckduckgo"], top_k_per_term=5 ) -
事实/百科类内容 → 使用搭配Wikipedia的
deep_researchdeep_research( search_terms=["第二次世界大战时间线", "二战关键战役"], backends=["wikipedia"], num_results_per_term=5 )
Parameter Tuning
参数调优
For quick answers:
- ,
num_results=5-10top_k=3-5
For comprehensive research:
- ,
num_results=15-20top_k=7-10
For deep research:
- ,
num_results_per_term=10-15top_k_per_term=3-5 - Use 2-5 related search terms
- Use 1-3 backends (more = more comprehensive but slower)
快速解答场景:
- ,
num_results=5-10top_k=3-5
全面研究场景:
- ,
num_results=15-20top_k=7-10
深度研究场景:
- ,
num_results_per_term=10-15top_k_per_term=3-5 - 使用2-5个相关搜索词
- 使用1-3个后端引擎(数量越多覆盖越全面,但速度越慢)
Workflow Examples
工作流示例
Example 1: Current Events
示例1:时事查询
Task: "What happened at the UN climate summit last week?"
1. Use rag_search_google for recent news coverage
2. Set top_k=7 for comprehensive view
3. Present findings with source URLs任务: "上周联合国气候峰会发生了什么?"
1. 使用rag_search_google获取近期新闻报道
2. 设置top_k=7以获取全面视角
3. 附带来源URL呈现研究结果Example 2: Technical Deep Dive
示例2:技术深度探究
Task: "How do I optimize PostgreSQL queries?"
1. Use deep_research with multiple specific terms:
- "PostgreSQL query optimization techniques"
- "PostgreSQL index best practices"
- "PostgreSQL EXPLAIN ANALYZE tutorial"
2. Use backends=["google", "stackoverflow"] if available
3. Synthesize findings into actionable guide任务: "如何优化PostgreSQL查询?"
1. 使用deep_research并搭配多个具体搜索词:
- "PostgreSQL查询优化技巧"
- "PostgreSQL索引最佳实践"
- "PostgreSQL EXPLAIN ANALYZE教程"
2. 若支持,使用backends=["google", "stackoverflow"]
3. 将研究结果整合为可操作的指南Example 3: Multi-Perspective Research
示例3:多视角研究
Task: "Research the impact of remote work on productivity"
1. Use deep_research with diverse search terms:
- "remote work productivity statistics 2024"
- "hybrid work model effectiveness studies"
- "work from home challenges research"
2. Use backends=["google", "duckduckgo"] for broad coverage
3. Synthesize different perspectives and studies任务: "研究远程办公对生产力的影响"
1. 使用deep_research并搭配多样化搜索词:
- "2024年远程办公生产力统计数据"
- "混合办公模式有效性研究"
- "居家办公挑战研究"
2. 使用backends=["google", "duckduckgo"]以获取广泛覆盖
3. 整合不同视角和研究结论Guidelines
指南
- Always cite sources: When , reference the source URLs in your response
include_urls=True - Verify recency: Check if the content appears current and relevant
- Cross-reference: For important facts, use multiple search terms or engines
- Respect privacy: Use DuckDuckGo for general queries unless specific needs require Google
- Batch related queries: When researching a topic, create multiple related search terms for deep_research
- Semantic relevance: Trust the RAG scoring - top results are semantically closest to the query
- Explain your choice: Briefly mention which tool you're using and why
- 始终引用来源: 当时,在回复中引用来源URL
include_urls=True - 验证时效性: 检查内容是否最新且相关
- 交叉验证: 对于重要事实,使用多个搜索词或引擎
- 注重隐私: 除非有特定需求,否则优先使用DuckDuckGo进行通用查询
- 批量处理相关查询: 研究某一主题时,创建多个相关搜索词用于deep_research
- 语义相关性: 信任RAG评分——排名靠前的结果与查询词的语义最接近
- 说明选择理由: 简要提及你使用的工具及原因
Error Handling
错误处理
If a search returns insufficient results:
- Try rephrasing the query with different keywords
- Switch to a different backend
- Increase parameter
num_results - Use with multiple related search terms
deep_research
若搜索返回结果不足:
- 尝试用不同关键词改写查询词
- 切换至其他后端引擎
- 增大参数值
num_results - 使用搭配多个相关搜索词的
deep_research
Privacy Considerations
隐私注意事项
- DuckDuckGo: Privacy-focused, doesn't track users
- Google: Most comprehensive but tracks searches
- Recommend DuckDuckGo as default unless user specifically needs Google's coverage
- DuckDuckGo: 注重隐私,不会追踪用户
- Google: 覆盖最全面,但会追踪搜索记录
- 推荐优先使用DuckDuckGo,除非用户明确需要Google的覆盖范围
Performance Notes
性能说明
- First search may be slower (model loading)
- Subsequent searches are faster (cached models)
- More backends = more comprehensive but slower
- Adjust and
num_resultsbased on use casetop_k
- 首次搜索可能较慢(模型加载中)
- 后续搜索速度更快(模型已缓存)
- 后端引擎越多,覆盖越全面,但速度越慢
- 根据使用场景调整和
num_results参数top_k