Agentic Retrieve Captures Context and Structure Simultaneously
Amazon Web Services (AWS) has consecutively unveiled two core features in the Bedrock Managed Knowledge Base. One is the combination of Agentic Retrieve with AgentCore Memory to automatically manage user-specific long-term context, and the other is Tabular Search, which executes code on CSV, XLSX, and XLS files in a code sandbox to answer analytical queries. Both updates are added in an opt-in manner to existing `AgenticRetrieveStream` requests without the need for separate pipeline construction, maintaining backward compatibility.
"Users expect knowledge-based applications to remember them. It’s not just about good search capabilities." — AWS Machine Learning Blog, Memory Recognition AI Agent Post
Memory Recognition: Part of Enhancing Conversation History Search
The existing RAG pipeline required conversation history to be stored in a separate repository, with the application needing to extract facts directly to inject into the current query. Bedrock AgentCore Memory has absorbed this step into a managed service. Developers simply need to add the `memoryConfiguration` parameter to the `AgenticRetrieveStream` request. When the planner determines that user-related facts are needed, it retrieves those facts from long-term memory to construct a sub-query, and after generating a response, it saves that turn back into memory.
Multi-Tenant Isolation Enforced by IAM
As seen in the AnyCompany example, multiple users can share a single knowledge base and a single memory resource while isolating document access permissions (ACL) and memory namespaces on a per-user basis. By reading user identity from the Amazon Cognito ID token and passing it as `userContext`, the knowledge base returns only the documents permitted by the ACL, and the memory only queries the relevant user namespace. Additionally, IAM policies enforce memory isolation to prevent data leakage even in the event of application code errors.
Tabular Search: Calculated Answers through Code Execution, Not Search
Tabular data has been a weakness of the existing RAG. Long tables with thousands of rows split into multiple passages can lead to incomplete summation, comparison, and threshold checks if only the top k rows are returned. Wide tables may have a single row exceeding the passage and embedding model input length, causing mismatches in the back column values. Furthermore, issues arise from gaps between business terms (e.g., "controllable spending") and the table's codes and numbers, difficulties in distinguishing drafts from final versions, and rules that provide meaning being in separate documents.
Tabular search addresses this issue by separating search and execution. The retriever only needs to find one passage from the "correct table file," and then executes code in an isolated sandbox to read the entire original file for calculations. In a finance team example, in response to the query, "Which department needs to write the variance analysis commentary?", it calculates the budget revision memo for the quarter-end and the entire profit and loss (P&L) workbook to derive the target department, citing the policy document, memo, and workbook.
| Processing Method | Long Table Processing | Wide Table Processing | Rule Document Integration | Calculation Accuracy |
|---|---|---|---|---|
| General Retrieve | Uses only top k rows → Incomplete | Difficulties matching back columns | Requires separate prompts | Inaccurate |
| Tabular Search | Executes full row code → Complete | Access to all columns | Automatic integration within Agentic Flow | Accurate |
Integrated Architecture: Single Request, Multiple Sources
The two features operate independently while collaborating within the same `AgenticRetrieveStream` call. After analyzing the query, the planner autonomously decides which necessary steps to take among △knowledge base document search △long-term memory fact retrieval △tabular file code execution, and sends sub-queries. Through tracing, it is possible to verify which source read which file and when memory was involved. The managed service handles planning, execution, citation, and isolation in a batch process without a separate orchestration layer.
- Receive Query
- Planner Judgment
- Parallel Execution of Document Search, Memory Retrieval, and Table Code Execution
- Result Compilation and Citation Generation
- Memory Storage and Response Return
Design Points Developers Should Consider
- Memory Namespace Design: The level of isolation, such as by user, session, or application unit, should be predefined. The AnyCompany example adopted user-specific namespaces.
- ACL File Management: Place a global ACL file in the S3 bucket and map read permissions by folder. For example, "Everyone reads HR and IT, only engineers read the runbook, only sales read the sales plan."
- Table File Naming: Including the file name in the query makes it easier for the retriever to find the correct workbook. Version control (draft/final) rules should also be reflected in naming.
- Trace Monitoring: Log whether the planner used memory and which table file was executed for debugging and audit tracking purposes.
Enterprise RAG: From "Search" to "Inference, Memory, and Calculation"
This update demonstrates that the Bedrock Managed Knowledge Base has evolved beyond a simple vector search wrapper into an Agentic Inference Engine. It addresses three essential enterprise requirements—user context memory, permission-based document isolation, and structured data operations—through a single managed API. It has transformed the previously direct operations of conversation storage, fact extraction, ACL filtering, table parsing, code execution sandboxing, and multi-tenant isolation infrastructure into services, allowing development teams to focus on business logic.