Local RAG Search Skill
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.
Available Tools
1. rag_search_ddgs - DuckDuckGo Search
Use this for privacy-focused, general web searches.
When to use:
- - User prefers privacy-focused searches
- General information lookup
- Default choice for most queries
Parameters:
- -
query: Natural language search query - INLINECODE2 : Initial results to fetch (default: 10)
- INLINECODE3 : Most relevant results to return (default: 5)
- INLINECODE4 : Include source URLs (default: true)
2. rag_search_google - Google Search
Use 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
Use 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:
- -
duckduckgo: Privacy-focused general search - INLINECODE8 : Comprehensive technical results
- INLINECODE9 : Microsoft's search engine
- INLINECODE10 : Privacy-first search
- INLINECODE11 : Encyclopedia/factual content
- INLINECODE12 ,
yandex, mojeek, grokipedia: Alternative engines
Default: INLINECODE16
4. deep_research_google - Google-Only Deep Research
Shortcut for deep research using only Google.
5. deep_research_ddgs - DuckDuckGo-Only Deep Research
Shortcut for deep research using only DuckDuckGo.
Best Practices
Query Formulation
- 1. 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"
- 2. Be specific: Include context and details
- Good: "React hooks best practices for 2024"
- Better: "React useEffect cleanup function best practices"
Tool Selection Strategy
- 1. Single Topic, Quick Answer → Use
rag_search_ddgs or INLINECODE20
CODEBLOCK0
- 2. Technical/Scientific Query → Use INLINECODE21
CODEBLOCK1
- 3. Comprehensive Research → Use
deep_research with multiple search terms
CODEBLOCK2
- 4. Factual/Encyclopedia Content → Use
deep_research with Wikipedia
CODEBLOCK3
Parameter Tuning
For quick answers:
- -
num_results=5-10, INLINECODE25
For comprehensive research:
- -
num_results=15-20, INLINECODE27
For deep research:
- -
num_results_per_term=10-15, INLINECODE29 - Use 2-5 related search terms
- Use 1-3 backends (more = more comprehensive but slower)
Workflow Examples
Example 1: Current Events
CODEBLOCK4
Example 2: Technical Deep Dive
CODEBLOCK5
Example 3: Multi-Perspective Research
CODEBLOCK6
Guidelines
- 1. Always cite sources: When
include_urls=True, reference the source URLs in your response - 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
Error Handling
If a search returns insufficient results:
- 1. Try rephrasing the query with different keywords
- Switch to a different backend
- Increase
num_results parameter - Use
deep_research with multiple related search terms
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
Performance Notes
- - First search may be slower (model loading)
- Subsequent searches are faster (cached models)
- More backends = more comprehensive but slower
- Adjust
num_results and top_k based on use case
本地RAG搜索技能
该技能使您能够有效使用mcp-local-rag MCP服务器进行智能网络搜索,并具备语义排序功能。服务器执行类似RAG的相似度评分,优先返回最相关的结果,无需任何外部API。
可用工具
1. ragsearchddgs - DuckDuckGo搜索
用于注重隐私的通用网络搜索。
使用场景:
- - 用户偏好隐私保护搜索
- 一般信息查询
- 大多数查询的默认选择
参数:
- - query:自然语言搜索查询
- numresults:初始获取的结果数(默认:10)
- topk:返回的最相关结果数(默认:5)
- include_urls:包含来源URL(默认:true)
2. ragsearchgoogle - Google搜索
用于全面、技术性或详细的搜索。
使用场景:
3. deep_research - 多引擎深度研究
用于跨多个搜索引擎的全面研究。
使用场景:
- - 研究需要广泛覆盖的复杂主题
- 需要来自多个来源的不同视角
- 收集关于某个主题的全面信息
可用后端:
- - duckduckgo:注重隐私的通用搜索
- google:全面的技术结果
- bing:微软搜索引擎
- brave:隐私优先搜索
- wikipedia:百科全书/事实内容
- yahoo、yandex、mojeek、grokipedia:替代引擎
默认: [duckduckgo, google]
4. deepresearchgoogle - 仅Google深度研究
仅使用Google进行深度研究的快捷方式。
5. deepresearchddgs - 仅DuckDuckGo深度研究
仅使用DuckDuckGo进行深度研究的快捷方式。
最佳实践
查询构建
- 1. 使用自然语言:将查询写成问题或描述性短语
- 好:量子计算最新进展
- 好:如何在Python中实现二分查找
- 避免:单个关键词如量子或Python
- 2. 具体明确:包含上下文和细节
- 好:2024年React Hooks最佳实践
- 更好:React useEffect清理函数最佳实践
工具选择策略
- 1. 单一主题,快速回答 → 使用 ragsearchddgs 或 ragsearchgoogle
ragsearchddgs(
query=法国的首都是什么?,
top_k=3
)
- 2. 技术/科学查询 → 使用 ragsearchgoogle
ragsearchgoogle(
query=Docker多阶段构建优化技术,
num_results=15,
top_k=7
)
- 3. 全面研究 → 使用 deep_research 配合多个搜索词
deep_research(
search_terms=[
机器学习基础,
神经网络架构,
2024年深度学习最佳实践
],
backends=[google, duckduckgo],
topkper_term=5
)
- 4. 事实/百科全书内容 → 使用 deep_research 配合维基百科
deep_research(
search_terms=[第二次世界大战时间线, 二战关键战役],
backends=[wikipedia],
numresultsper_term=5
)
参数调优
快速回答:
- - numresults=5-10,topk=3-5
全面研究:
- - numresults=15-20,topk=7-10
深度研究:
- - numresultsperterm=10-15,topkperterm=3-5
- 使用2-5个相关搜索词
- 使用1-3个后端(越多越全面但越慢)
工作流示例
示例1:时事新闻
任务:上周联合国气候峰会发生了什么?
- 1. 使用ragsearchgoogle获取最新新闻报道
- 设置top_k=7获取全面视角
- 附带来源URL呈现结果
示例2:技术深度探究
任务:如何优化PostgreSQL查询?
- 1. 使用deep_research配合多个具体搜索词:
- PostgreSQL查询优化技术
- PostgreSQL索引最佳实践
- PostgreSQL EXPLAIN ANALYZE教程
- 2. 使用backends=[google, stackoverflow](如可用)
- 综合发现形成可操作指南
示例3:多角度研究
任务:研究远程工作对生产力的影响
- 1. 使用deep_research配合多样化搜索词:
- 2024年远程工作生产力统计数据
- 混合工作模式有效性研究
- 居家办公挑战研究
- 2. 使用backends=[google, duckduckgo]获取广泛覆盖
- 综合不同视角和研究结果
指南
- 1. 始终引用来源:当include_urls=True时,在回复中引用来源URL
- 验证时效性:检查内容是否看起来最新和相关
- 交叉验证:对于重要事实,使用多个搜索词或引擎
- 尊重隐私:除非特定需求需要使用Google,否则通用查询使用DuckDuckGo
- 批量相关查询:研究主题时,为深度研究创建多个相关搜索词
- 语义相关性:信任RAG评分——顶部结果在语义上最接近查询
- 解释选择:简要说明正在使用哪个工具及其原因
错误处理
如果搜索返回的结果不足:
- 1. 尝试用不同关键词重新表述查询
- 切换到不同的后端
- 增加numresults参数
- 使用deepresearch配合多个相关搜索词
隐私考虑
- - DuckDuckGo:注重隐私,不追踪用户
- Google:最全面但会追踪搜索
- 建议默认使用DuckDuckGo,除非用户特别需要Google的覆盖范围
性能说明
- - 首次搜索可能较慢(模型加载)
- 后续搜索更快(缓存模型)
- 更多后端 = 更全面但更慢
- 根据使用场景调整numresults和topk