mcpField
E
exa-research

exa-research

github.com/ejirocodes生产力6244 次安装18 周前更新
代码仓库

关于 exa-research

exa-research 是使用 Exa Answer API、Deep Search 和研究功能的 skill,面向需要构建带引用答案、扩展搜索结果及长篇报告的开发者。

主要功能

  1. 01生成带来源链接的答案
  2. 02流式输出答案
  3. 03通过查询扩展进行 Deep Search
  4. 04生成长篇研究报告

适用场景

  1. 01回答需要可核验来源的问题
  2. 02流式呈现较长回答
  3. 03搜索并总结最新进展

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/ejirocodes/agent-skills --skill exa-research

安装后在 Claude Code 中输入/exa-research确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
answer-api.md
citations.md
deep-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

常见错误

  1. 长篇回答未使用流式传输 - 对于复杂问题,使用 stream=True 可获得更好的用户体验
  2. 忽略引用 - 始终包含 response.citations,以便回答可供验证
  3. 缺少 text=True - 回答 API 需要访问内容;请包含 text=True
  4. 查询过于复杂 - 回答 API 最适用于清晰、聚焦的问题
  5. 未验证引用 - 向用户展示前,检查 citation.url 是否存在

评论

支持 Markdown