Dev.to AI 🤖 Ai 👁 0 📖 2 min read

AWS adds tabular search to Bedrock Managed Knowledge Base

AWS has added tabular search to Amazon Bedrock Managed Knowledge Base, as described on the AWS Machine Learning Blog. The feature lets agentic retrieval answer questions that depend on data in CSV, XLSX and XLS files.

AWS has added tabular search to Amazon Bedrock Managed Knowledge Base, as described on the AWS Machine Learning Blog. The feature lets agentic retrieval answer questions that depend on data in CSV, XLSX and XLS files.

The problem it targets

Standard retrieval-augmented generation returns a limited set of passages that best match a question. That suits prose but breaks down on tables. A long table is split across many passages, so a total or threshold check is built from only a few rows. A wide table can hold more text in one row than a passage or search model handles, so values in later columns are harder to match. Questions also use business terms while tables hold cost center codes and account names, and the rule that gives the numbers meaning often sits in a separate policy document.

How it works

Tabular search is part of the existing agentic retrieval flow, so there is nothing to switch on. Requests go through the same AgenticRetrieveStream call used for documents. The system pulls relevant excerpts, determines whether code ought to execute against one or several of the fetched tables, and duplicates the source file into a sealed-off sandbox that is cut off from any network. Model-written code runs over the full table or sheet and returns only what it prints, such as totals or matching rows. The agent then writes an answer from those results and the retrieved passages, with citations.

Retrieval still has to find the right table file first, so naming the file in the question helps, particularly when a draft and a final version exist. The Retrieve API still returns passages only and does not run code. The feature works with files brought in through connectors such as Amazon S3, Microsoft SharePoint and Atlassian Confluence.

The example

The post uses fictitious finance files: a profit and loss workbook, a variance policy, a quarter-close memo and a business review. One question asks which departments must write variance commentary. The answer needs the policy's threshold, the memo's budget revisions and calculations over every department row. Plain retrieval returns passages but no answer. Tabular search names Sales, Engineering and Operations, cites the policy and memo, and the trace shows which workbook the code read.

Limits to know

  • Answers that use table data take longer, because running code adds at least one more agent turn.
  • Governed metrics, recurring dashboards and warehouse-scale joins still belong in BI tools.
  • Files above the data source's size filter are not ingested, so the code cannot read them.
  • Code runs over CSV files up to 500 MB but over Excel sheets only up to 200 MB, as of the post's writing.
  • The generated code is not returned, because it can echo cell values. The trace names the files read.
  • The calling identity needs the agentic retrieval permissions, including bedrock:GetDocumentContent, because the agent reads the original file with the caller's credentials.

The post also covers a sample setup with an S3 data source, multi-turn conversations, and metadata filters that control which files the code may read.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.