Airweave Search
Search and retrieve context from Airweave collections using the search script at {baseDir}/scripts/search.py.
When to Search
Search when the user:
- - Asks about data in their connected apps ("What did we discuss in Slack about...")
- Needs to find documents, messages, issues, or records
- Asks factual questions about their workspace ("Who is responsible for...", "What's our policy on...")
- References specific tools by name ("in Notion", "on GitHub", "in Jira")
- Needs recent information you don't have in your training
- Needs you to check app data for context ("check our Notion docs", "look at the Jira ticket")
Don't search when:
- - User asks general knowledge questions (use your training)
- User already provided all needed context in the conversation
- The question is about Airweave itself, not data within it
Query Formulation
Turn user intent into effective search queries:
| User Says | Search Query |
|---|
| "What did Sarah say about the launch?" | "Sarah product launch" |
| "Find the API documentation" |
"API documentation" |
| "Any bugs reported this week?" | "bug report issues" |
| "What's our refund policy?" | "refund policy customer" |
Tips:
- - Use natural language — Airweave uses semantic search
- Include context — "pricing feedback" beats just "pricing"
- Be specific but not too narrow
- Skip filler words like "please find", "can you search for"
Running a Search
Execute the search script:
CODEBLOCK0
Optional parameters:
- -
--limit N — Max results (default: 20) - INLINECODE2 — Temporal relevance 0-1 (default: 0, use 0.7+ for "recent", "latest")
- INLINECODE3 — Retrieval strategy: hybrid, semantic, keyword (default: hybrid)
- INLINECODE4 — Return raw results instead of AI-generated answer
- INLINECODE5 — Enable query expansion for broader results
- INLINECODE6 — Toggle LLM reranking (default: on)
Examples:
CODEBLOCK1
Handling Results
Interpreting scores:
- - 0.85+ → Highly relevant, use confidently
- 0.70-0.85 → Likely relevant, use with context
- 0.50-0.70 → Possibly relevant, mention uncertainty
- Below 0.50 → Weak match, consider rephrasing
Presenting to users:
- 1. Lead with the answer — don't start with "I found 5 results"
- Cite sources — mention where info came from ("According to your Slack conversation...")
- Synthesize — combine relevant parts into a coherent response
- Acknowledge gaps — if results don't fully answer, say so
Handling No Results
If search returns nothing useful:
- 1. Broaden the query — remove specific terms
- Try different phrasing — use synonyms
- Increase limit — fetch more results
- Ask for clarification — user might have more context
Parameter Reference
See PARAMETERS.md for detailed parameter guidance.
Examples
See EXAMPLES.md for complete search scenarios.
Airweave 搜索
使用位于 {baseDir}/scripts/search.py 的搜索脚本,从 Airweave 集合中搜索并检索上下文信息。
何时进行搜索
当用户出现以下情况时进行搜索:
- - 询问其已连接应用中的数据(我们在 Slack 上讨论了关于……的什么内容)
- 需要查找文档、消息、问题或记录
- 询问关于其工作区的事实性问题(谁负责……、我们对……的政策是什么)
- 通过名称提及特定工具(在 Notion 中、在 GitHub 上、在 Jira 中)
- 需要你训练数据中没有的最新信息
- 需要你检查应用数据以获取上下文(查看我们的 Notion 文档、看看那个 Jira 工单)
在以下情况下不要搜索:
- - 用户询问常识性问题(使用你的训练数据)
- 用户已在对话中提供了所有需要的上下文
- 问题涉及 Airweave 本身,而非其中的数据
查询构建
将用户意图转化为有效的搜索查询:
| 用户表述 | 搜索查询 |
|---|
| Sarah 关于发布说了什么? | Sarah 产品发布 |
| 找到 API 文档 |
API 文档 |
| 这周有报告什么 bug 吗? | bug 报告 问题 |
| 我们的退款政策是什么? | 退款 政策 客户 |
提示:
- - 使用自然语言——Airweave 采用语义搜索
- 包含上下文——定价反馈优于单纯的定价
- 具体但不要过于狭窄
- 跳过填充词,如请查找、你能搜索一下
执行搜索
运行搜索脚本:
bash
python3 {baseDir}/scripts/search.py 你的搜索查询
可选参数:
- - --limit N — 最大结果数(默认:20)
- --temporal N — 时间相关性 0-1(默认:0,对于最近、最新使用 0.7+)
- --strategy TYPE — 检索策略:混合、语义、关键词(默认:混合)
- --raw — 返回原始结果而非 AI 生成的答案
- --expand — 启用查询扩展以获得更广泛的结果
- --rerank / --no-rerank — 切换 LLM 重排序(默认:开启)
示例:
bash
基本搜索
python3 {baseDir}/scripts/search.py 客户反馈 定价
最近的对话
python3 {baseDir}/scripts/search.py 产品发布 更新 --temporal 0.8
查找特定文档
python3 {baseDir}/scripts/search.py API 认证 文档 --strategy keyword
获取原始结果进行探索
python3 {baseDir}/scripts/search.py 项目状态 --limit 30 --raw
使用查询扩展进行广泛搜索
python3 {baseDir}/scripts/search.py 入职 --expand
处理结果
解读分数:
- - 0.85+ → 高度相关,可自信使用
- 0.70-0.85 → 可能相关,结合上下文使用
- 0.50-0.70 → 可能相关,提及不确定性
- 低于 0.50 → 匹配度弱,考虑重新表述
向用户呈现:
- 1. 直接给出答案——不要以我找到了 5 个结果开头
- 引用来源——提及信息来自何处(根据你的 Slack 对话……)
- 综合整理——将相关部分整合成连贯的回复
- 承认不足——如果结果未能完全回答,如实说明
处理无结果情况
如果搜索没有返回有用结果:
- 1. 放宽查询——移除特定术语
- 尝试不同的表述——使用同义词
- 增加限制数量——获取更多结果
- 请求澄清——用户可能有更多上下文
参数参考
详细参数指南请参见 PARAMETERS.md。
示例
完整搜索场景请参见 EXAMPLES.md。