Let’s Get Certified
Module 05 / 21 · Foundation model integration, data management and compliance

Keep retrieval current and permission-aware

Track document identity, permissions and freshness through a changing vector store.

Keep retrieval current and permission-aware

Work through the decision

A benefits search returns last year's policy after a replacement was published. The old and new paragraphs are both plausible matches. How can the owner tell whether the fault is retrieval or generation?

Check your reasoning

Query the index directly with a known policy ID. Inspect source version, access metadata and last successful sync. Retire superseded chunks and confirm a deleted record stays absent after replay. Regenerating an answer against stale chunks leaves the same evidence in place.

Watch the source lesson at 1:26:27

Compare the choices

Filter on trusted metadata
Apply access and version predicates during retrieval using the caller's verified identity and indexed attributes.
Synchronize changes and deletions
Track stable source IDs, upsert versions and propagate tombstones. Verify old chunks disappear after refresh.
Benchmark vector index settings
Measure recall against a labeled set alongside p95 latency and ingestion cost before changing search parameters or capacity.
Connect and validate the source feed
Set up a least-privilege connector or ingestion job, monitor sync status and reconcile indexed objects to a source manifest.

Reconcile an index update

Document H has chunks H:v1:1 and H:v1:2. Its replacement has one chunk H:v2:1. Upserting only the new chunk leaves two old matches. Track the prior manifest and retire v1 when v2 is ready, then replay the event and query for both versions.

Apply it on AWS

Bedrock Knowledge Bases can connect an S3 source to a supported vector store. In an OpenSearch index or Aurora PostgreSQL with pgvector, keep source identifiers and filterable access metadata beside vectors. Test one addition, one edit and one deletion end to end before approving a source sync.

Practice the guide skills

  1. Compare a managed knowledge base and a directly managed vector store against query volume, filter support and maintenance requirements. Watch 1:26:27
  2. Attach source ID, version, tenant and access labels to chunks. Derive query filters from authenticated claims. Watch 1:34:01
  3. Benchmark index parameters on reference queries. Report both retrieval recall and tail latency as corpus size grows. Watch 1:36:58
  4. Trace a new source object through the connector, embedding job and index. Check role permissions and reconcile expected object counts. Watch 1:40:48
  5. Replay an edit and a deletion. Confirm old chunks disappear, and retrying an update leaves one current version. Watch 1:41:15

Official objectives for this lesson

Related lesson · Build a grounded request from tokens, context and tools

Knowledge check

Keep retrieval current and permission-aware quiz

Answer 3 questions. Check each answer for an explanation.