关于 exa-research
exa-research 是使用 Exa Answer API、Deep Search 和研究功能的 skill,面向需要构建带引用答案、扩展搜索结果及长篇报告的开发者。
主要功能
- 01生成带来源链接的答案
- 02流式输出答案
- 03通过查询扩展进行 Deep Search
- 04生成长篇研究报告
适用场景
- 01回答需要可核验来源的问题
- 02流式呈现较长回答
- 03搜索并总结最新进展
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ ejirocodes/ agent-skills --skill exa-research安装后在 Claude Code 中输入/exa-research确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/answer-api.mdcitations.mddeep-search.md详细介绍
Exa 研究与回答 API
快速参考
| 主题 | 使用场景 | 参考 |
|---|---|---|
| 回答 API | 带引用的问答、有依据的回答 | answer-api.md |
| 深度搜索 | 智能查询扩展、高质量摘要 | deep-search.md |
| 引用 | 来源归属、验证 | citations.md |
基本模式
回答 API(Python)
from exa_py import Exa
exa = Exa()
response = exa.answer(
"What are the key features of Python 3.12?",
text=True
)
print(response.answer)
for citation in response.citations:
print(f"Source: {citation.url}")
流式回答
stream = exa.answer(
"Explain the benefits of microservices architecture",
stream=True
)
for chunk in stream:
print(chunk.text, end="", flush=True)
# Access citations after streaming
print("\nSources:", stream.citations)
带摘要的深度搜索
results = exa.search_and_contents(
"latest developments in quantum computing",
type="neural",
num_results=10,
summary=True,
use_autoprompt=True # Smart query expansion
)
for result in results.results:
print(f"{result.title}")
print(f"Summary: {result.summary}")
使用场景
| 功能 | 使用场景 | 输出 |
|---|---|---|
| 回答 API | 需要引用的直接问答 | 回答 + 来源 URL |
| 深度搜索 | 查询扩展 + 摘要 | 增强的搜索结果 |
| Exa Research | 长篇异步报告 | 结构化 JSON/Markdown |
常见错误
- 长篇回答未使用流式传输 - 对于复杂问题,使用
stream=True可获得更好的用户体验 - 忽略引用 - 始终包含
response.citations,以便回答可供验证 - 缺少
text=True- 回答 API 需要访问内容;请包含text=True - 查询过于复杂 - 回答 API 最适用于清晰、聚焦的问题
- 未验证引用 - 向用户展示前,检查
citation.url是否存在
评论
支持 Markdown