在托管 Amazon Bedrock 知识库上使用 CDK 构建 Agentic 检索
摘要
AWS 发布技术博客,介绍如何用 CDK 在托管 Amazon Bedrock 知识库上构建企业级 Agentic 检索,并说明其相比传统单次 RAG 的优势与可观测性挑战。
核心要点
- 传统单次 RAG 在问题答案跨两个语料库时只返回一半所需信息,模型给出的答案流畅但不完整,这比不返回更糟。
- Agentic 检索让推理 agent 在生成答案前决定是否检索、选择哪个知识库、是否需要二次检索,从而应对单索引无法处理的复杂问题。
- Amazon Bedrock 推出 Managed Knowledge Base(类型 MANAGED),由服务自身负责摄取、存储、索引和检索,用户不再需要创建、扩展或为 OpenSearch Serverless 集合与索引支付 OCU 费用。
- Bedrock 提供 AgenticRetrieveStream API 作为一等服务功能,AgentCore 则提供 Gateway(将每个知识库暴露为 MCP 工具)和 Runtime(托管推理 agent)等组件。
- 相比 2024 年 8 月的 CDK 单次 RAG 方案(S3 语料 + OpenSearch Serverless 集合与索引 + 知识库 + 数据源),托管方案简化了基础设施编排,但也将复杂性转移到可观测性上。
原文佐证
- The agent decides whether to retrieve, which knowledge base to consult, and whether to go back for more before it composes an answer.
- With the launch of the Managed Knowledge Base, retrieval is no longer a single embed-and-fetch call. It has become an agentic capability: multi-turn planning, tool-driven retrieval, and grounded, cited answers.
- Observability stops being a nice-to-have and becomes the only way to know the system works.
AI 洞察
企业 RAG 正从“单次检索+生成”向“推理驱动的多步检索”演进,AWS 把 Agentic 检索做成托管能力,降低了构建门槛,却把复杂性转移到可观测性与运维上。未来知识库的竞争可能从索引性能转向 agent 编排与工具生态(如 MCP),开发者需要把评估、追踪和可观测性作为核心设计的一部分。