Change
f6fa54e
f6fa54ef3966a2913f93b4851e19da5337929f1d · commit on GitHub
aws-blog-feed: changed (575771 bytes, HTTP 200)
raw/aws-blog-feed/response.xml modified
- Source
- aws-blog-feed
- Lines added
- +942
- Lines removed
- -687
- Stored bytes at this commit
- 575,771
- Timestamp
- observed
- Raw artifact at this commit
- raw/aws-blog-feed/response.xml
Recorded headers
| observed_at | 2026-10-01T05:54:03.519Z |
|---|---|
| origin_date | null |
| status | 200 |
| final URL | https://aws.amazon.com/blogs/machine-learning/feed/ |
| etag | null |
| last-modified | Thu, 01 Oct 2026 02:28:28 GMT |
| date | Thu, 01 Oct 2026 05:54:03 GMT |
| age | null |
| cache-control | null |
| cf-cache-status | null |
| content-encoding | null |
| content-length | null |
@
@@ -5,7 +5,7 @@ <atom:link href="https://aws.amazon.com/blogs/machine-learning/feed/" rel="self" type="application/rss+xml"/> <link>https://aws.amazon.com/blogs/machine-learning/</link> <description>Official Machine Learning Blog of Amazon Web Services</description>-
<lastBuildDate>Wed, 30 Sep 2026 01:13:14 +0000</lastBuildDate>+
<lastBuildDate>Wed, 30 Sep 2026 15:37:15 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod> hourly </sy:updatePeriod>@
@@ -13,6 +13,947 @@ 1 </sy:updateFrequency> <item>+
<title>Query claims in natural language with Amazon Bedrock Knowledge Bases</title>+
<link>https://aws.amazon.com/blogs/machine-learning/query-claims-in-natural-language-with-amazon-bedrock-knowledge-bases/</link>+
+
<dc:creator><![CDATA[Shreya Pawaskar]]></dc:creator>+
<pubDate>Wed, 30 Sep 2026 15:37:15 +0000</pubDate>+
<category><![CDATA[Advanced (300)]]></category>+
<category><![CDATA[Amazon Bedrock]]></category>+
<category><![CDATA[Amazon Bedrock Knowledge Bases]]></category>+
<category><![CDATA[Technical How-to]]></category>+
<guid isPermaLink="false">6f62e0665479ef5d4ffddb480328d07ce719281b</guid>+
+
<description>This technical how-to builds a conversational claims assistant on Amazon Bedrock Knowledge Bases that answers natural-language questions with citations. It covers ingesting claim documents from Amazon S3, querying with the AgenticRetrieveStream API, multi-turn follow-ups, metadata …+
<content:encoded><p>Claim answers are scattered across adjuster diary entries, repair estimates, police reports, payment ledgers, and scanned attachments rather than one searchable field. A policyholder might ask whether a claim was approved, while an adjuster might need every open a…+
<p>Retrieval Augmented Generation (RAG) uses retrieved documents to ground model responses. <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html" target="_blank" rel="noopener">Amazon Bedrock Knowledge Bases</a> is the fully managed RAG capability for d…+
<p>This technical how-to uses synthetic claim records and doesn’t describe a production customer deployment. You build a claims assistant that answers natural-language questions with citations by completing these steps:</p>+
<ul>+
<li>Ingest claim documents and their metadata from Amazon Simple Storage Service (Amazon S3).</li>+
<li>Query them in plain language with the <code>AgenticRetrieveStream</code> API.</li>+
<li>Ask multi-turn follow-up questions.</li>+
<li>Scope retrieval with metadata filters on attributes such as claim ID and claim type.</li>+
<li>Add a contextual grounding guardrail to keep answers tied to the records.</li>+
</ul>+
<h2 id="the-claims-lookup-challenge">The claims lookup challenge</h2>+
<p>Policyholders, contact center agents, and adjusters ask different questions:</p>+
<ul>+
<li>Policyholders ask for a plain-language status update: “Has the estimate for claim CLM-100482 been approved, and when will the check be issued?”</li>+
<li>Contact center agents need a fast, accurate answer while the customer waits, without transferring the call.</li>+
<li>Adjusters ask multi-part questions across claims, such as which open auto claims over $10,000 were filed last month and what work remains on each.</li>+
</ul>+
<p>Answers are stored in PDF adjuster reports, Word correspondence, and text notes rather than consistent database fields.</p>+
<p>Records can conflict or supersede earlier versions. A revised estimate can replace an earlier one, or a provisional payment can be reversed later. The assistant must identify which estimate, payment, or status controls.</p>+
<p>Because claims are regulated, every answer must be grounded in source documents and include citations. Contact center agents can verify a source before repeating an answer, and supervisors can audit how the assistant reached it.</p>+
<h2 id="solution-overview">Solution overview</h2>+
<p>The solution uses <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html" target="_blank" rel="noopener">Amazon Bedrock Knowledge Bases</a> to index claim documents from Amazon S3 for retrieval.</p>+
<p><a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-agentic-retrieve.html" target="_blank" rel="noopener">Agentic retrieval</a> through <code>AgenticRetrieveStream</code> plans an answer, breaks a multi-part question into sub-queries, and runs one o…+
<p>The API streams trace events, answer text, and citations. Trace events expose the retrieval plan, and each citation maps part of the answer to a source claim document.</p>+
<p>The following diagram shows both paths. The ingestion lane loads claim documents and metadata into a knowledge base. The retrieval lane sends each question through <code>AgenticRetrieveStream</code> and an Amazon Bedrock Guardrails grounding check before returning a cited answer…+
<div style="width: 810px" class="wp-caption alignnone">+
<a href="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/09/28/ML-21629-1.png" target="_blank" rel="noopener"><img src="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/09/28/ML-21629-1.png" alt="Architecture with an in…+
<p class="wp-caption-text">Figure 1: Conversational claims assistant with Amazon Bedrock Knowledge Bases</p>+
</div>+
<p>The ingestion lane runs as documents arrive:</p>+
<ol type="1">+
<li>Claim documents in PDF, Word, or text format land in Amazon S3 with matching metadata sidecars.</li>+
<li>An ingestion job synchronizes the S3 data source with the knowledge base as documents change.</li>+
<li>The knowledge base parses, chunks, embeds, and indexes the documents and their metadata in managed vector storage.</li>+
</ol>+
<p>The retrieval lane runs for each question:</p>+
<ol start="4" type="1">+
<li>The application calls <code>AgenticRetrieveStream</code> with the question, conversation history, and optional metadata filters that scope the search.</li>+
<li>A foundation model creates sub-queries and repeats retrieval until it has enough evidence, up to maxAgentIteration rounds.</li>+
<li>A contextual grounding check blocks answers that are unsupported by the retrieved records.</li>+
<li>Amazon Bedrock streams the answer, trace events, and citations, so the application can display output as it arrives.</li>+
</ol>+
<h2 id="prerequisites">Prerequisites</h2>+
<p>Before you begin, verify that you have the following:</p>+
<ul>+
<li>An AWS account with AWS Identity and Access Management (IAM) permissions for Amazon Bedrock and Amazon S3.</li>+
<li>Access to a foundation model (FM) enabled through <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html" target="_blank" rel="noopener">Amazon Bedrock model access</a>.</li>+
<li>An AWS Region that supports the selected foundation model and Amazon Bedrock Knowledge Bases. This walkthrough uses US West (Oregon), us-west-2. Check <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html" target="_blank" rel="noopener">Supported models b…+
<li>The <a href="https://aws.amazon.com/sdk-for-python/" target="_blank" rel="noopener">AWS SDK for Python (Boto3)</a>, configured with credentials and a version that supports the APIs used here.</li>+
<li>An S3 bucket for the synthetic claim documents and metadata.</li>+
<li>Familiarity with Python and with basic RAG concepts.</li>+
</ul>+
<h2 id="prepare-the-claims-documents-and-metadata">Prepare the claims documents and metadata</h2>+
<p>Store one document per claim in Amazon S3. The knowledge base reads PDF adjuster reports, Word correspondence, and text notes directly, so you can keep documents in their native format.</p>+
<p>Figure 2 shows a synthetic claim record. Current exposure is the estimated total claim cost. Its evidence index identifies a superseded fax draft, meaning a record replaced by a newer version. The metadata sidecar repeats fields that the assistant can filter.</p>+
<div style="width: 810px" class="wp-caption alignnone">+
<a href="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/09/28/ML-21629-2.png" target="_blank" rel="noopener"><img src="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/09/28/ML-21629-2.png" alt="A synthetic claim recor…+
<p class="wp-caption-text">Figure 2: A synthetic claim record with its file-control fields and evidence index</p>+
</div>+
<p>For filtering, add an accompanying metadata file with the same name plus <code>.metadata.json</code>. For <code>CLM-100482.pdf</code>, use <code>CLM-100482.pdf.metadata.json</code>. Subrogation is an insurer’s effort to recover costs from a responsible th…+
<div class="hide-language">+
<pre><code class="language-json">{+
"metadataAttributes": {+
"claim_id": "CLM-100482",+
"claim_type": "auto",+
"status": "open",+
"date_filed": 20260709,+
"amount": 14250,+
"region": "us-west",+
"adjuster": "Martha Rivera",+
"policyholder": "Mary Major",+
"policy_number": "POL-AUTO-78432",+
"customer_id": "CUST-MM-1042",+
"household_id": "HHD-MM-1042",+
"document_type": "adjuster_report",+
"carrier": "Example Insurance",+
"has_subrogation": true,+
"has_litigation": false,+
"complexity_tier": "high"+
}+
}</code></pre>+
</div>+
<p>The sidecar contains scalar string, number, and Boolean values. Value types determine available filters. The following table lists fields used later in the queries.</p>+
<p>This post uses synthetic data. Don’t place real personally identifiable information (PII) or protected health information in these resources without the required controls and approvals.</p>+
<table border="1px" width="100%" cellpadding="10px">+
<tbody>+
<tr>+
<td><strong>Attribute</strong></td>+
<td><strong>Type</strong></td>+
<td><strong>Example</strong></td>+
<td><strong>Filter use</strong></td>+
</tr>+
<tr>+
<td><code>claim_id</code></td>+
<td>String</td>+
<td><code>CLM-100482</code></td>+
<td><code>equals</code> for a single-claim lookup</td>+
</tr>+
<tr>+
<td><code>claim_type</code></td>+
<td>String</td>+
<td><code>auto</code></td>+
<td><code>equals</code> or <code>in</code> for a line of business</td>+
</tr>+
<tr>+
<td><code>status</code></td>+
<td>String</td>+
<td><code>open</code></td>+
<td><code>in</code> for active work queues</td>+
</tr>+
<tr>+
<td><code>amount</code></td>+
<td>Number</td>+
<td><code>14250</code></td>+
<td>numeric range comparisons</td>+
</tr>+
<tr>+
<td><code>date_filed</code></td>+
<td>Number</td>+
<td><code>20260709</code></td>+
<td>date ranges as <code>YYYYMMDD</code> integers</td>+
</tr>+
<tr>+
<td><code>region</code></td>+
<td>String</td>+
<td><code>us-west</code></td>+
<td>tenant scoping from the session</td>+
</tr>+
<tr>+
<td><code>customer_id</code></td>+
<td>String</td>+
<td><code>CUST-MM-1042</code></td>+
<td>customer scoping from the session</td>+
</tr>+
<tr>+
<td><code>has_subrogation</code></td>+
<td>Boolean</td>+
<td><code>true</code></td>+
<td><code>equals</code> for recovery work</td>+
</tr>+
</tbody>+
</table>+
<p>Store dates as <code>YYYYMMDD</code> integers because metadata filters compare numbers rather than date strings. This format supports ranges such as “filed last month.”</p>+
<p>Store only one comparable monetary value in <code>amount</code>. A reserve is money set aside for the estimated claim cost, while a hold is temporarily withheld. Keep reserves, payments, and holds in document text so their labels remain clear.</p>+
<p>Sidecar files are limited to 10 KB. See <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/s3-data-source-connector.html" target="_blank" rel="noopener">Connect to Amazon S3 for your knowledge base</a> for the complete format.</p>+
<p>The S3 layout pairs each claim document with its metadata file:</p>+
<div class="hide-language">+
<pre><code class="language-plaintext">s3://amzn-s3-demo-insurance-claims/claims/CLM-100482.pdf+
s3://amzn-s3-demo-insurance-claims/claims/CLM-100482.pdf.metadata.json+
s3://amzn-s3-demo-insurance-claims/claims/CLM-100517.docx+
s3://amzn-s3-demo-insurance-claims/claims/CLM-100517.docx.metadata.json+
s3://amzn-s3-demo-insurance-claims/claims/CLM-100533.txt+
s3://amzn-s3-demo-insurance-claims/claims/CLM-100533.txt.metadata.json</code></pre>+
</div>+
<h2 id="create-the-managed-knowledge-base-and-ingest-the-claims">Create the managed knowledge base and ingest the claims</h2>+
<p>Create the knowledge base with the bedrock-agent client. Set knowledgeBaseConfiguration.type and embeddingModelType to MANAGED.</p>+
<p>Amazon Bedrock selects and operates the embedding model. No vector store configuration is required. See <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateKnowledgeBase.html" target="_blank" rel="noopener">CreateKnowledgeBase</a> for all parameters.…+
<div class="hide-language">+
<pre><code class="language-python">import boto3+
+
bedrock_agent = boto3.client("bedrock-agent", region_name="us-west-2")+
+
kb = bedrock_agent.create_knowledge_base(+
name="insurance-claims-kb",+
description="Synthetic insurance claims for the claims assistant",+
roleArn="arn:aws:iam::111122223333:role/InsuranceClaimsKnowledgeBaseRole",+
knowledgeBaseConfiguration={+
"type": "MANAGED",+
"managedKnowledgeBaseConfiguration": {+
"embeddingModelType": "MANAGED"+
},+
},+
)+
kb_id = kb["knowledgeBase"]["knowledgeBaseId"]</code></pre>+
</div>+
<p>The roleArn service role grants the knowledge base permission to read the S3 bucket and use the managed embedding model. See <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-permissions.html" target="_blank" rel="noopener">Create a service role for Amazon Bedrock Knowl…+
<p>Next, connect the S3 bucket as a data source. The inclusionPrefixes setting limits ingestion to claims/:</p>+
<div class="hide-language">+
<pre><code class="language-python">data_source = bedrock_agent.create_data_source(+
knowledgeBaseId=kb_id,+
name="claims-s3",+
dataSourceConfiguration={+
"type": "S3",+
"s3Configuration": {+
"bucketArn": "arn:aws:s3:::amzn-s3-demo-insurance-claims",+
"inclusionPrefixes": ["claims/"],+
},+
},+
)+
data_source_id = data_source["dataSource"]["dataSourceId"]</code></pre>+
</div>+
<p>Start an ingestion job to parse, chunk, embed, and index the documents. Run it again whenever claim documents are added or updated so the index stays synchronized:</p>+
<div class="hide-language">+
<pre><code class="language-python">bedrock_agent.start_ingestion_job(+
knowledgeBaseId=kb_id,+
dataSourceId=data_source_id,+
)</code></pre>+
</div>+
<p>Check status with get_ingestion_job or the Amazon Bedrock console. When the job completes, the claims are searchable. See <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_StartIngestionJob.html" target="_blank" rel="noopener">StartIngestionJob</a> for d…+
<h2 id="query-claims-with-the-agenticretrievestream-api">Query claims with the AgenticRetrieveStream API</h2>+
<p>With the claims ingested, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_AgenticRetrieveStream.html" target="_blank" rel="noopener">AgenticRetrieveStream</a> with the bedrock-agent-runtime client. See the API reference for complete reques…+
<ul>+
<li>messages: Conversation turns. Each message has a user or assistant role and a content.text value.</li>+
<li>retrievers: Up to five knowledge bases. Each includes a knowledge base ID and can specify a metadata filter and maxNumberOfResults (1–100). Increase the limit for questions that span many claims.</li>+
<li>agenticRetrieveConfiguration: Planning model and iteration limit. Use MANAGED for the service model. To use a specific model, use CUSTOM with a model ARN. maxAgentIteration caps the number of planning and retrieval rounds.</li>+
</ul>+
<p>This request asks for one claim’s status. Setting generateResponse to True returns a natural-language answer:</p>+
<div class="hide-language">+
<pre><code class="language-python">bedrock_agent_runtime = boto3.client("bedrock-agent-runtime", region_name="us-west-2")+
+
response = bedrock_agent_runtime.agentic_retrieve_stream(+
messages=[+
{"role": "user", "content": {"text": "What is the status of claim CLM-100482?"}}+
],+
retrievers=[+
{+
"configuration": {"knowledgeBase": {"knowledgeBaseId": kb_id}},+
"description": "Synthetic insurance claim records",+
}+
],+
agenticRetrieveConfiguration={+
"foundationModelType": "MANAGED",+
"maxAgentIteration": 5,+
},+
generateResponse=True,+
)</code></pre>+
</div>+
<p>Iterate over response[“stream”] and handle these three event types:</p>+
<ul>+
<li>traceEvent: Reports planning, retrieval, full-document expansion, guardrail actions, status, and generated sub-queries for each step.</li>+
<li>responseEvent: Provides incremental answer text that you can stream to the user.</li>+
<li>result: Contains deduplicated retrieval results and, when generateResponse is True, the complete generated answer and its citations.</li>+
</ul>+
<p>The following loop streams answer chunks as they arrive and retains the final result for citation rendering:</p>+
<div class="hide-language">+
<pre><code class="language-python">answer = ""+
final_result = None+
+
for event in response["stream"]:+
if "traceEvent" in event:+
attributes = event["traceEvent"]["attributes"]+
print(f"[trace] {attributes.get('step')}: {attributes.get('status')}")+
elif "responseEvent" in event:+
chunk = event["responseEvent"]["text"]+
answer += chunk+
print(chunk, end="", flush=True)+
elif "result" in event:+
final_result = event["result"]</code></pre>+
</div>+
<h3 id="read-the-trace-to-see-the-plan">Read the trace to see the plan</h3>+
<p>The basic loop prints each step and status. This helper also prints sub-queries, full-document fetches, and guardrail actions:</p>+
<div class="hide-language">+
<pre><code class="language-python">def report_trace(trace_event):+
attributes = trace_event.get("attributes", {})+
print(f"[trace] {attributes.get('step')}: {attributes.get('status')}")+
+
for action in attributes.get("actions", []):+
if "retrieve" in action:+
sub_query = action["retrieve"].get("inputQuery", {}).get("text", "")+
print(f" sub-query: {sub_query}")+
elif "fullDocumentExpansion" in action:+
document = action["fullDocumentExpansion"].get("documentId", "")+
print(f" full document: {document}")+
+
for warning in attributes.get("warnings", []):+
if "guardrail" in warning:+
print(f" guardrail: {warning['guardrail'].get('action')}")</code></pre>+
</div>+
<p>Figure 3 shows the agentic loop. The service plans a strategy, creates sub-queries, retrieves evidence, and checks whether it has enough. If needed, it runs another pass before generating a cited answer.</p>+
<div style="width: 810px" class="wp-caption alignnone">+
<a href="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/09/28/ML-21629-3.png" target="_blank" rel="noopener"><img src="https://d2908q01vomqb2.cloudfront.net/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59/2026/09/28/ML-21629-3.png" alt="Diagram of the agentic …+
<p class="wp-caption-text">Figure 3: The agentic retrieval loop from question to cited answer</p>+
</div>+
<h3 id="render-citations">Render citations</h3>+
<p>Each citation identifies a character span in the answer and references supporting entries in the result event’s results array. The application uses the indexes to associate the displayed text with its source documents.</p>+
<p>The following code prints each cited span beside the built-in x-amz-bedrock-kb-source-uri value for its source document:</p>+
<div class="hide-language">+
<pre><code class="language-python">generated = final_result["generatedResponse"]+
results = final_result["results"]+
+
for citation in generated.get("citations", []):+
span = generated["answer"][citation["startIndex"]:citation["endIndex"]]+
for reference in citation["references"]:+
source = results[reference["resultIndex"]]+
source_uri = source.get("metadata", {}).get("x-amz-bedrock-kb-source-uri")+
print(f'"{span}"\n -&gt; {source_uri}')</code></pre>+
</div>+
<h2 id="ask-follow-up-questions-in-a-multi-turn-conversation">Ask follow-up questions in a multi-turn conversation</h2>+
<p>Follow-up questions depend on prior turns. After a status answer, a policyholder might ask, “Who is the adjuster assigned to it?” The word <em>it</em> is resolved from the conversation history passed in messages.</p>+
<p>Keep the conversation in the application. After each turn, append the user’s question and the assistant’s answer, then send the complete list on the next call:</p>+
<div class="hide-language">+
<pre><code class="language-python">messages = [+
{"role": "user", "content": {"text": "What is the status of claim CLM-100482?"}},+
{"role": "assistant", "content": {"text": answer}},+
{"role": "user", "content": {"text": "Who is the adjuster assigned to it?"}},+
]+
+
response = bedrock_agent_runtime.agentic_retrieve_stream(+
messages=messages,+
retrievers=[+
{"configuration": {"knowledgeBase": {"knowledgeBaseId": kb_id}}}+
],+
agenticRetrieveConfiguration={"foundationModelType": "MANAGED"},+
generateResponse=True,+
)</code></pre>+
</div>+
<p>The service uses earlier turns to resolve it to claim <code>CLM-100482</code> and retrieves that claim’s adjuster. Process the response stream as before.</p>+
<h2 id="scope-retrieval-with-metadata-filters">Scope retrieval with metadata filters</h2>+
<p>Metadata filters restrict documents before semantic search. Add them under the retriever’s retrievalOverrides. Use query filters for relevance, and derive authorization filters from the authenticated session on the server.</p>+
<p>For a direct lookup by claim ID, use an equals filter:</p>+
<div class="hide-language">+
<pre><code class="language-python">retrievers = [+
{+
"configuration": {+
"knowledgeBase": {+
"knowledgeBaseId": kb_id,+
"retrievalOverrides": {+
"filter": {"equals": {"key": "claim_id", "value": "CLM-100482"}}+
},+
}+
}+
}+
]</code></pre>+
</div>+
<p>For open auto claims over $10,000 filed in July 2026, combine claim type, status, amount, and date conditions with andAll:</p>+
<div class="hide-language">+
<pre><code class="language-python">claims_filter = {+
"andAll": [+
{"equals": {"key": "claim_type", "value": "auto"}},+
{"equals": {"key": "status", "value": "open"}},+
{"greaterThan": {"key": "amount", "value": 10000}},+
{"greaterThanOrEquals": {"key": "date_filed", "value": 20260701}},+
{"lessThanOrEquals": {"key": "date_filed", "value": 20260731}},+
]+
}+
+
response = bedrock_agent_runtime.agentic_retrieve_stream(+
messages=[+
{+
"role": "user",+
"content": {+
"text": "Summarize the outstanding items on the open auto "+
"claims over $10,000 filed in July."+
},+
}+
],+
retrievers=[+
{+
"configuration": {+
"knowledgeBase": {+
"knowledgeBaseId": kb_id,+
"retrievalOverrides": {+
"filter": claims_filter,+
"maxNumberOfResults": 50,+
},+
}+
}+
}+
],+
agenticRetrieveConfiguration={"foundationModelType": "MANAGED"},+
generateResponse=True,+
)</code></pre>+
</div>+
<p>This query can match many claims, so maxNumberOfResults is 50. A smaller limit could omit matching claims from the summary.</p>+
<p>Supported operators include equals, notEquals, numeric comparisons, in, notIn, stringContains, listContains, and logical andAll/orAll. startsWith is limited to Amazon OpenSearch Serverless vector stores. See <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-metadata.html" …+
<p>If a filter returns no documents, check for an empty result and return a clear message such as “No claims match those criteria” instead of generating an answer.</p>+
<h2 id="what-we-measured">What we measured</h2>+
<p>We measured this 30-document synthetic corpus with Retrieve and RetrieveAndGenerate, not AgenticRetrieveStream. Treat the results as a baseline for the corpus and metadata schema, not an agentic retrieval benchmark.</p>+
<p>The 40-question suite includes direct lookups, comparisons, aliases, superseded records, reversed payments, and instruction-like document text. Automated foundation-model grading makes the fact-level results directional.</p>+
<p>Expected-source retrieval recall measures required documents found. Citation recall measures required documents cited. Both average per question at document level and do not measure chunk precision.</p>+
<p>The following table shows the overall results.</p>+
<table border="1px" width="100%" cellpadding="10px">+
<tbody>+
<tr>+
<td><strong>Metric</strong></td>Diff display stops at 400 lines. The line counts above are from the whole diff. 15 lines shown here cut at 300 characters. The raw artifact at this commit is linked above.