AWS has published a deployment pattern that uses Amazon Textract to preprocess complex documents before adding them to an Amazon Bedrock knowledge base. The example focuses on utility bills, where inconsistent layouts, dense tables and multiple file formats made direct retrieval unreliable.

In the initial approach, raw documents were loaded into a retrieval-augmented generation system. The language model missed account details and sometimes returned incorrect or irrelevant information. The revised pipeline extracts structured and unstructured content first, tags relevant tables, and then gives the knowledge base cleaner material to retrieve when answering questions.

The example supports PDF, DOCX, TXT, HTML, XLSX and PNG files. AWS provides code and a shell-driven CloudFormation deployment that creates the required resources. The intended queries cover details such as account numbers, charges, usage and payment instructions, allowing service teams to search large document collections programmatically instead of reading every bill.

This is a technical blueprint rather than evidence that every answer will be accurate. Textract quality still depends on scans and layouts, while retrieval configuration and model behavior require testing against representative documents. Organizations also need access controls for customer records. The useful lesson is that document preparation is part of the AI system: extracting layout and table structure before retrieval can reduce the ambiguity that caused the raw-file approach to fail.