AIToday
Large Language ModelsAI Business & IndustryAmazon AI BlogPublished: Sep 5, 2026, 04:00 JST2 min read

AWS Bedrock Custom Knowledge Base Solution for Utility Bills

AWS Bedrock Custom Knowledge Base Solution for Utility Bills

Key takeaway

  • AWS showed how to combine Bedrock and Textract for utility bill analysis.

  • The method preprocesses documents to reduce LLM hallucinations.

  • It deploys via CloudFormation and supports PDF, DOCX, TXT, HTML, XLSX, and PNG.

3 Key Points

  1. What happened

    AWS published a guide to build a custom knowledge base on Amazon Bedrock that uses Amazon Textract to extract text from complex PDFs and images of utility bills. The solution is deployed via AWS CloudFormation and includes Lambda functions, an S3 bucket, an OpenSearch Serverless cluster, and a Bedrock knowledge base.

  2. Why it matters

    A customer service team that tried feeding raw utility bills directly into a RAG model found the LLM missed key details, hallucinated incorrect information, and performed inconsistently across PDF, DOCX, TXT, HTML, and XLSX formats. Preprocessing with Amazon Textract cleans and tags the data so the LLM can reliably pull account numbers, billing details, and payment instructions.

  3. What to watch

    The solution’s value hinges on whether Textract preprocessing truly eliminates LLM hallucinations across all listed formats, not just the tested PDFs and images. Watch whether the Amazon Nova Micro model’s performance in the test step holds up in production on the GitHub code.

Ask the AI about this article →

Summaries like this, in your inbox every morning.

Context & Analysis

This solution addresses the pain point of customer service teams that handle thousands of utility bills each month. The core issue is that feeding raw documents into a RAG model leads to missing details and hallucinations, as the authors demonstrated with the customer's initial attempt. By adding Amazon Textract as a preprocessing layer, the extracted data is cleaned, enriched, and labeled, making it easier for the LLM to retrieve accurate information.

The deployment relies on AWS services like CloudFormation for infrastructure, Lambda for automated processing, and S3 for storage. The solution automatically parses uploaded files, converts them to TXT format, and syncs them into a Bedrock knowledge base.

For production, the authors recommend enabling Amazon Bedrock Guardrails to filter harmful content and redact sensitive information, plus grounding validation to check that responses are supported by the documents. This highlights the importance of safeguards when using RAG in real-world scenarios.

FAQ

Which file formats can Amazon Textract handle in this solution?
Amazon Textract can extract text from PDF, DOCX, TXT, HTML, XLSX, and PNG files, including multi-page PDFs and tables.
What problem did the customer originally encounter with a RAG solution?
The customer initially loaded raw utility bills into a RAG model, but the LLM missed critical details like due dates and account numbers, hallucinated information, and performed inconsistently across different document formats.
How is the solution deployed?
The deployment runs the shell script 'custom_kb_deployment_setup.sh', which creates an AWS CloudFormation stack that provisions Lambda functions, an S3 bucket, an OpenSearch Serverless cluster, and a Bedrock knowledge base.
Amazon AI BlogRead Original Article

Get the latest Large Language Models news every morning

For example, today's edition would include:

  • OpenAI says GPT-6 Astra 'low' beats GPT-5.6 Sol 'high'ITmedia AI+ · 1h ago
  • OpenAI reveals AI agents accelerating research at 3.1× human paceITmedia AI+ · 4h ago
  • OpenAI agents hack German site, incident undisclosedSemafor Tech · 4h ago

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleEnterprise AI 'just getting started', says researcher