docs: reframe deep_search guidance around research depth

The instructions and docs led with the costs of Exa's premium mode
(slower, pricier). Same steering -- the model still reserves deep_search
for questions that need it -- now framed by what a call invests (a full
research pass, Exa's research-grade mode) rather than what it costs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bill Easton
2026-07-16 15:29:05 -05:00
co-authored by Claude Fable 5
parent 02540a2409
commit e72e11353d
4 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -72,9 +72,9 @@ hard error: the run continues and the model can correct the URL or rephrase.
`deep_search` calls Exa search with `type='deep'` and a plain-text output
schema: Exa expands the question into multiple queries, searches, and returns
an answer grounded in citations -- all in **one tool call**, with the cited
sources listed under the answer. It is markedly slower and more expensive per
call than `web_search`, and the model decides when to invoke tools, so the
tool is off by default -- enable it explicitly:
sources listed under the answer. Each call invests more time and search depth
than `web_search` (Exa's research-grade mode), and the model decides when to
invoke tools, so the tool is off by default -- enable it explicitly:
```python
from pydantic_ai_harness.exa import ExaSearch
+3 -3
View File
@@ -64,9 +64,9 @@ the run.
`deep_search` calls Exa search with `type='deep'` and a plain-text output
schema: Exa expands the question into multiple queries, searches, and returns
an answer grounded in citations -- all in **one tool call**, with the cited
sources listed under the answer. It is markedly slower and more expensive per
call than `web_search`, and the model decides when to invoke tools, so the
tool is off by default -- enable it explicitly:
sources listed under the answer. Each call invests more time and search depth
than `web_search` (Exa's research-grade mode), and the model decides when to
invoke tools, so the tool is off by default -- enable it explicitly:
```python
from pydantic_ai_harness.exa import ExaSearch
+6 -5
View File
@@ -17,8 +17,8 @@ _INSTRUCTIONS = (
)
_DEEP_INSTRUCTIONS = _INSTRUCTIONS + (
' For questions that need synthesis across many sources, escalate to `deep_search`: it is '
'slower and costs more per call, but returns a cited answer in one step.'
' For questions that need synthesis across many sources, escalate to `deep_search`: it runs '
'a full research pass in a single call, so save it for the questions that deserve that depth.'
)
@@ -57,9 +57,10 @@ class ExaSearch(AbstractCapability[AgentDepsT]):
"""Also expose the `deep_search` tool. Off by default.
Deep search (Exa search `type='deep'`) runs a multi-step agentic search
and synthesizes a cited answer in one call. It is markedly slower and more
expensive per call than `web_search`, and the model decides when to invoke
tools, so the extra spend is opt-in rather than the default.
and synthesizes a cited answer in one call. Each call invests more time
and search depth than `web_search` (Exa's research-grade mode), and the
model decides when to invoke tools, so that investment is opt-in rather
than the default.
"""
client: ExaClient | None = None
+2 -3
View File
@@ -136,9 +136,8 @@ class ExaSearchToolset(FunctionToolset[AgentDepsT]):
async def deep_search(self, question: str) -> str:
"""Run Exa's multi-step deep search and return a synthesized answer with its sources.
Slower and more expensive per call than `web_search`; suited to
questions that need synthesis across many sources rather than a quick
survey.
A full research pass in a single call; suited to questions that need
synthesis across many sources rather than a quick survey.
Args:
question: The research question to answer.