AIF-C01 Task 3.1: Design Considerations for Applications That Use Foundation Models
Overview
A foundation model, or FM, is a large, pre-trained model that can be adapted for many tasks, such as:
- Text generation.
- Summarization.
- Question answering.
- Classification.
- Image generation.
- Speech processing.
- Embedding generation.
- Code generation.
When designing an application that uses an FM, select the model and architecture based on the business requirement, data, risk, performance expectations, and cost.
For the exam, focus on recognizing:
- How to select an appropriate FM.
- How inference parameters affect responses.
- When to use Retrieval Augmented Generation.
- Where embeddings can be stored.
- The cost and capability tradeoffs of customization methods.
- What AI agents do and when they are useful.
1. Foundation Model Selection Criteria
There is no single best foundation model for every application. Model selection is a tradeoff between capability, cost, latency, data requirements, and operational complexity.
1.1 Business use case
Start with the task the model must perform.
Examples:
| Business task | Important selection considerations |
|---|---|
| Simple classification | Lower-cost model may be sufficient |
| Summarization | Context window, output quality, and language support |
| Customer support chatbot | Latency, cost, safety, multilingual support, and integration |
| Complex reasoning | Model capability and output quality |
| Image generation | Image modality, resolution, style controls, and cost |
| Code generation | Programming-language support and code quality |
| Retrieval and semantic search | Embedding model quality, language support, and vector dimensions |
A more capable model is not always the best choice. A smaller model may be faster and cheaper for a simple, high-volume task.
1.2 Modality
A model’s modality describes the types of input and output it can process.
Common modalities include:
- Text.
- Images.
- Audio.
- Video.
- Code.
- Embeddings.
Examples:
- A text-only model cannot directly analyze an image unless the image is converted into another representation.
- A multimodal model may accept text and images and produce text.
- An embedding model generally converts data into numerical vectors rather than generating a conversational response.
Exam tip
Match the model’s modality to the application’s input and output requirements. Do not select a text-only FM for an application that must directly analyze images.
1.3 Cost
Model cost can depend on factors such as:
- Input tokens.
- Output tokens.
- Number of requests.
- Provisioned capacity.
- Customization or training.
- Storage.
- Vector database usage.
- Data transfer.
- Agent tool calls.
A smaller model may reduce cost, but it may produce lower-quality results or require more application logic.
A larger model may provide better quality and reasoning but may have:
- Higher per-request cost.
- Higher latency.
- Greater resource requirements.
- More complex capacity planning.
Practical approach
Evaluate the total application cost, not just the model invocation price. Total cost may include:
- Prompt tokens.
- Retrieved context.
- Output tokens.
- Embedding generation.
- Vector storage and search.
- Model customization.
- Monitoring.
- Agent tool calls.
- Infrastructure.
1.4 Latency
Latency is the time required to receive a response.
Latency may be affected by:
- Model size.
- Model complexity.
- Input length.
- Output length.
- Region and network path.
- Provisioned or on-demand capacity.
- Number of agent steps.
- Retrieval operations.
- Tool calls.
- Queuing and throttling.
For real-time applications, such as chat or voice support, low latency may be more important than maximum model capability.
For batch summarization or document processing, higher latency may be acceptable if it improves quality or reduces cost.
Exam tip
If a question emphasizes a real-time user experience, consider:
- A smaller or faster model.
- Shorter prompts.
- Limited output length.
- Efficient retrieval.
- Prompt caching, where supported.
- Reduced agent steps.
1.5 Multilingual support
If an application serves users who speak different languages, check whether the model:
- Supports the required languages.
- Produces reliable output in those languages.
- Handles language switching.
- Supports translation or multilingual embeddings.
- Maintains acceptable quality across languages.
A model may support a language syntactically but perform less accurately in that language.
Multilingual support is also important for embeddings. An embedding model should represent the languages in the application effectively so that semantic search works across the required content.
1.6 Model size and complexity
Model size generally affects:
- Quality.
- Reasoning capability.
- Latency.
- Cost.
- Infrastructure requirements.
- Customization effort.
A larger model is often more capable, but it is not automatically better for every use case.
A smaller model may be preferred when:
- The task is simple.
- Low latency is required.
- The application has high request volume.
- Cost is a major concern.
- The task can be improved using retrieval or structured prompts.
A complex model may be appropriate when:
- The task requires advanced reasoning.
- The input is ambiguous.
- The application must handle many types of instructions.
- Accuracy is more important than latency or cost.
1.7 Customization capability
Consider whether the FM supports the type of customization required.
Possible customization methods include:
- Prompt engineering.
- In-context learning.
- Retrieval Augmented Generation.
- Fine-tuning.
- Continued pre-training.
- Model distillation.
The choice depends on whether the application needs:
- Additional knowledge.
- A particular response format.
- Domain-specific behavior.
- New terminology.
- A consistent style.
- Lower inference cost.
- Specialized task performance.
The model provider may limit which customization features are available.
1.8 Input and output length
Models have limits on the amount of text they can process and generate.
Important concepts include:
- Input length: The amount of prompt and context sent to the model.
- Output length: The maximum amount of content the model can generate.
- Context window: The total amount of information the model can consider in a request, including instructions, conversation history, retrieved data, and the generated response.
Longer inputs can:
- Increase cost.
- Increase latency.
- Consume context-window capacity.
- Reduce the amount of space available for output.
- Introduce irrelevant information.
Longer outputs can:
- Increase cost.
- Increase latency.
- Produce unnecessarily verbose responses.
- Increase the risk of unsupported or incorrect content.
Exam tip
If the model must process large documents, consider:
- Chunking.
- Summarization.
- Retrieval.
- A model with a larger context window.
- Sending only relevant content.
Do not assume that adding the entire document to every prompt is the best design.
1.9 Prompt caching
Prompt caching allows an application or service to reuse a repeated portion of a prompt rather than processing the same prefix from scratch for every request, where the model and service support this capability.
Potential benefits include:
- Lower latency.
- Lower input-processing cost.
- More efficient handling of repeated instructions or context.
Prompt caching can be useful when requests repeatedly include:
- The same system instructions.
- A large policy document.
- A common reference text.
- A shared conversation prefix.
Important limitations
Prompt caching:
- Is model- and service-dependent.
- Does not add new knowledge to a model.
- Does not replace RAG.
- Does not automatically make responses current.
- Requires careful handling of changing or sensitive information.
Exam trap
Prompt caching is primarily a performance and cost optimization. It is not a model customization method in the same sense as fine-tuning.
2. Inference Parameters and Their Effects
Inference parameters control how a model generates a response at runtime.
The exact parameter names and supported ranges vary by model.
2.1 Temperature
Temperature controls the randomness or variability of generated output.
- Lower temperature generally produces more predictable and consistent responses.
- Higher temperature generally produces more varied and creative responses.
Lower temperature is useful for:
- Classification.
- Data extraction.
- Summarization.
- Business workflows.
- Structured output.
- Tasks requiring consistency.
Higher temperature is useful for:
- Brainstorming.
- Creative writing.
- Generating alternative ideas.
- Creative marketing content.
Important limitation
Temperature does not guarantee correctness.
A low temperature does not make a model factual, and a high temperature does not necessarily make the response more useful.
Exam tip
When the question asks for consistent, deterministic, or repeatable results, select a lower temperature.
When it asks for creative or diverse responses, select a higher temperature.
2.2 Input length
Input length controls how much information is provided to the model.
Increasing input length may:
- Give the model more context.
- Increase the chance that relevant information is included.
- Increase cost and latency.
- Consume the context window.
- Introduce distractions or conflicting instructions.
Good design involves providing relevant context rather than simply maximizing prompt size.
2.3 Maximum output length
A maximum output length limits how much the model can generate.
A larger output limit may be required for:
- Detailed reports.
- Long-form summaries.
- Code generation.
- Multi-step explanations.
A smaller output limit may be appropriate for:
- Classification labels.
- Short customer support answers.
- Structured fields.
- Concise summaries.
Setting an output limit too low may cause incomplete responses. Setting it too high may increase cost and latency.
2.4 Top-$k$ and top-$p$
Some models support additional sampling controls.
Top-$k$
Top-$k$ limits token selection to the most likely $k$ candidate tokens.
- Lower values generally make output more focused.
- Higher values allow more variety.
Top-$p$
Top-$p$, also called nucleus sampling, limits token selection to the smallest group of likely tokens whose combined probability reaches a selected threshold.
- Lower values generally make output more focused.
- Higher values allow more diversity.
Exam guidance
The exam is more likely to test the general relationship:
- More randomness → more variation.
- Less randomness → more predictable output.
Do not assume that every FM supports every parameter.
2.5 Stop sequences
A stop sequence tells the model to stop generating when it reaches a specified sequence of characters or tokens.
This can help:
- End structured fields.
- Prevent generation beyond a delimiter.
- Control output format.
- Limit unnecessary content.
2.6 Inference parameters do not provide governance
Inference parameters affect response generation, but they do not replace:
- Content filtering.
- Access control.
- Data protection.
- Human review.
- Monitoring.
- Compliance controls.
3. Retrieval Augmented Generation
3.1 Definition
Retrieval Augmented Generation, or RAG, is an architecture in which an application retrieves relevant information from an external data source and provides that information to an FM as context for generating a response.
RAG helps an FM use information that may be:
- Private.
- Domain-specific.
- Frequently updated.
- Too large to include in the base model.
- Not present in the model’s original training data.
3.2 Typical RAG workflow
A basic RAG workflow includes:
-
Collect documents
Obtain documents from approved enterprise data sources. -
Prepare documents
Clean, split, and organize the documents into manageable chunks. -
Create embeddings
Convert the chunks into numerical vector representations using an embedding model. -
Store embeddings
Store the vectors and related metadata in a vector-capable data store. -
Receive a user query
Convert the query into an embedding. -
Retrieve similar content
Search for document chunks that are semantically similar to the query. -
Construct the prompt
Add the retrieved content to the user’s prompt or model context. -
Generate a response
The FM uses the supplied context to produce an answer. -
Optionally cite sources
The application can show the documents or references used to produce the answer.
3.3 Amazon Bedrock Knowledge Bases
Amazon Bedrock Knowledge Bases helps implement RAG applications.
It can help with:
- Connecting to supported data sources.
- Ingesting and preparing data.
- Creating embeddings.
- Storing and retrieving vector representations.
- Using retrieved content as context for generation.
- Supporting grounded question answering.
The exact data sources, embedding models, and vector store options depend on the supported configuration.
3.4 Business applications of RAG
RAG is useful for:
- Internal policy assistants.
- Customer support using product documentation.
- Employee knowledge portals.
- Technical troubleshooting.
- Legal or compliance document search.
- Enterprise search.
- Product catalogs.
- Frequently updated operational information.
3.5 Advantages of RAG
RAG can:
- Use current information without retraining the base model.
- Use private organizational data.
- Improve answer grounding.
- Support source citations.
- Update knowledge by updating the data store.
- Reduce the need for expensive model customization.
3.6 Limitations of RAG
RAG does not guarantee correct responses.
Potential problems include:
- Poor document chunking.
- Incorrect or incomplete retrieval.
- Missing documents.
- Outdated source data.
- Irrelevant retrieved content.
- Access-control failures.
- Prompt injection in retrieved documents.
- Context-window limitations.
- Incorrect interpretation by the model.
Exam trap
RAG provides external knowledge at inference time. It does not permanently teach new information to the foundation model.
4. Embeddings and Vector Databases
4.1 What is an embedding?
An embedding is a numerical representation of data that captures semantic meaning.
Data that has similar meaning may have similar vector representations, even if the exact words differ.
Embeddings can represent:
- Text.
- Images.
- Audio.
- Documents.
- Product descriptions.
- User queries.
4.2 Vector search
A vector database stores embeddings and supports similarity searches.
A typical process is:
- Convert a user query into an embedding.
- Compare it with stored document embeddings.
- Return the most similar records.
- Provide those records to the FM as context.
Vector search is different from traditional keyword search:
- Keyword search focuses on matching words or terms.
- Vector search focuses on semantic similarity.
Many applications combine both methods using hybrid search.
5. AWS Services That Can Store Embeddings
Amazon OpenSearch Service
Amazon OpenSearch Service supports search and vector search capabilities.
It is useful when an application needs:
- Vector similarity search.
- Keyword search.
- Hybrid search.
- Search filtering.
- Metadata filtering.
- Scalable search capabilities.
A common use is storing document embeddings and metadata for RAG.
Amazon Aurora
Amazon Aurora can support vector storage and similarity search when configured with appropriate PostgreSQL-compatible capabilities, such as pgvector, where supported.
Aurora may be suitable when:
- The application already uses a relational database.
- Vector data must be combined with relational data.
- Transactions and SQL queries are important.
- The organization wants to consolidate application and vector data.
Amazon RDS for PostgreSQL
Amazon RDS for PostgreSQL can support embeddings using PostgreSQL vector extensions such as pgvector, where supported.
It may be appropriate when:
- The application already uses PostgreSQL.
- The vector workload is moderate.
- Existing relational database skills and tooling are important.
- Embeddings must be queried together with relational records.
Amazon Neptune
Amazon Neptune supports graph workloads and can support vector-related capabilities in appropriate Neptune configurations.
It may be useful when the application needs to combine:
- Relationships between entities.
- Graph traversal.
- Semantic or vector similarity.
- Knowledge graph information.
For example, a RAG application could use a knowledge graph to understand relationships among products, customers, policies, and documents.
Exam guidance
Select the data store based on the application’s existing architecture and search requirements:
- Search-heavy and hybrid search → Amazon OpenSearch Service.
- PostgreSQL and relational workloads → Amazon Aurora or Amazon RDS for PostgreSQL.
- Graph relationships combined with semantic retrieval → Amazon Neptune.
The exact vector-search capability and supported configuration can vary by engine, version, and service feature.
6. Foundation Model Customization Approaches
Different customization methods provide different levels of control, cost, speed, and operational complexity.
6.1 Prompt engineering
Prompt engineering improves results by designing better instructions and context.
It may include:
- Clear task instructions.
- Role or behavior definitions.
- Examples.
- Output formatting instructions.
- Constraints.
- Retrieved context.
- Step-by-step task guidance.
Advantages
- Low cost.
- Fast to implement.
- No model training required.
- Easy to iterate.
Limitations
- May not provide consistent behavior for complex tasks.
- Uses input tokens on every request.
- Depends on the model’s existing capabilities.
- Can be sensitive to prompt wording.
Prompt engineering is often the first approach to try.
6.2 In-context learning
In-context learning provides examples in the prompt so the model can infer the desired task or format.
This is often called few-shot prompting when several examples are included.
Advantages
- No model training.
- Quick to change.
- Useful for demonstrating response format and task behavior.
- Can improve performance on specialized tasks.
Limitations
- Examples consume context-window space.
- Examples increase input-token cost.
- Behavior is temporary and request-specific.
- Too many examples may increase latency.
- The model may still produce inconsistent results.
Exam distinction
In-context learning changes the prompt, not the model’s underlying parameters.
6.3 Retrieval Augmented Generation
RAG adds external information to the prompt at inference time.
Advantages
- Useful for private and current information.
- Knowledge can be updated by changing source documents.
- Avoids retraining for every document update.
- Can provide citations or source references.
- Usually less expensive than training a custom model.
Limitations
- Requires document preparation and retrieval infrastructure.
- Retrieval quality affects answer quality.
- Adds embedding, storage, search, and retrieval costs.
- The model can still misunderstand or ignore retrieved context.
- Access controls must be applied to retrieved content.
RAG is generally well suited when the main requirement is adding or updating knowledge.
6.4 Fine-tuning
Fine-tuning adapts a pre-trained model using task-specific examples.
It can help the model learn:
- A particular style.
- A consistent format.
- Domain terminology.
- Classification behavior.
- Specialized task patterns.
- Organization-specific response behavior.
Advantages
- Can provide more consistent task behavior than prompts alone.
- May reduce the amount of instruction required at inference time.
- Can improve performance for a well-defined domain or task.
Limitations
- Requires high-quality training data.
- Has customization and storage costs.
- Requires evaluation and monitoring.
- Can introduce bias or preserve errors in the training data.
- Updating the model requires another customization process.
- Fine-tuning is not always the best way to add frequently changing facts.
Exam tip
Use fine-tuning primarily when the requirement is to change behavior, style, or task performance, not merely to provide frequently changing reference information. RAG is often more appropriate for changing factual knowledge.
6.5 Continued pre-training
Continued pre-training uses additional domain data to further train an existing model.
It may help when the model needs broader exposure to:
- Specialized terminology.
- Domain language.
- Large amounts of domain-specific text.
Tradeoffs
- More expensive and complex than prompting or RAG.
- Requires substantial, high-quality data.
- Requires training infrastructure and evaluation.
- May not be necessary for a narrow business task.
For the AIF-C01 exam, recognize it as a more costly and involved approach than prompt engineering, in-context learning, or RAG.
6.6 Pre-training a model
Pre-training creates a foundation model from a large dataset.
It normally requires:
- Very large datasets.
- Significant compute capacity.
- Specialized expertise.
- Extensive evaluation.
- Long development cycles.
- High operational and financial cost.
Pre-training is generally appropriate only when an organization needs substantial control over the model and has the resources to build and operate it.
Exam trap
Pre-training is not the normal first choice for a business that only needs to answer questions using its internal documents.
6.7 Model distillation
Model distillation transfers knowledge or behavior from a larger teacher model to a smaller student model.
The smaller model is trained to reproduce useful behavior from the larger model.
Advantages
- Lower inference cost.
- Lower latency.
- Smaller deployment requirements.
- Useful for high-volume or edge applications.
Limitations
- The student model may have lower capability.
- Distillation requires a training or customization process.
- The student may not retain all the teacher’s knowledge.
- Quality must be evaluated for the target task.
Model distillation is often used after identifying the required behavior with a larger model.
7. Customization Cost and Capability Comparison
| Approach | Main purpose | Cost and complexity | Best suited for |
|---|---|---|---|
| Prompt engineering | Improve instructions and output format | Low | Fast experimentation and simple behavior changes |
| In-context learning | Show examples in the prompt | Low to moderate per request | Temporary task or format adaptation |
| RAG | Provide external and current knowledge | Moderate application complexity | Private, changing, or domain-specific information |
| Fine-tuning | Adapt model behavior or task performance | Moderate to high | Consistent style, format, or specialized task behavior |
| Continued pre-training | Add broad domain knowledge | High | Large-scale domain adaptation |
| Pre-training | Build a foundation model | Very high | Organizations needing extensive model control |
| Model distillation | Create a smaller, cheaper model | Moderate to high | Lower latency and cost at scale |
Important selection rule
- Need new or changing information → Consider RAG.
- Need specific behavior, style, or format → Consider prompting, examples, or fine-tuning.
- Need lower inference cost after achieving desired behavior → Consider model distillation.
- Need to build a model with broad, specialized knowledge and have substantial resources → Consider continued pre-training or pre-training.
8. AI Agents
8.1 Definition
An AI agent is a software system that uses an FM to interpret a goal, decide on steps, use tools or APIs, and take actions to complete a task.
An agent may:
- Understand a natural-language request.
- Plan one or more steps.
- Retrieve information.
- Call APIs.
- Query databases.
- Use business applications.
- Perform calculations.
- Ask for clarification.
- Check results.
- Return a final response.
8.2 Basic agent workflow
A typical agent workflow is:
- Receive a user goal.
- Interpret the request.
- Determine what information or tools are needed.
- Select and call appropriate tools.
- Observe the tool results.
- Decide whether more steps are required.
- Complete the task or request human approval.
- Return an explanation or result.
8.3 Amazon Bedrock Agents
Amazon Bedrock Agents helps developers build agents that can:
- Orchestrate foundation model interactions.
- Use APIs and action groups.
- Retrieve information from knowledge bases.
- Break tasks into steps.
- Interact with enterprise systems.
- Complete multistep business processes.
The agent’s tools and permissions must be carefully controlled.
8.4 Business applications of agents
AI agents can support:
- Customer service and ticket resolution.
- Appointment scheduling.
- Order processing.
- Travel planning.
- IT support and incident triage.
- Employee onboarding.
- Product recommendations.
- Financial or operational workflow assistance.
- Searching multiple enterprise systems.
- Automating repetitive business processes.
8.5 Agents versus chatbots
| Capability | Basic chatbot | AI agent |
|---|---|---|
| Responds to questions | Yes | Yes |
| Uses a foundation model | Usually | Usually |
| Retrieves information | May | Commonly |
| Plans multiple steps | Limited | Yes |
| Calls external tools or APIs | Usually limited | Core capability |
| Takes actions | Usually no or limited | Yes, with permissions |
| Requires action governance | Moderate | High |
8.6 Risks and design considerations for agents
Because agents can take actions, they require additional controls:
- Least-privilege IAM permissions.
- Approved tools and APIs.
- Input validation.
- Output validation.
- Human approval for high-impact actions.
- Logging of plans, tool calls, and results.
- Limits on the number of steps.
- Protection against prompt injection.
- Protection against excessive or unauthorized actions.
- Clear error handling and rollback procedures.
Exam tip
An agent is more than a model that generates text. The key characteristic is the ability to reason about a task and interact with tools or systems to take action.
9. Exam Tips and Common Traps
Tip 1: Separate knowledge from behavior
- Adding private or current information → RAG.
- Changing response style, format, or task behavior → Prompting or fine-tuning.
Tip 2: RAG does not retrain the model
RAG retrieves information and supplies it during inference. It does not change the model’s internal parameters.
Tip 3: Fine-tuning does not automatically provide current data
If facts change frequently, RAG is generally easier to update than a fine-tuned model.
Tip 4: Larger models are not always better
A smaller model may be the best selection when the task is simple and the requirements emphasize:
- Low cost.
- Low latency.
- High request volume.
- Simple output format.
Tip 5: Temperature affects variation, not factual accuracy
Lower temperature generally increases consistency. It does not guarantee a correct response.
Tip 6: Longer prompts increase cost and latency
Retrieved content, few-shot examples, conversation history, and system instructions all consume input capacity.
Tip 7: Vector databases store embeddings, not model responses alone
A vector store is used to find semantically similar content. It commonly stores:
- Embeddings.
- Original text or references.
- Document identifiers.
- Metadata.
- Access-control information.
Tip 8: Agents increase the impact of mistakes
A wrong answer from a chatbot may be inconvenient. A wrong action by an agent may change an order, issue a refund, or modify a system. Use permissions, approvals, monitoring, and action limits.
Tip 9: Prompt caching is not RAG
- Prompt caching reuses repeated prompt content.
- RAG retrieves relevant external content for a request.
Tip 10: Model customization has tradeoffs
The least expensive approach is not always the most capable. Consider:
- Quality.
- Update frequency.
- Data availability.
- Latency.
- Cost per request.
- Training cost.
- Operational complexity.
- Evaluation requirements.
Practice Questions and Answers
## Question 1 A company wants an AI assistant to answer questions using frequently updated internal product documentation. The company does not want to retrain or fine-tune the foundation model whenever the documentation changes. Which approach should it use? A. Pre-training B. Retrieval Augmented Generation C. Model distillation D. Increasing the temperature **Answer: B. Retrieval Augmented Generation** **Explanation:** RAG retrieves current information from an external data source and provides it to the model at inference time. Updating the source documents does not require retraining the foundation model. --- ## Question 2 A business needs an AI application to generate creative marketing ideas with varied responses. Which inference setting is generally most appropriate? A. Lower temperature B. Higher temperature C. Zero input length D. Minimum output length **Answer: B. Higher temperature** **Explanation:** Higher temperature generally increases variation and creativity. It does not guarantee higher quality or accuracy. --- ## Question 3 A company needs highly consistent output for extracting fields from invoices into a structured format. Which approach is most appropriate? A. Increase the temperature substantially. B. Use a lower temperature and provide clear output-format instructions. C. Remove all instructions from the prompt. D. Use a larger output limit without specifying a format. **Answer: B. Use a lower temperature and provide clear output-format instructions.** **Explanation:** Lower temperature generally makes output more predictable. Clear instructions and structured output requirements also improve consistency. --- ## Question 4 Which foundation model selection criterion is most important when an application must process user images and return textual descriptions? A. Whether the model supports the required multimodal input and output B. Whether the model has the lowest storage cost C. Whether the model supports only text prompts D. Whether the model has the highest temperature range **Answer: A. Whether the model supports the required multimodal input and output** **Explanation:** The model must support the required modalities. A text-only model cannot directly process image input. --- ## Question 5 An application repeatedly sends the same long system instructions with different user questions. Which capability may reduce repeated processing cost and latency when supported by the model and service? A. Model distillation B. Prompt caching C. Pre-training D. Increasing the context window **Answer: B. Prompt caching** **Explanation:** Prompt caching can reuse repeated prompt content. It is a performance and cost optimization, not a method for adding new knowledge to the model. --- ## Question 6 A company already uses PostgreSQL for its application and wants to store document embeddings alongside relational business data. Which AWS options could support this design? A. Amazon RDS for PostgreSQL or Amazon Aurora with supported vector capabilities B. AWS CloudTrail only C. AWS Artifact only D. Amazon Inspector only **Answer: A. Amazon RDS for PostgreSQL or Amazon Aurora with supported vector capabilities** **Explanation:** PostgreSQL-compatible services can support vector storage and similarity search with supported extensions or capabilities, such as `pgvector`. --- ## Question 7 Which sequence best describes a typical RAG workflow? A. Fine-tune the model, delete the source documents, and return the model response. B. Convert documents to embeddings, store them, retrieve relevant content for a query, and provide it to the FM as context. C. Increase temperature, generate random content, and store the output as an embedding. D. Pre-train a foundation model for every user question. **Answer: B. Convert documents to embeddings, store them, retrieve relevant content for a query, and provide it to the FM as context.** **Explanation:** RAG uses semantic retrieval to provide relevant external information to the FM during inference. --- ## Question 8 A company wants an AI system to consistently classify support tickets according to a specialized internal taxonomy. Which approach may be appropriate if prompt engineering and examples do not provide sufficient consistency? A. Fine-tuning with high-quality labeled examples B. Increasing the temperature C. Deleting the classification examples D. Using a vector database without a model **Answer: A. Fine-tuning with high-quality labeled examples** **Explanation:** Fine-tuning can adapt a model to a specialized task using representative examples. It requires additional data, cost, evaluation, and maintenance. --- ## Question 9 Which customization approach usually has the highest development and compute cost? A. Prompt engineering B. In-context learning C. RAG D. Pre-training a foundation model **Answer: D. Pre-training a foundation model** **Explanation:** Pre-training requires very large datasets, substantial compute, specialized expertise, and extensive evaluation. It is significantly more expensive and complex than prompting or RAG. --- ## Question 10 Which capability most clearly distinguishes an AI agent from a basic question-answering chatbot? A. The ability to generate text B. The ability to process a user prompt C. The ability to plan steps and call tools or APIs to take actions D. The ability to operate at a low temperature **Answer: C. The ability to plan steps and call tools or APIs to take actions** **Explanation:** Agents use foundation models to reason about goals, select tools, and perform multistep actions. These capabilities require additional permissions and governance. --- ## Question 11 An AI agent can issue refunds in a customer service system. Which control is most important? A. Give the agent unrestricted administrator permissions. B. Use least-privilege permissions and require human approval for high-impact actions. C. Increase the temperature to make the agent more creative. D. Disable logging to protect performance. **Answer: B. Use least-privilege permissions and require human approval for high-impact actions.** **Explanation:** Agents can take real-world actions. Their tools and permissions must be limited, monitored, and subject to approval where appropriate.Final Summary
Remember these core relationships:
- Model selection depends on modality, cost, latency, language support, model size, complexity, customization capability, and input/output limits.
- Lower temperature generally produces more predictable output.
- Higher temperature generally produces more varied and creative output.
- RAG supplies external, private, or current information to an FM at inference time.
- Amazon Bedrock Knowledge Bases supports RAG workflows.
- OpenSearch, Aurora, RDS for PostgreSQL, and Neptune can support vector-related storage or search in appropriate configurations.
- Prompting and in-context learning are fast and relatively inexpensive.
- Fine-tuning changes model behavior using examples.
- Pre-training is the most resource-intensive customization approach.
- Model distillation creates a smaller model to reduce latency and inference cost.
- AI agents use FMs to plan, retrieve information, call tools, and take actions.