Anthropic API现已推出网页搜索功能
Web search on the Anthropic API

原始链接: https://www.anthropic.com/news/web-search-api

Anthropic公司为Anthropic API推出了网页搜索功能,使Claude能够访问来自网络的实时信息。这允许开发者构建人工智能驱动的应用程序和代理,能够在金融、法律和软件开发等各个行业提供最新的见解。 Claude利用其推理能力来判断何时需要进行网页搜索,生成目标查询,分析结果,并提供包含引文的全面答案。它甚至可以进行多次渐进式搜索以进行深入研究。 开发者无需管理自己的搜索基础设施即可访问最新信息。控制功能包括域名允许/阻止列表和组织级管理,以确保数据来源的可靠性和安全性。Poe和Adaptive.ai已经集成了此功能,并称赞其具有成本效益、速度快且全面。 网页搜索功能适用于Claude 3.7 Sonnet、升级版的Claude 3.5 Sonnet和Claude 3.5 Haiku,价格为每1000次搜索10美元,另加标准的token费用。

这个 Hacker News 线程讨论了 Anthropic 新的用于大型语言模型的网页搜索 API。主要讨论点包括: * **多跳搜索和查询优化:** API 根据之前的上下文优化搜索的能力被认为很有价值,但也可能复杂且成本高昂。 * **相关性错配:** 用户强调了将搜索结果的相关性与大型语言模型的相关性对齐的挑战,建议需要基于消息线程/提示上下文重新排序以优先考虑更高质量的信息来源。 * **定价:** 初步反应表明,定价(每 1000 次查询 10 美元)与 Google 的 Gemini 和 OpenAI 相比具有竞争力。但是,结果的存储和修改受到限制。 * **定制化:** 用户表达了对配置搜索提供商(例如,使用 Kagi)以及对搜索参数和重新排序进行更多控制的兴趣。 * **数据使用:** 已确认搜索结果计入输入 token,从而影响总体成本。 * **搜索质量:** 人们对搜索结果的质量表示担忧,尤其是在 SEO 和 AI 垃圾信息风险日益增长的背景下。 * **潜在限制:** 一些用户发现,将搜索功能与其他功能结合使用时,其能力有限。

原文

Today, we're introducing web search on the Anthropic API—a new tool that gives Claude access to current information from across the web. With web search enabled, developers can build Claude-powered applications and agents that deliver up-to-date insights.

Power AI agents with the latest information from the web

Developers can now augment Claude’s comprehensive knowledge with current, real-world data by enabling the web search tool when making requests to the Messages API.

When Claude receives a request that would benefit from up-to-date information or specialized knowledge, it uses its reasoning capabilities to determine whether the web search tool would help provide a more accurate response. If searching the web would be beneficial, Claude generates a targeted search query, retrieves relevant results, analyzes them for key information, and provides a comprehensive answer with citations back to the source material.

Claude can also operate agentically and conduct multiple progressive searches, using earlier results to inform subsequent queries in order to do light research and generate a more comprehensive answer. Developers can control this by adjusting the max_uses parameter. Behind the scenes, Claude may also refine its queries to deliver a more accurate response.

With web search, developers can now build AI solutions that tap into current information without needing to manage their own web search infrastructure.

Use cases

Web search enables Claude to power a wide range of use cases that benefit from real-time data and specialized knowledge across various industries. Use cases include:

  • Financial services: Build AI agents that analyze real-time stock prices, market trends, and regulatory updates.
  • Legal research: Create tools that access recent court decisions, regulatory changes, and legal news.
  • Developer tools: Enable Claude to reference the latest API documentation, GitHub releases, and technology updates.
  • Productivity: Build agents that incorporate the latest company reports, competitive intelligence, or industry research.

Build with trust and control

Every web-sourced response includes citations to source materials, enabling users to verify information directly. This is particularly valuable for sensitive use cases that require accuracy and accountability.

Organizations can maintain additional control through the following admin settings:

  • Domain allow lists: Specify which domains Claude can search and retrieve information from, ensuring that results only come from approved sources.
  • Domain block lists: Prevent Claude from accessing certain domains that may contain sensitive, competitive, or inappropriate content for your organization.
  • Organization-level management: Administrators can allow or prohibit web search use at the organization level.

Enhance Claude Code with web search

Web search is also now available in Claude Code, adding the latest information from the web to development workflows.

With web search enabled, Claude Code can access current API documentation, technical articles, and other information on development tools and libraries. This is particularly valuable when working with new or rapidly evolving frameworks, troubleshooting obscure errors, or implementing features that require version-specific API references.

Customer Spotlight: Poe

Quora is bringing web search to its AI platform, Poe.

“Anthropic's web search tool is a welcome addition to the Poe platform. It is cost effective and delivers search results with impressive speed, which will benefit people who need access to real-time information while using Claude models on Poe,” said Spencer Chan, Head of Poe Product, Quora.

Custom Spotlight: Adaptive.ai

Adaptive is an AI tool for consumers to create end-to-end apps.

“Anthropic’s web search delivers consistently thorough results that have outperformed other tools we’ve tested. The depth and accuracy of Claude’s responses and its ability to function as a research agent will make a significant difference in how effectively we enable our customers to build web-enabled products,” said Dennis Xu, Co-founder, Adaptive.

Getting started

Web search is now available on the Anthropic API for Claude 3.7 Sonnet, the upgraded Claude 3.5 Sonnet, and Claude 3.5 Haiku at $10 per 1,000 searches plus standard token costs.

To get started, enable the web search tool in your API requests. Explore our documentation and pricing to learn more.

联系我们 contact @ memedata.com