Amazon Bedrock Adds Tabular Search for Agentic Retrieval Across Tables and Documents
Summary:Amazon Bedrock Managed Knowledge Base now adds tabular search to agentic retrieval. Rather than treating a spreadsheet as a set of passage-sized chunks, the service first retrieves the relevant file, lets the agent generate code, and executes that code over the original CSV, XLSX, or XLS file inside an isolated sandbox without network access. Only printed results return to the agent, which combines them with retrieved policy or memo passages and emits a cited answer. This design restores whole-
Amazon Bedrock Managed Knowledge Base has added native tabular search. Developers continue to call AgenticRetrieveStream, allowing the agent to locate the correct CSV, XLSX, or XLS file before executing model-generated code in an isolated sandbox without network access. The code can aggregate, compare, and filter complete tables or selected worksheets, after which the agent combines the computed results with policy and memo facts to produce a cited answer.
The important change is not a larger table-chunk budget. It separates file discovery from full-table execution, avoiding the incomplete retrieval that conventional RAG imposes on long and wide tables.
Why Conventional Retrieval Breaks on Tables
Fixed-size passage retrieval works well for prose, but it disrupts the context required for reliable calculations:
- Long tables: Thousands of rows are split across passages, and retrieval returns only a small subset. Totals, maxima, and threshold checks can therefore omit relevant rows.
- Wide tables: A single row may exceed a passage or context window, making later columns harder to match. Long table passages can also match unrelated questions and crowd out more relevant results.
- Semantic mismatch: A user asks about controllable spend, while the table contains cost-center codes, account names, and numbers. Draft and final workbooks may look almost identical, and the rule that gives the numbers meaning may live in a separate policy document.
Tabular search divides the work accordingly. Retrieval identifies the correct file and exposes enough table structure for planning, while code reads the underlying table. File selection remains an accuracy bottleneck, so AWS recommends naming the final file, worksheet, and policy document in the question.
The Agentic Retrieval Flow
Tabular search is already integrated into managed agentic retrieval and requires no separate feature switch:
- Retrieve: Passages are returned, including content identified as coming from a table file.
- Plan: The agent uses the question, table structure, and retrieved documents to decide whether code must run over one or more tables.
- Stage: The original table file is copied into an isolated sandbox with no network access.
- Compute: Model-written code reads the complete table or worksheet and applies filters, joins, and aggregations.
- Return: Only printed results are sent back to the agent, avoiding insertion of the entire table into the context window.
- Answer: The agent combines computed results with document passages and returns an answer, citations, and execution traces.
AgenticRetrieveStream can search one or more knowledge bases. The traditional Retrieve API continues to return passages without executing code. Managed connectors for Amazon S3, Microsoft SharePoint, Atlassian Confluence, and other sources can all ingest eligible table files.
Engineering Trade-offs
Whole-Table Completeness Versus Execution Cost
Tabular search converts approximate top-K retrieval into programmatic processing of the original file. It can cover rows omitted by passage retrieval and preserve filtering and aggregation semantics. The cost model, however, changes: the original file must be staged in a sandbox, and data-access volume grows at least with file size and the number of processed rows. Total latency also depends on script execution, spreadsheet parsing, and agent turns.
AWS confirms that code execution adds at least one agent turn. Text-only lookups should therefore continue to use Retrieve. The service documentation cited in the walkthrough does not disclose sandbox CPU, memory, timeout, concurrency, or parser-parallelism details, nor does it provide end-to-end latency or per-query pricing. Capacity planning still requires regional quota checks and production load testing.
File Selection Remains the Main Error Source
Correct code cannot repair an incorrectly selected file. Similar draft and final workbook names, missing stable keys, duplicate worksheet names, and loose mappings between business terms and column labels can all produce a mathematically correct result for the wrong object. AWS recommends pairing one rule with one table and explicitly naming the authoritative file whenever multiple versions exist.
The service does not require a predefined schema, which makes it quick to onboard heterogeneous CSV and Excel files. It also leaves field mapping, type inference, null handling, and formula semantics to the agent and execution environment. The official material does not specify Excel formula evaluation, encoding compatibility, or malformed-cell behavior. Production deployments need regression tests against representative workbooks rather than validation limited to the demonstration dataset.
Security and Auditability
The sandbox has no network access, and the original file is read with the caller's credentials through bedrock:GetDocumentContent. Generated code is not returned to the caller by design because it could echo cell values. Trace events instead identify planned and actual files, file sizes, and IN_PROGRESS, SUCCEEDED, or FAILED execution states.
This reduces the risk of exposing code that reproduces sensitive cells, but it also limits line-by-line review of the calculation. Teams should use least-privilege IAM roles, restrict S3 prefixes and knowledge-base scope, persist trace events, and independently validate critical monetary results. Long calls emit a progress event roughly every ten seconds to avoid read timeouts. When code fails, the agent generally retries or falls back, although retry counts and fallback policies are not disclosed.
Multi-turn Context
In a multi-turn conversation, the agent can reuse an earlier calculation or apply a policy from conversation history. AgentCore memory resources can hold longer histories instead of resending every turn. This is useful for workflows that calculate once and ask for a policy-based judgment next, but inherited model misunderstandings still apply. Financial answers should be reconciled with the source system or an independent SQL query.
Reported Walkthrough and Evaluation Limits
AWS demonstrates the feature with fictitious AnyCompany Retail finance files:
- For fiscal Q2 of FY2026, the agent applies the finance policy, selects contractor, travel, software, and marketing-program expenses, and compares actuals with budget across all cost centers. The reported result is cost center
CC-3010overspending by USD 124,559.90, with actual spending of USD 394,859.90 against a budget of USD 270,300.00. Counting every operating-expense account instead produces USD 133,434.05, demonstrating how business definitions can change the conclusion. - Fiscal Q3 operating expense is USD 49,572.40 below the revised budget, so the answer is that spending remained within budget. The same amount is above the original budget, requiring the agent to combine workbook data with the close memo's approved revisions.
- When policy requires commentary for variance above 5% of the approved budget, the example returns Sales at -6.50%, Engineering at +5.79%, and Operations at +6.20%. Engineering crosses the threshold only after the approved budget reduction is applied.
These examples show that table computation, policy interpretation, document revision, and citation generation can work together. They are not a standardized benchmark. AWS publishes no task-set size, code-execution success rate, calculation-accuracy metric, error taxonomy, token cost, latency distribution, or controlled comparison with human analysts. The contrast with plain Retrieve is primarily a capability-boundary comparison rather than an equal-condition model-quality test. Current evidence demonstrates feasibility, not yet reliability across arbitrary table structures, dirty data, and adversarial files.
Deployment Guidance for Developers
- Normalize file semantics first: Keep CSV, XLSX, and XLS files alongside related PDF, Word, or Markdown documents, using stable names for authoritative versions, worksheets, and business rules. Export tables embedded in PDFs or Word files before ingestion.
- Configure connectors and permissions: Create a
MANAGED_KNOWLEDGE_BASE_CONNECTORthrough S3, SharePoint, or Confluence. The calling identity needsbedrock:AgenticRetrieveStream,bedrock:GetDocumentContent, the necessarybedrock:Retrievepermission, and model-invocation access. Restrict S3 roles to the intended prefix. - Validate ingestion: After the first synchronization, inspect failed documents and confirm that
_file_typeisCSVfor CSV files andMS_EXCELfor XLSX and XLS files. Incorrect type recognition prevents tabular search from starting. - Respect file limits: Set
maxFileSizeInMegaBytesabove the largest expected file. Tabular search can execute over CSV files up to 500 MB, while Excel worksheet execution is limited to 200 MB. Larger Excel files may still be ingested, but all relevant sheets may not be available for complete calculations. - Write locatable questions: Name the rule document, final workbook, worksheets, and operation—for example, asking for departmental variance from the final FY2026 P&L Actuals and Budget sheets using the revised Q3 budget in the close memo. Break large analyses into multiple turns rather than requesting one oversized script.
- Consume the full trace: Persist Planning and CodeExecution events, verify which files were actually read, and alert on failures, retries, and abnormal execution duration. Reconcile important amounts against source systems or independent SQL queries.
- Use the right tool: Keep fast text lookups on
Retrieve. Governed metrics, recurring reports, standard dashboards, warehouse-scale joins, and large-scale data operations still belong in BI or a data platform. Tabular search is designed for analytical reasoning over files stored alongside enterprise documents, not as a replacement for the enterprise data stack.
— END —Source: AWS Machine Learning Blog (2026-11-16)
Tags: #Amazon Bedrock #Agentic Retrieval #Tabular Search #RAG #Code Execution
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments