🟡 🤝 Agents Published: · 4 min read ·

AWS AgentCore Memory Gains Metadata Filtering — Accuracy Jumps from 40% to 64%

Editorial illustration: AWS AgentCore memory namespaces with metadata filtering for AI agents

Amazon Bedrock AgentCore Memory introduces attribute-based metadata filtering applied before semantic search. On a benchmark of 151 questions, overall accuracy rose from 40% to 64%, and for context-dependent queries from 16% to 69%.

🤖

This article was generated using artificial intelligence from primary sources.

Amazon Web Services has announced a significant enhancement to the AgentCore Memory service within the Amazon Bedrock platform — structured metadata filtering that dramatically improves the precision of information retrieval in AI agents.

Why Is Semantic Search Alone Not Enough?

Existing memory systems for AI agents relied exclusively on vector similarity search: the agent would submit a query, the system would find the most semantically similar records, and return them as context. The problem arises when the archive is large and diverse — semantically related but completely irrelevant information can overpower the relevant signal.

Consider an agent managing a client portfolio: the question “what are the priority tasks for Q3?” should return exclusively high-priority items from the third quarter, not all documentation that touches on priorities or quarters in general. Without an additional filter, semantic search cannot make that distinction.

AgentCore Memory addresses this by introducing attribute pre-filters — metadata that narrows the candidate set before the vector algorithm even begins computing similarity.

The Three-Phase Memory Lifecycle

The new system operates in three clearly separated steps.

Configuration is the first step: an administrator defines which metadata keys the system should index and what extraction schema to apply. AgentCore Memory supports the types STRING, STRINGLIST, NUMBER, and DATETIME, and each memory resource can have up to 10 indexed keys.

Ingestion is the second step: metadata is attached to memory events in two ways. With automatic extraction the LLM infers values from the conversation content, or via direct API input for bulk imports where values are already known.

Retrieval is the third and critical step: metadata filters are applied across the full set of records within a namespace, the KNN algorithm then searches for similarity only within that narrowed set, and the combined results are returned to the agent. The order is not accidental — the pre-filter drastically reduces the number of candidates the vector search needs to consider.

Benchmark: Context-Dependent Queries Jump from 16% to 69%

Measurements were conducted on a set of 151 questions covering different query types — time-constrained searches, priority filtering, and within-department lookups.

Without metadata filtering, overall accuracy is 40%. With filtering enabled it rises to 64% — an increase of 24 percentage points. The most dramatic jump is visible on context-dependent questions: accuracy rose from 16% to 69%, meaning queries like “what agreements from last week had an urgent priority” became practically usable.

STRICTLY_CONSISTENT: Protection Against LLM Variability

A particularly important innovation for regulated environments is the STRICTLY_CONSISTENT extraction type. With standard extraction the LLM can infer a metadata value from context — which is useful for flexible attributes like summaries, but dangerous for classifiers that must be absolutely reliable.

STRICTLY_CONSISTENT keys propagate values literally, without LLM intervention. Records with different deterministic values are never merged. At most 3 such keys are allowed per strategy. The result is hard isolation between, for example, different confidentiality levels or legal jurisdictions in multi-tenant environments.

Namespace Isolation as the Foundation

The architecture separates two levels of isolation. A namespace (e.g., clients/client-123 or patients/patient-456) defines who owns the data — this is the primary, hard boundary. Metadata within that namespace defines what and when — business dimensions such as department, status, or time frame.

This hierarchy means that even within the same client namespace an agent can retrieve exclusively records relevant to the current project, without exposure to older or irrelevant interactions.

Practical Applications

AWS highlights several key scenarios: multi-tenant SaaS platforms where different departments share infrastructure but must have isolated views of memory; healthcare where HIPAA requirements are implemented through compliance metadata filters; customer support with automatic routing by escalation priority; and financial services with precise time filtering by quarter or regulatory deadline.

The system resolves conflicts using the LATEST_VALUE rule (the most recent value wins) or custom domain instructions. The schema is additive — keys can be added but not removed — guaranteeing backward compatibility for long-running production deployments.

Frequently Asked Questions

What is AgentCore Memory and what is it used for?
AgentCore Memory is AWS's fully managed service that enables AI agents to persistently remember information across conversations, organized into isolated namespaces per entity.
How does metadata filtering improve search accuracy?
Attribute filters (priority, department, time range) are applied before vector similarity search, narrowing the candidate set so that semantically similar but irrelevant results do not pollute the signal.
What does STRICTLY_CONSISTENT metadata extraction guarantee?
Values entered by an administrator propagate unchanged without LLM intervention, ensuring strict isolation between departments or compliance tiers in regulated environments.