exa-research について
exa-researchは、ExaのAnswer API、Deep Search、リサーチ機能を扱うスキルです。引用付き回答や検索結果の拡張、長文レポートを作成する開発者向けです。
主な機能
- 01出典URL付きの回答
- 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
クイックリファレンス
| トピック | 使用する場面 | リファレンス |
|---|---|---|
| Answer API | 引用付きのQ&A、根拠に基づく回答 | answer-api.md |
| Deep Search | スマートなクエリ拡張、高品質な要約 | deep-search.md |
| 引用 | 出典の明示、検証 | citations.md |
基本パターン
Answer 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)
要約付きDeep Search
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 | 引用が必要な直接的なQ&A | 回答+出典URL |
| Deep Search | クエリ拡張+要約 | 強化された検索結果 |
| Exa Research | 非同期の長文レポート | 構造化されたJSON/Markdown |
よくある間違い
- 長い回答でストリーミングを使用しない - 複雑な質問でユーザー体験を向上させるには、
stream=Trueを使用します - 引用を無視する - 検証可能な回答にするため、必ず
response.citationsを含めます text=Trueを指定し忘れる - Answer APIはコンテンツへのアクセスが必要です。text=Trueを含めます- クエリが複雑すぎる - Answer APIは明確で焦点を絞った質問に最適です
- 引用を検証しない - ユーザーに表示する前に、
citation.urlが存在することを確認します
コメント
Markdown 対応