Design retrieval, generation and authorized actions
Select a foundation model, retrieval store and customization strategy from the workload’s constraints.
Policy answers after a change
A benefits document changes monthly. The team needs answers with references and different employees can read different documents. Should it fine-tune on the entire collection each month?
Selecting a model
Check input and output modalities, language coverage, context and output limits, region, licensing and customization support. Test realistic long inputs at the required latency. Prompt caching may reduce repeated-prefix costs on supported models, but the first request and changing content have different economics.
Controlling generation
Temperature affects randomness when selecting the next token. A low setting can improve consistency but cannot verify facts. An output-token cap bounds response length and may truncate a valid response. Check whether a model supports a parameter before depending on it.
Retrieving current facts
For RAG, index source passages and retrieve relevant chunks at request time. Pass evidence and source identifiers into the prompt, then validate the answer. Bedrock Knowledge Bases can manage parts of this path. Enforce document-level access before sending context to the model.
Vector storage
An embedding model maps passages and queries to comparable vectors. A vector index finds nearby vectors, often with metadata filters. OpenSearch Service and supported PostgreSQL deployments such as Aurora PostgreSQL or RDS for PostgreSQL with pgvector offer alternatives. Neptune Analytics also supports vector search alongside graph analysis. Select by search needs, filters, scale and existing operations.
Choosing customization
In-context examples change one request. RAG supplies current facts. Fine-tuning changes weights to shape behavior. Distillation trains a smaller student to imitate a teacher. Pretraining a foundation model from scratch has substantially different data and compute requirements. Compare lifecycle costs, not just price per call.
Agents and side effects
An agent can select a tool, inspect a result and plan the next step. For a refund assistant, separate reading an order from issuing a refund. Keep action authorization, spending limits and audit records in the application, and build in a safe stop or human handoff.
Work through the decision
Compare your reasoning
Prefer a maintained retrieval index, access filtering before retrieval results reach the model, and citations to the passages used. Test whether the right current passage was retrieved before scoring the answer. Fine-tuning for tone can be a separate decision.
Change one constraint
An answer cites yesterday’s policy after the source changed. Which component do you inspect first?
Check your answer
Look up the indexed version, source timestamp and refresh pipeline, then examine the returned passages. Changing temperature cannot refresh stale content.
Revisit the recording
The long Bedrock walkthrough brings together model selection, prompts, knowledge bases and agent actions. Trace one response from user intent through retrieval to any permitted tool call. Bedrock · 2:02:22.
The vector store examples cover indexes, query embeddings and PostgreSQL. Inspect which passages a semantic query retrieved before evaluating the generated answer. Datastores for GenAI · 7:16:00.
The OpenSearch demonstration creates a search domain and queries the index. Retrieval quality depends on source content, index settings and access checks as well as model choice. OpenSearch · 14:33:06.
Run a controlled decoding experiment
The playground shows temperature and top-p beside the model choice. Save one representative prompt and compare repeated samples at two settings. Score the property you need, such as adherence to a field format. A change in the spread of outputs tells you about sampling. It does not establish that the generated facts became more accurate. Watch at 2:17:30.
Trace one source through a knowledge base
Follow a source from S3 through parsing, chunking, embedding and indexing. When a recently added document is missing from answers, check ingestion or synchronization, then ask whether a relevant chunk appears in retrieval. Only after the right evidence reaches the prompt can an answer-quality test isolate generation. Watch at 4:02:30.
Sources and further practice
AWS exam objectives · AWS documentation for this case.
Choosing and connecting tools · Claude Certified Architect – Foundations · Return to the study map.
Design retrieval, generation and authorized actions quiz
Answer 5 questions. Check each answer for an explanation.