MikhbarMIKHBAR
Artificial Intelligence

Query Claims in Natural Language With Amazon Bedrock

A new technical how-to demonstrates building a conversational claims assistant that answers natural-language questions using Amazon Bedrock Knowledge Bases.

Query Claims in Natural Language With Amazon Bedrock

Introduction to Conversational Claims Assistants

Claim information is frequently distributed across diverse files such as adjuster diary entries, repair estimates, police reports, payment ledgers, and scanned attachments rather than residing in a single searchable field. Policyholders often seek simple status updates, while adjusters require complex data aggregation across multiple records. Addressing these distinct needs efficiently demands robust retrieval and processing capabilities.

To streamline these workflows, Retrieval Augmented Generation (RAG) uses retrieved documents to ground model responses effectively. Using Amazon Bedrock Knowledge Bases, organizations gain a fully managed RAG capability designed for documents. This service manages parsing, chunking, embeddings, and vector storage natively, enabling developers to construct conversational interfaces that return cited answers straight from claim files.

Architecture with an ingestion lane from Amazon S3 to Amazon Bedrock Knowledge Bases and managed vector storage, and a retrieval lane from the user through the claims assistant, AgenticRetrieveStream, and Amazon Bedrock
Image related to the report from AWS Machine Learning Blog · Source: AWS Machine Learning Blog

Core Features and Ingestion Architecture

The technical guide details a setup utilizing synthetic claim records to demonstrate how applications can ingest documents and metadata from Amazon S3. Claim files arrive in formats such as PDF, Word, or text alongside matching metadata sidecars. An ingestion job synchronizes the S3 data source with the knowledge base as documents undergo changes.

Once ingested, the knowledge base parses, chunks, embeds, and indexes the documents and their accompanying metadata inside managed vector storage. Before deployment, developers must verify that they have an AWS account with proper permissions, access to a foundation model enabled via Amazon Bedrock model access, and operate within an supported AWS Region.

Querying and Agentic Retrieval

When users interact with the assistant, plain-language queries are processed using advanced retrieval mechanisms. Agentic retrieval through AgenticRetrieveStream plans an answer by breaking multi-part user questions down into distinct sub-queries, executing one or more retrieval passes, and verifying that the gathered evidence is sufficient before generating a response.

The API streams trace events, answer text, and citations back to the application. Trace events expose the underlying retrieval plan, while individual citations map specific parts of the generated answer directly back to the source claim document. This structure ensures high transparency and traceability for contact center agents and supervisors auditing the responses.

A synthetic claim record showing its file-control fields and evidence index
Image related to the report from AWS Machine Learning Blog · Source: AWS Machine Learning Blog

Metadata Filtering and Contextual Grounding

To scope retrieval accurately, applications can apply metadata filters on specific attributes such as claim ID and claim type using scalar string, number, and Boolean values found in sidecar files. Additionally, a contextual grounding guardrail evaluates the output to block answers that lack support from the retrieved records.

By integrating these guardrails and metadata structures, developers using the AWS SDK for Python (Boto3) can programmatically build secure assistants that handle conflicting revisions, supersede earlier drafts, and maintain strict adherence to regulatory compliance requirements.

Bar chart comparing expected-source retrieval and citation recall for the full suite and the adversarial subset
Image related to the report from AWS Machine Learning Blog · Source: AWS Machine Learning Blog

Creating the Knowledge Base

Building the solution involves configuring the managed knowledge base utilizing the bedrock-agent client. Developers set the knowledgeBaseConfiguration type and embeddingModelType to managed, eliminating the need for manual vector store configurations. A dedicated service role must also be created to grant the knowledge base necessary permissions to read the S3 bucket and use the managed embedding model.

Furthermore, managed vector storage can be secured using customer-managed encryption keys through AWS Key Management Service (AWS KMS) by supplying the appropriate Amazon Resource Name during the setup process.

Sources

Continue chronologically

Related entity coverage