Amazon Bedrock Breaks RAG Limits with Memory and Tabular Data

Amazon Bedrock Managed Knowledge Base has added memory recognition and tabular search capabilities to Agentic Retrieve. Features such as user-specific long-term memory and ACL-based document isolation, along with code execution from CSV and Excel files to answer analytical queries, have been integrated. Both features are combined in an opt-in manner with existing AgenticRetrieveStream requests, maintaining backward compatibility.

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 MethodLong Table ProcessingWide Table ProcessingRule Document IntegrationCalculation Accuracy
General RetrieveUses only top k rows → IncompleteDifficulties matching back columnsRequires separate promptsInaccurate
Tabular SearchExecutes full row code → CompleteAccess to all columnsAutomatic integration within Agentic FlowAccurate

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.

  1. Receive Query
  2. Planner Judgment
  3. Parallel Execution of Document Search, Memory Retrieval, and Table Code Execution
  4. Result Compilation and Citation Generation
  5. Memory Storage and Response Return

Design Points Developers Should Consider

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.

Our take

As Bedrock natively absorbs memory and table operations, the barriers to building enterprise RAG have significantly lowered. The trend of replacing directly built orchestration layers with managed services is expected to accelerate.

Open questions

Source

Back to catalog