SuperAPI AI 工具集

exa-research

写作与研究

查看项目

更新于 10-15 17:06

技能介绍

用途

Exa Research 面向 Exa.ai 的深度研究与答案生成场景,资料将其定位为在构建研究自动化、实现带来源引用的问答(Answer API)以及需要可验证来源的回答时使用。

主要能力

资料列出三类核心主题:

  1. Answer API:用于带引用的问答和 grounded(有依据)的响应。调用后可获得 answer 以及 citations 列表,每个 citation 提供 url。
  2. Deep Search:用于智能查询扩展并生成高质量摘要。示例中使用 exa.search_and_contents(),配合 type="neural"、num_results=10、summary=True 和 use_autoprompt=True 进行查询扩展并获取每条结果的 title 与 summary。
  3. Citations:用于来源归属与验证。资料强调应始终包含 response.citations 以实现可验证的响应,并在向用户展示前检查 citation.url 是否存在。

资料还提到 Exa Research 用于长文异步报告,输出为结构化的 JSON 或 Markdown。

使用方式

文档给出 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}")

适用场景

  • 直接问答且需要引用来源时,使用 Answer API,输出为答案加来源 URL。
  • 需要查询扩展与摘要时,使用 Deep Search,输出为增强后的搜索结果。
  • 需要长文异步报告时,使用 Exa Research,输出为结构化 JSON 或 Markdown。

限制与注意事项

资料列出的常见问题包括:

  • 长答案未使用流式:对复杂问题应使用 stream=True 以改善体验。
  • 忽略引用:应始终包含 response.citations 以保证可验证。
  • 缺少 text=True:Answer API 需要内容访问,应包含 text=True。
  • 查询过于复杂:Answer API 更适合清晰、聚焦的问题。
  • 未校验引用:在展示给用户前应检查 citation.url 是否存在。

关于收费、价格、平台支持与配额等信息,资料暂未提供。