Get answers from tables with tabular search in Amazon Bedrock Managed Knowledge Base

Amazon Web Services has added tabular search to Amazon Bedrock Managed Knowledge Base, letting applications get answers that require reading and computing over spreadsheet data through the same agentic retrieval flow they already use for documents. The capability works with CSV, XLSX and XLS files, and it is part of agentic retrieval rather than a feature that has to be switched on. It arrives through the existing AgenticRetrieveStream request.
The design responds to a known weakness in retrieval-augmented generation. RAG retrieves a fixed number of text passages, which works well for prose but degrades on tables. In a long table spanning thousands of rows, only a few passages come back, so a total, comparison or threshold check built from them will be incomplete. In a wide table, a single row can exceed what a passage or search model holds at once, pushing values in later columns out of reach. Search also has to connect a business phrase like controllable spend to cost center codes and numbers, and a draft workbook looks nearly identical to a final one.
Tabular search splits that work. Retrieval only needs to surface one passage from the correct table file; from there, code reads the entire table. The request moves through stages: retrieval returns passages including ones from a table file; the agent plans whether to run code based on the question and table structure; the original file is copied into an isolated sandbox with no network access; model-written code executes over the whole table or sheet; only what the code prints, such as totals or matching rows, returns to the agent; and the agent answers from those results plus the passages, with citations. Naming the file in a question is said to help, since retrieval still has to find it first.
The API boundary matters for developers. An AgenticRetrieveStream request can search one knowledge base or several, and the plain Retrieve API continues to return passages without executing code. Tabular search behaves the same regardless of which connector ingests the files, including Amazon S3, Microsoft SharePoint and Atlassian Confluence. The calling identity needs permissions for agentic retrieval, including bedrock:GetDocumentContent, because the agent reads the original file with the caller's credentials.
The walkthrough uses a fictional AnyCompany Retail finance scenario: a final P&L workbook with Notes, Actuals, Budget and Summary sheets, a draft workbook with different Q3 numbers, a finance variance policy PDF, a Q3 close memo in Word, and a Markdown business review. These sit in the tabular-search folder of the sample-managed-knowledge-base-patterns GitHub repository, alongside an AWS CDK app and Python scripts.
Setup requires Python 3.10 or later with Boto3 version 1.43.123 or later, a Region where the feature is available, and permissions to create IAM roles, S3 buckets and knowledge bases. Files go under a single prefix in a bucket with public access blocked. The knowledge base uses a bedrock.amazonaws.com trust policy scoped to the caller's account and knowledge base ARNs, a role limited to s3:ListBucket and s3:GetObject on that bucket, a knowledge base of type MANAGED with the managed embedding model, and a MANAGED_KNOWLEDGE_BASE_CONNECTOR data source restricted to the finance/ prefix with maxFileSizeInMegaBytes set above the largest file and SMART_PARSING enabled.
One operational detail is easy to miss: tabular search can only start if the knowledge base assigns the right file type, so after the first sync developers should run a Retrieve call and confirm table passages report _file_type as CSV or MS_EXCEL. The sample ingestion script polls the job until COMPLETE, FAILED or STOPPED and prints job statistics and failure reasons.
The worked question asks, for fiscal Q2 of FY2026, which cost center had the largest overspend in controllable spend as the policy defines it, comparing Actuals and Budget sheets of the FY2026 P&L workbook. The policy defines controllable spend as the Contractors, Travel, Software and Marketing Programs accounts, excluding salaries and facilities. The code filters both sheets to that quarter and those accounts across every row, and the answer is CC-3010 (Platform), over by 124,559.90 US dollars, with actual spending of 394,859.90 against a budget of 270,300.00. Counting every operating expense account instead yields 133,434.05.
Trace events arrive in a defined order: a Planning event with status SUCCEEDED naming the documents the code will read; CodeExecution events going from IN_PROGRESS to SUCCEEDED, with the success message naming each file and its size; then a second planning round, the response text and a final result event carrying citations. Citations point to passages the answer used, so a table the code read is not always among them. In the sample, the Planning event names only the final workbook because the policy and business review arrive as retrieved passages.
AWS is explicit about limits. Running code adds at least one more agent turn, so table-backed answers take longer than text-only ones. Governed metrics, recurring dashboards, warehouse-scale joins and reporting controls remain the province of BI tooling. Tabular search operates on table files stored next to documents and requires no schema definition.
In practice, this looks like a useful middle layer between document RAG and a full analytics warehouse: good for ad hoc, multi-step questions that mix policy prose with spreadsheet math, less suited to high-volume or auditable reporting. A likely trade-off is latency and sandbox resource use on very large workbooks. Worth noting is that citations do not necessarily surface the spreadsheet the code relied on, so teams wanting strict provenance may need to inspect the trace rather than the citation list.
Why it matters: Teams that keep policies and memos beside their spreadsheets can now ask questions whose answers require computing across entire workbooks and reconciling them with document text, without building custom extraction pipelines or defining a schema. Developers already on agentic retrieval mostly need to grant the extra document-content permission and confirm file types after sync. Anyone needing certified, repeatable numbers should still route those through BI tools, since code execution adds latency and the citation trail does not always point at the table itself.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Amazon Bedrock Managed Knowledge Base now supports tabular search, so agentic retrieval can answer questions over CSV, XLSX, and XLS files. It looks up values and runs calculations across every relevant row, then combines the results with facts from related documents to answer multi-step analytical questions.