AWS shows how to tune Bedrock knowledge bases for complex documents with Textract

AWS published a reference solution pairing Amazon Textract with Bedrock knowledge bases to improve RAG accuracy on long, table-heavy documents such as utility bills.

Paylaş
AWS shows how to tune Bedrock knowledge bases for complex documents with Textract

AWS has detailed a solution for customizing Amazon Bedrock knowledge bases so they can handle large, complex documents. The scenario in the post is a customer service team processing thousands of utility bills a month, where inconsistent formats, dense tables and varied layouts make it hard to pull out the right values.

According to the post, the customer first tried a Retrieval Augmented Generation (RAG) pipeline fed with the raw bills. That failed: the large language model (LLM) missed key details and in some cases hallucinated, returning incorrect or irrelevant information. The team concluded that loading raw documents was not enough and that preprocessing was required.

Textract in front of the pipeline

The proposed design puts Amazon Textract, a text extraction service, in front of Bedrock. Textract pulls out structured and unstructured content, relevant tables are tagged, and the result is converted into a form the model can use. That makes fields such as account numbers, billing details and payment instructions queryable instead of buried in a PDF. Supported file types are PDF, DOCX, TXT, HTML, XLSX and PNG.

Deployment and guardrails

Deployment runs through an AWS CloudFormation stack launched by a shell script. The stack provisions Lambda functions, S3 buckets, an OpenSearch Serverless cluster and an Amazon Bedrock knowledge base. After the stack completes, you configure the S3 bucket, upload sample documents and set up the knowledge base; uploaded files are then processed automatically into a knowledge base ready format.

For production use, AWS recommends enabling Amazon Bedrock Guardrails, which offers configurable controls to filter harmful content, block denied topics and redact sensitive information from inputs and outputs. Grounding validation checks whether a model response is supported by the retrieved source documents, helping reduce hallucinations.

The code for the walkthrough is on GitHub. Full steps are in the AWS blog post.

Devamını oku

Liquid AI تطلق أكبر نماذج LFM2.5 المفتوحة لتشغيل الوكلاء على الأجهزة

Liquid AI تطلق أكبر نماذج LFM2.5 المفتوحة لتشغيل الوكلاء على الأجهزة

أطلقت Liquid AI نموذج LFM2.5-24B-A2B كنموذج مفتوح، ويضم 24 مليار معامل إجمالا لكنه يشغل نحو 2.5 مليار منها في كل خطوة. وبحسب النتائج التي نشرتها الشركة، يولد النموذج المدرب للوكلاء الذين يستخدمون الأدوات 184 رمزا في الثانية على Apple M5 Max.

GlobalFeed Editor tarafından