Dynamic filtering makes Claude more accurate and efficient on complex web search tasks. Here’s how it works, and how to enable it on the API.

  • Category
  • Product
    Claude Platform
  • Date
    February 17, 2026
  • Reading time
    5
    min
  • Share
    Copy link
    https://claude.com/blog/improved-web-search-with-dynamic-filtering

Alongside Claude Opus 4.6 and Sonnet 4.6, we’re releasing new versions of our web search and web fetch tools. Claude can now natively write and execute code during web searches to filter results before they reach the context window, improving its accuracy and token efficiency.与Claude Opus 4.6和Sonnet 4.6一同,我们发布了网页搜索和网页抓取工具的新版本。Claude现在可以在网页搜索过程中原生编写并执行代码,在结果进入上下文窗口前进行过滤,从而提高准确性和令牌效率。

Web search with dynamic filtering带动态过滤的网页搜索

Web search is a highly token-intensive task. Agents using basic web search tools need to make a query, pull search results into context, fetch full HTML files from multiple websites, and reason over it all before responding. But the context being pulled in from search is often irrelevant, which degrades the quality of the response.

To improve Claude’s performance on web searches, our web search and web fetch tools now automatically write and execute code to post-process query results. Instead of reasoning over full HTML files, Claude can dynamically filter the search results before loading them into context, keeping only what’s relevant and discarding the rest.

We’ve previously found this technique to be effective across other agentic workflows, and we’ve added tools such as code execution and programmatic tool calling for native support on our API. We’re now bringing these same techniques to web search and web fetch.
网页搜索是一项高度消耗令牌的任务。使用基本网页搜索工具的代理需要发起查询、将搜索结果拉入上下文、从多个网站获取完整的HTML文件,并在响应前对所有内容进行推理。但搜索引入的上下文往往不相关,这会降低响应质量。为了提升Claude在网页搜索中的表现,我们的网页搜索和网页抓取工具现在会自动编写并执行代码,对查询结果进行后处理。Claude不再对完整的HTML文件进行推理,而是可以在将搜索结果加载到上下文之前动态过滤,只保留相关内容,丢弃其余部分。我们此前已发现这种技术在其他代理工作流中有效,并在API中添加了代码执行和程序化工具调用等原生支持。现在,我们将这些技术引入网页搜索和网页抓取。

Evaluating Claude’s ability to search the web评估Claude的网页搜索能力

We evaluated web search on Sonnet 4.6 and Opus 4.6 with and without dynamic filtering and no other tools enabled. Across two benchmarks, BrowseComp and DeepsearchQA, dynamic filtering improved performance by an average of 11% while using 24% fewer input tokens.

BrowseComp: Searching the web to find one answer
我们在Sonnet 4.6和Opus 4.6上评估了带动态过滤和不带动态过滤的网页搜索,且未启用其他工具。在两个基准测试BrowseComp和DeepsearchQA中,动态过滤使性能平均提升11%,同时输入令牌使用量减少24%。BrowseComp:搜索网页以找到一个答案

BrowseComp tests whether an agent can navigate many websites to find a specific piece of information that is deliberately hard to find online. Dynamic filtering improved Claude’s accuracy significantly, bringing Sonnet 4.6 from 33.3% to 46.6% and Opus 4.6 from 45.3% to 61.6%.

BrowseComp测试代理能否在多个网站中导航,找到一条故意难以在线找到的特定信息。动态过滤显著提升了Claude的准确率,将Sonnet 4.6从33.3%提升至46.6%,Opus 4.6从45.3%提升至61.6%。

DeepsearchQA: Searching the web to find many answersDeepsearchQA:搜索网页以找到多个答案

DeepsearchQA presents agents with research queries that have many correct answers, all of which must be found via web search. It tests whether an agent can systematically plan and execute multi-step searches without missing any answers. It’s measured by an “F1 score,” which balances precision and recall—capturing both the accuracy of returned answers and the completeness of the search.DeepsearchQA向代理提出具有多个正确答案的研究查询,所有答案都必须通过网页搜索找到。它测试代理能否系统性地规划并执行多步搜索,而不遗漏任何答案。该测试通过“F1分数”衡量,平衡了精确率和召回率——既考察返回答案的准确性,也考察搜索的完整性。

Dynamic filtering improved Claude’s F1 score from 52.6% to 59.4% for Sonnet 4.6 and from 69.8% to 77.3% for Opus 4.6.动态过滤将Claude的F1分数从Sonnet 4.6的52.6%提升至59.4%,Opus 4.6从69.8%提升至77.3%。

