Introducing Web Search on Amazon Bedrock for foundation model grounding
https://aws.amazon.com/blogs/machine-learning/introducing-web-search-on-amazon-bedrock-for-foundation-model-grounding/📌 【Amazon Bedrock 新功能】內建 Web Search,讓模型不再「一本正經地胡說八道」
TL;DR:Amazon Bedrock 推出內建 Web Search 工具,透過單一參數即可實現模型知識與即時網路資訊的對齊(Grounding)。
當基礎模型(Foundation Model)需要回答「上週的財報內容」、「昨天的法規變更」或是「今天早上的天氣預報」時,它需要的是訓練資料中未曾包含的即時知識。將模型與當前網路知識進行「對齊」(Grounding),能有效解決模型無法處理時效性問題,並減少幻覺(Hallucinations)現象。
🤔 傳統做法的開發痛點
過去,若要讓模型連結網路知識,開發者必須:
- 尋找、整合並維護第三方搜尋引擎供應商。
- 處理額外的外部 API 調度與管理。
- 進行複雜的第三方供應商安全性審核。
- 面臨數據駐留(Data Residency)與營運成本的風險。
🧩 Amazon Bedrock Web Search 的設計理念
Amazon Bedrock 將 Web Search 轉化為伺服器端(Server-side)的內建工具,讓對齊過程成為原生能力,主要具備以下特點:
- 多源對齊機制:結合了 Amazon 營運、持續更新的數十億筆文件索引,以及內建的知識圖譜(Knowledge Graph)。當問題涉及事實性資訊(如:某本書的作者)時,系統會優先使用知識圖譜來回答,而非單純從網頁文本中進行推論,以減少細微的事實錯誤。
- 高效率的檢索(Context-efficient retrieval):系統不會直接將原始網頁丟給模型,而是進行「語義片段提取」(Semantic snippet extraction),僅提取與查詢相關的段落並針對模型的 Context Window 進行最佳化,減少 Token 消耗並降低延遲。
- 單一參數啟用:透過與 OpenAI 相容的 API 呼叫,只需在現有的 API 請求中加入單一參數即可啟用,無需定義 Function Schema,也無需建立客戶端(Client-side)的工具使用迴圈(Tool-use loop)。
📊 運作流程:從請求到帶有引用(Citations)的回答
當使用者發送請求時,Bedrock 在伺服器端自動完成以下步驟:
- 識別需求:模型判斷該問題需要即時網路知識。
- 執行搜尋:Bedrock 構建搜尋查詢,從索引與知識圖譜中檢索內容。
- 注入上下文:將相關片段、來源 URL 與標題注入模型的 Context Window。
- 生成回應:模型對檢索內容進行推理,並生成帶有結構化引用註解(Annotations)的回應,包含 URL 與頁面標題。
⚠️ 安全性與合規性
對於企業級應用,安全性至關重要:
- 零數據外流(Zero data egress):預設情況下,Web Search 在 AWS 環境內運作,數據不會離開您的 AWS 環境。
- 完整稽核軌跡:與 AWS CloudTrail 整合,會記錄呼叫者身份、時間戳記與動作,方便安全性團隊進行審核,但不會記錄具體的查詢文本或檢索內容以保護隱私。
🎯 實務啟示:如何快速整合
開發者可以透過三個步驟快速導入:
- 配置權限:使用現有的 AWS IAM 身份,並透過
aws-bedrock-token-generator套件產出短暫(最多 12 小時)的 Bearer Token。 - 啟用搜尋:在 OpenAI 相容的 API 請求中,於
tools陣列中加入web_search項目。 - 讀取結果:從回應的
annotations陣列中提取url_citation物件,利用其start_index與end_index來實現行內腳註(Inline footnotes)功能。
🔗 來源
- 標題:Introducing Web Search on Amazon Bedrock for foundation model grounding
- 作者/機構:Anuj Jauhari @ AWS ML
- 連結:https://aws.amazon.com/blogs/machine-learning/introducing-web-search-on-amazon-bedrock-for-foundation-model-grounding/
#AmazonBedrock #AWS #GenerativeAI #LLM #WebSearch #Grounding #MachineLearning #AIInfrastructure #CloudComputing #DeveloperTools
原始資料 AWS ML · 收集於 2026-08-05
摘要原文
When a foundation model needs to answer a question about last week’s earnings call, yesterday’s regulatory change, or this morning’s weather forecast, it needs knowledge it was never trained on. Grounding the model in current web knowledge closes that gap – whether it’s powering chatbots, coding assistants, CLI tools, or enterprise applications, grounding helps answer questions beyond the model’s training and reduces hallucinations. Traditionally, connecting a model to web knowledge required developers to identify, integrate, and maintain a third-party Web Search provider, a process that delays project timelines and introduces data residency risks and operational overhead. At AWS New York Summit 2026, we announced the general availability of Web Search on AgentCore . Today, we are extending it further with the general availability of Web Search on Amazon Bedrock . It is a server-side built-in tool that grounds model responses in current web knowledge. With Web Search, grounding becomes a native capability of Amazon Bedrock, with no third-party vendors to onboard, no external APIs to orchestrate, and no additional third party vendor security reviews to conduct. In this post, we walk through what Web Search on Amazon Bedrock is, why it matters, how to enable it using the OpenAI Responses API, and how to get started with the tool. Web Search is designed for Amazon Bedrock model inference, with the following differentiators: Multi-source grounding approach: Web Search is backed by a web index that Amazon operates, spanning billions of documents and refreshed continually. It combines this index with a built-in knowledge graph that anchors the entities in a domain along with the connections between them. When a question is factual in nature; say, who wrote a particular book or what year an event took place; Web Search uses the knowledge graph to answer with strong confidence, rather than leaving the model to infer the answer from extracted page text. That can help cut down on the small factual inaccuracies that tend to slip in whenever an agent assembles an answer from fragments on its own. Context-efficient retrieval. Rather than handing the model a raw page and hoping it finds the relevant part, Web Search performs semantic snippet extraction – pulling the passages from each web page that bear on the query and returning them in a form optimized for the model’s context window. The model sees the parts that matter, with fewer tokens spent on boilerplate. Retrieval is fast, so grounded responses can be delivered with minimal latency. Single-parameter enablement. Web Search becomes a single parameter in your existing OpenAI-compatible API call, removing the need for vendor onboarding, API keys, orchestration layers, and separate SDKs. Helping with enterprise-grade compliance out of the box. By default, Web Search on Bedrock offers zero data egress, so your data never leaves your AWS environment. As we introduce new capabilities, some future features may expose data only at your explicit request. For the latest information, please refer to the Amazon Bedrock documentation . Web Search operates entirely within Amazon Bedrock’s infrastructure, supporting customers’ compliance requirements. When Web Search is enabled in an API call, Bedrock handles the entire search lifecycle server-side. First, the model identifies that a query requires up-to-date web knowledge. Bedrock then formulates a search query, retrieves relevant content from Amazon’s web index and knowledge graph, and injects results – including relevant snippets, source URLs and titles – into the model’s context window. The model reasons over the retrieved content and generates a grounded response with source citations. The API returns the final response with structured citation annotations, including URL and page title for each referenced source. There’s no client-side tool-use loop to build, no external API responses to parse, and no retries or rate limits to manage – a single API call returns a grounded response. The Responses API supports built-in tools natively, so Web Search can be called without defining a function schema or building a client-side loop. Enablement takes three steps: configure AWS credentials, point the OpenAI client at the bedrock-mantle endpoint, and add the Web Search tool to the request. At launch, Web Search is available for OpenAI models served through Amazon Bedrock’s next-generation inference engine. Step 1: Configure authentication and permissions. Web Search uses your existing AWS credentials – there are no separate API keys to provision. The environment must have AWS credentials available through the standard credential chain (an IAM role, the AWS CLI profile, or environment variables), which are used to authenticate requests to the bedrock-mantle endpoint. The calling identity needs two sets of permissions: Requests to the endpoint are authenticated with an AWS-issued bearer token, which you can mint from your existing AWS credentials using the aws-bedrock-token-generator package. This bearer token isn’t a separate API key; it’s a short-lived (up to 12 hours) credential derived from your existing AWS IAM identity via SigV4, packaged in the format the OpenAI client expects for its api_key parameter. No additional key management is required. Start from a standard call. A normal Responses API call, without grounding, looks like this: Step 2: Enable Web Search. To ground that same call in web knowledge, add a single tools entry: The optional external_web_access field selects where Web Search retrieves from: Amazon’s pre-indexed web corpus, or live content fetched directly from the web. Today only indexed-web retrieval is served; live-web retrieval will be enabled in a future update, and the parameter is already in the API so your code won’t need to change. The default is true, which requires the bedrock-websearch:ExternalWebAccess permission. The examples below set false, which needs no additional permission. Step 3: Read the grounded response with citations. Putting it together, here’s the complete end-to-end example, including how to extract the source citations: The above code produces the following output (abridged): In this sample, the request includes a Web Search entry in the tools array. Bedrock executes the search server-side and returns the grounded response in a single round-trip – there is no function schema to define and no client-side loop to manage. Each citation is a url_citation object in the message content’s annotations array. Its wire shape: start_index and end_index are character offsets into output_text, letting you render inline footnotes or highlight the exact span each citation supports. Web Search is integrated with AWS CloudTrail out of the box. Every call to bedrock-websearch:InvokeSearch and bedrock-websearch:InvokeFetch is recorded as a management event, capturing the calling identity, timestamp, action, source identity (including any forward-access-session originator), and the account and Region context of the request. Access-denied outcomes are always logged, and each AccessDeniedException event includes the specific condition key that caused the denial — which makes IAM misconfigurations easy to diagnose without turning on additional trails. By design, CloudTrail does not record the query text, the URLs returned by search, or the raw page content retrieved by fetch. Query text is treated the same way as an inference prompt and is never exposed in trail events. Combined with in-Region processing and zero data egress, this gives security and compliance teams a full audit trail of who used the tool when, without exposing what end users searched for. Web Search on Amazon Bedrock removes the undifferentiated heavy lifting of connecting foundation models to up-to-date web knowledge.
由 tencent/hy3:free 自動生成