Amazon Web Services has detailed agentic retrieval capabilities within Amazon Bedrock Managed Knowledge Bases, allowing Retrieval-Augmented Generation (RAG) applications built with LangChain to execute multi-step query planning. Exposed through the langchain-aws package, the feature replaces standard single-vector similarity searches with an iterative loop that decomposes complex questions into targeted sub-queries.
Multi-Step Retrieval Replaces Single-Vector Search
When handling multi-part or comparative questions—such as evaluating multiple products across distinct features—standard single-shot retrieval relies on a single embedding vector to represent the query. According to AWS, this single-vector approach often returns topically relevant chunks while missing key intents embedded in complex prompts.
The AgenticRetrieveStream API addresses this limitation by running an internal planning model. It executes speculative retrieval, breaks the user query into discrete sub-queries, evaluates whether the retrieved context provides sufficient evidence, and triggers additional search cycles if gaps remain. If specific context passages are insufficient, the planner can invoke full document expansion calls to retrieve entire source files.
Benchmark Gains Across Complex Datasets
AWS evaluated the agentic retrieval mechanism against the MuSiQue public multi-hop benchmark, reporting improved retrieval recall compared to single-shot searches. The gains were highest on complex multi-hop questions requiring multi-step context collection, while simple single-hop queries showed recall improvements of under five points.
In addition to multi-step query planning, agentic retrieval enables applications to query across up to five distinct knowledge bases within a single request. The planning model routes individual sub-queries to specific repositories using natural-language descriptions assigned to each knowledge base.
Trade-Offs in Latency, Cost, and API Behavior
Despite recall improvements, agentic retrieval incurs higher latency and financial cost due to multiple foundation model calls during execution. The process relies on an iteration budget controlled by the maxAgentIteration parameter, which ranges from two to ten and defaults to five. Settings below four prevent query decomposition, resulting in single-shot search behavior at agentic pricing tiers.
Developers transitioning from standard retrieval must accommodate structural API differences. Unlike the standard Retrieve API, agentic retrieval results do not include typed relevance score fields in output metadata. Additionally, guardrail enforcement for agentic retrieval is restricted to BLOCK mode through specific policy configurations, whereas standard retrieval offers broader integration options.
AI-generated editorial illustration; not a documentary photograph.
Source: Agentic retrieval with LangChain and Amazon Bedrock Knowledge Bases

Leave a Reply