Token costs will vary depending on how much code the model needs to write to filter context. Price-weighted tokens decreased for Sonnet 4.6 on both benchmarks but increased for Opus 4.6. To better understand your own costs, we recommend evaluating this tool against a representative set of web search queries your agent is likely to encounter in production.令牌成本会因模型为过滤上下文所需编写的代码量而异。在两项基准测试中,Sonnet 4.6的加权价格令牌有所下降,但Opus 4.6有所上升。为了更好地了解自身成本,我们建议针对代理在生产中可能遇到的一组代表性网页搜索查询来评估此工具。

Customer spotlight: Quora客户聚焦:Quora

Poe by Quora is one of the largest multi-model AI platforms, giving millions of users access to over 200 models through a single interface. Internal teams at Quora found that Opus 4.6 with dynamic filtering “achieved the highest accuracy on our internal evals when tested against other frontier models,” said Gareth Jones, Product and Research Lead. “The model behaves like an actual researcher, writing Python to parse, filter, and cross-reference results rather than reasoning over raw HTML in context.
Quora旗下的Poe是最大的多模型AI平台之一,通过单一界面为数百万用户提供超过200个模型的访问权限。Quora内部团队发现,带动态过滤的Opus 4.6“在与其他前沿模型的内部评估中取得了最高准确率,”产品与研究负责人Gareth Jones表示。“该模型的行为就像一位真正的研究员,编写Python来解析、过滤和交叉引用结果,而不是在上下文中对原始HTML进行推理。”

Dynamic filtering in the web search and fetch tools网页搜索和抓取工具中的动态过滤

Dynamic filtering will be turned on by default when using our new web search and web fetch tools with Sonnet 4.6 and Opus 4.6 on the Claude API. For complex web search queries, such as sifting through technical documentation or verifying citations, you can expect similar performance improvements to those shown above.在Claude API上使用Sonnet 4.6和Opus 4.6的新版网页搜索和网页抓取工具时,动态过滤将默认开启。对于复杂的网页搜索查询,例如筛选技术文档或验证引用,您可以预期获得与上述类似的性能提升。

Here’s how to use it in the API:以下是在API中的使用方法:

{
  "model": "claude-opus-4-6",
  "max_tokens": 4096,
  "tools": [
    {
      "type": "web_search_20260209",
      "name": "web_search"
    },
    {
      "type": "web_fetch_20260209",
      "name": "web_fetch"
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "Search for the current prices of AAPL and GOOGL, then calculate which has a better P/E ratio."
    }
  ]
}

Code execution, memory, and more tools are now generally available代码执行、记忆及更多工具现已全面可用

We’re also graduating several tools to general availability to help agents perform better across token-intensive tasks:我们还将多个工具升级为全面可用,以帮助代理在令牌密集型任务中表现更佳:

  • Code execution: Provides a sandbox for agents to run code during a conversation to filter context, analyze data, or perform calculations.代码执行:为代理提供沙箱,使其能在对话期间运行代码,以过滤上下文、分析数据或执行计算。
  • Memory: Store and retrieve information across conversations through a persistent file directory, so agents can retain context without keeping everything in the context window.记忆:通过持久化文件目录跨对话存储和检索信息,使代理无需将所有内容保留在上下文窗口中即可保持上下文。
  • Programmatic tool calling: Execute complex multi-tool workflows in code, keeping intermediate results out of the context window.程序化工具调用:在代码中执行复杂的多工具工作流,将中间结果保留在上下文窗口之外。
  • Tool search: Dynamically discover tools from large libraries without loading all definitions into the context window.工具搜索:从大型库中动态发现工具,无需将所有定义加载到上下文窗口中。
  • Tool use examples: Provide sample tool calls directly in your tool definitions to demonstrate usage patterns and reduce parameter errors.工具使用示例:直接在工具定义中提供示例工具调用,以演示使用模式并减少参数错误。

Getting started 开始使用

Improved web search and web fetch—as well as code execution, memory, programmatic tool calling, tool search, and tool use examples—are available now on the Claude Platform. Read our API documentation to get started.改进后的网页搜索和网页抓取——以及代码执行、记忆、程序化工具调用、工具搜索和工具使用示例——现已在Claude平台上可用。请阅读我们的API文档以开始使用。

No items found.
Prev
0/5
Next
eBook

No items found.

Transform how your organization operates with Claude

See pricing
Contact sales

Get the developer newsletter

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.

Subscribe

Please provide your email address if you'd like to receive our monthly developer newsletter. You can unsubscribe at any time.

Thank you! You’re subscribed.
Sorry, there was a problem with your submission, please try again later.
Claude Platform
Agents