Amazon Bedrock and Generative AI Flashcards

1
Q

What is Generative AI?

A

A subset of deep learning that generates new data similar to its training data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What types of data can Generative AI be trained on?

A

Text, images, audio, code, video, and more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a foundation model?

A

A large, general-purpose AI model trained on massive amounts of data for a variety of tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name a few companies that create foundation models.

A

OpenAI, Meta, Amazon, Google, Anthropic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an example of an open-source foundation model?

A

Meta’s LLaMA, Google’s BERT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an LLM?

A

A Large Language Model trained to understand and generate human-like text.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are LLMs trained?

A

On massive text datasets like books, websites, articles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does non-deterministic output mean in LLMs?

A

Same prompt can produce different outputs due to probabilistic word generation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why is LLM output non-deterministic?

A

It selects next words based on probability distributions, not fixed rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are some tasks LLMs can perform?

A

Translation, summarization, Q&A, content generation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do diffusion models generate images?

A

By reversing a process that gradually adds noise to images.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is forward diffusion?

A

A process where noise is added to an image over time until it’s unrecognizable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is reverse diffusion?

A

The process of removing noise step-by-step to generate an image from random noise.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Stable Diffusion?

A

A model/company using diffusion methods to generate images from text or other images.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can Gen AI generate text from images?

A

Yes, it can analyze an image and generate descriptive text or answer questions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Amazon Bedrock?

A

A fully managed AWS service to build and scale generative AI applications using various foundation models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Does your data leave your AWS account when using Bedrock?

A

No, all operations occur within your AWS account; data stays private.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the pricing model of Amazon Bedrock?

A

Pay-per-use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is meant by ‘unified API’ in Bedrock?

A

A standardized interface to access all supported foundation models, simplifying integration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What companies provide models on Amazon Bedrock?

A

AI21 Labs, Cohere, Stability.ai, Amazon, Anthropic, Meta, Mistral AI, and more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Can you fine-tune foundation models on Amazon Bedrock?

A

Yes, using your own data, within your own account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Does fine-tuning share your data with the model provider?

A

No, your data is never sent back to the model provider.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the Amazon Bedrock Playground?

A

An interactive interface to experiment with foundation models by submitting prompts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What advanced features does Amazon Bedrock offer?

A

RAG (Retrieval-Augmented Generation), LLM agents, knowledge bases, security, and responsible AI features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is RAG in Amazon Bedrock?
A method to enhance model answers by retrieving relevant information from external data sources.
26
What is a knowledge base in Bedrock?
An external data store connected to Bedrock to provide domain-specific context for more accurate responses.
27
How does Amazon Bedrock support application integration?
Through a single unified API, making it easy to interact with different models programmatically.
28
Can you use Bedrock to build a chatbot?
Yes, using LLMs and additional tools like knowledge bases and RAG to create intelligent conversational agents.
29
What factors should you consider when selecting a foundation model on Amazon Bedrock?
Model type, performance, customization options, inference capabilities, licensing, context window, latency, modality support, compliance, and cost.
30
What is a multimodal foundation model?
A model that can accept and produce multiple types of data, such as text, audio, image, and video.
31
What is Amazon Titan?
A high-performing foundation model developed by AWS with support for text and image generation, available via Amazon Bedrock.
32
Can Amazon Titan be customized with your own data?
Yes, it supports fine-tuning using your own data within your AWS account.
33
What is the trade-off between smaller and larger models?
Smaller models are more cost-effective but have limited knowledge; larger models are more capable but expensive.
34
What is Llama-2 and who created it?
A foundation model created by Meta, focused on English text generation and large-scale tasks.
35
What is Claude and who developed it?
A foundation model developed by Anthropic, known for its large context window and strong document analysis capabilities.
36
What is Stability AI known for on Bedrock?
Image generation using the Stable Diffusion model, useful for advertising and media content.
37
Why might a larger context window be useful?
It allows you to input large documents, code bases, or books, enabling the model to reason over more content.
38
What are use cases for Amazon Titan?
Content creation, classification, and educational applications.
39
What are use cases for Claude?
Analysis, forecasting, and document comparison due to its large context window.
40
What are use cases for Stability AI?
Image generation for advertising, media, and creative projects.
41
How does pricing affect foundation model choice?
More capable models may be more expensive; choosing a model that balances cost and performance is crucial.
42
How is pricing typically measured on Amazon Bedrock?
By the number of tokens processed (e.g., cost per 1,000 tokens).
43
What is a potential risk when using foundation models with pay-per-use pricing?
Costs can escalate quickly if usage isn't carefully monitored.
44
What is fine-tuning in Amazon Bedrock?
Adapting a copy of a foundation model by training it with your own data to improve performance on domain-specific tasks.
45
Where must training data be stored for fine-tuning in Amazon Bedrock?
In Amazon S3.
46
Does fine-tuning change the foundation model itself?
Yes, it updates the model’s weights based on your data.
47
What pricing model must you use for a fine-tuned model on Amazon Bedrock?
Provisioned throughput.
48
Are all models on Amazon Bedrock fine-tunable?
No, only some models, typically open-source ones, support fine-tuning.
49
What is instruction-based fine-tuning?
Fine-tuning using labeled data with prompt-response pairs to improve performance on specific tasks.
50
What kind of data is used for instruction-based fine-tuning?
Labeled data with prompt-response pairs.
51
What is continued pre-training in Bedrock?
Fine-tuning using unlabeled data to adapt a foundation model to a specific domain.
52
What is another name for continued pre-training?
Domain-adaptation fine-tuning.
53
When should you use continued pre-training?
When you have large amounts of unlabeled domain-specific data.
54
What is an example use case of continued pre-training?
Feeding the entire AWS documentation to make the model an AWS expert.
55
What are single-turn and multi-turn messaging in fine-tuning?
Fine-tuning approaches that teach a model how to handle one-turn or conversational multi-turn chat interactions.
56
What roles are defined in multi-turn messaging format?
System (optional context), User, and Assistant.
57
Which fine-tuning method is cheaper: instruction-based or continued pre-training?
Instruction-based fine-tuning is generally cheaper and uses less data.
58
What does continued pre-training require?
A large amount of unlabeled data and more computation, thus higher cost.
59
What is transfer learning?
Using a pre-trained model and adapting it to a new but related task—fine-tuning is a form of transfer learning.
60
What is a practical use case for transfer learning in image classification?
Using a pre-trained model for edge detection and adapting it to classify a specific kind of image.
61
What’s the difference between transfer learning and fine-tuning?
Fine-tuning is a specific application of transfer learning tailored to refining model behavior with new data.
62
When is fine-tuning a good idea?
When you need a custom tone/persona, work with proprietary data, or aim to improve accuracy for specific tasks.
63
What kind of data would trigger instruction-based fine-tuning?
Labeled data with prompt-response examples.
64
What kind of data would trigger continued pre-training?
Unlabeled data, such as raw domain-specific documentation.
65
Why is provisioned throughput more expensive?
It provides dedicated infrastructure for consistent performance with fine-tuned models.
66
What type of expert might be needed for fine-tuning a model?
A machine learning engineer, though Bedrock simplifies the process.
67
What is Automatic Evaluation in Amazon Bedrock?
It's a feature to evaluate a model for quality control by submitting it tasks and using benchmark datasets, then automatically scoring its performance using judge models.
68
What are the built-in task types available for automatic evaluation in Bedrock?
Text summarization, question and answer, text classification, and open-ended text generation.
69
What are benchmark questions and answers used for?
They help test the model by comparing its generated answers to ideal (benchmark) answers to assess accuracy.
70
What is the purpose of a judge model in automatic evaluation?
The judge model compares the model-generated answer to the benchmark answer and assigns a score based on similarity.
71
Can you bring your own benchmark dataset in Amazon Bedrock?
Yes, you can use your own or a curated dataset from AWS.
72
What are the benefits of using benchmark datasets?
They help measure accuracy, speed, scalability, and detect bias in the model.
73
What is the difference between automatic and human evaluation?
Automatic uses judge models and metrics, while human evaluation involves people scoring the outputs based on criteria like relevance or correctness.
74
What kind of metrics are used in human evaluation?
Thumbs up/down, ranking, and other grading scales.
75
What does ROUGE stand for?
Recall-Oriented Understudy for Gisting Evaluation.
76
What is ROUGE used for?
Evaluating summarization and machine translation by comparing n-grams in reference and generated text.
77
What is ROUGE-N?
A ROUGE metric measuring how many n-grams (e.g., 1-gram, 2-gram) match between reference and generated texts.
78
What is ROUGE-L?
It computes the longest common subsequence between the reference and generated text.
79
What does BLEU stand for?
Bilingual Evaluation Understudy.
80
What is BLEU used for?
Evaluating the quality of translated text, focusing on precision and penalizing brevity.
81
What does BERTScore evaluate?
Semantic similarity between texts using embeddings and cosine similarity.
82
Why is BERTScore better than ROUGE or BLEU for nuanced text?
Because it compares meanings using embeddings rather than just word overlap.
83
What is perplexity in the context of language models?
A measure of how well the model predicts the next token; lower is better.
84
What does low perplexity indicate?
That the model is confident and accurate in predicting the next token.
85
What can be done with evaluation metrics in a feedback loop?
They can be used to retrain and improve model outputs over time.
86
Name some business metrics to evaluate a foundation model.
User satisfaction, average revenue per user, cross-domain performance, conversion rates, efficiency.
87
Why would you create a custom benchmark dataset?
To evaluate the model using criteria specific to your business needs.
88
What does RAG stand for in generative AI?
Retrieval Augmented Generation
89
What is the core idea behind RAG?
It allows a foundation model to reference external data sources without fine-tuning.
90
What AWS service is used to manage the knowledge base in a RAG system?
Amazon Bedrock
91
What storage service is commonly used as the data source for the knowledge base in AWS Bedrock?
Amazon S3
92
What type of database underlies a knowledge base in a RAG system?
Vector database
93
What does a vector database store in the context of RAG?
Vector embeddings of chunks of data for semantic search
94
What are embeddings in the context of RAG?
Numerical representations of text used to measure similarity
95
What happens to a user's query in RAG before being sent to the foundation model?
It's augmented with retrieved information from the knowledge base, First model will search all related data to query from vector DB then pass it to main FM "Original Query + Retrieved Text " . then main FM generates final output
96
Name two AWS services that can be used as vector databases for RAG.
Amazon OpenSearch Service, Amazon Aurora
97
Name three third-party vector databases supported by AWS Bedrock.
MongoDB, Redis, Pinecone
98
What happens if no vector database is specified in AWS Bedrock?
AWS automatically creates a serverless OpenSearch vector database
99
Which two models can be used for embeddings in AWS Bedrock?
Amazon Titan, Cohere
100
Can the embeddings model and foundation model be different in AWS Bedrock?
Yes
101
What is the purpose of chunking documents in RAG?
To split them into smaller parts for vector embedding and search
102
What kind of performance does Amazon OpenSearch offer for RAG?
Real-time similarity search with scalable index management and KNN support
103
What is Amazon DocumentDB best known for in RAG use cases?
NoSQL compatibility and support for real-time vector similarity search
104
Which two relational databases are supported for vector storage in AWS Bedrock?
Amazon Aurora, Amazon RDS for PostgreSQL
105
What AWS service should you choose for graph-based data in a RAG system?
Amazon Neptune
106
What are the common data sources for AWS Bedrock knowledge bases?
Amazon S3, Confluence, SharePoint, Salesforce, Webpages
107
Give one use case for RAG in customer support.
Building a chatbot that retrieves answers from product documentation and FAQs
108
Give one use case for RAG in legal research.
Chatbot answering legal queries based on case law, regulations, and legal opinions
109
Give one use case for RAG in healthcare.
AI assistant answering medical questions based on treatments and research papers
110
What is tokenization in Gen AI?
It is the process of converting raw text into a sequence of tokens.
111
What are the two main types of tokenization?
Word-based and subword-based tokenization.
112
Why is subword tokenization useful?
It helps handle long or rare words by breaking them into common sub-parts, reducing the number of unique tokens.
113
What is a token in the context of LLMs?
A token is a unit of text such as a word, part of a word, or even punctuation, each mapped to a unique ID.
114
Why are tokens mapped to IDs?
It's easier and more efficient for models to work with numeric IDs than raw text.
115
What is a context window in LLMs?
It is the number of tokens a model can consider at one time for understanding and generating text.
116
Why is a larger context window important?
It allows the model to handle more information, increasing coherence and performance.
117
Which model supports the largest context window currently in research?
Google Gemini 1.5 Pro – up to 10 million tokens.
118
What are embeddings in Gen AI?
They are vectors (arrays of numbers) that represent the meaning and context of tokens, words, images, or audio.
119
What is the use of embedding vectors?
They allow models to understand semantic meaning and similarity between inputs.
120
How are embeddings created?
Text is tokenized, then each token is passed through an embeddings model to generate a numerical vector.
121
What kind of database stores embeddings?
Vector databases store and index embeddings for similarity search.
122
Why are high-dimensional vectors used in embeddings?
They can capture multiple features like meaning, sentiment, and syntax of the token.
123
What is dimensionality reduction used for in embeddings?
To visualize high-dimensional embeddings in 2D or 3D for interpretation.
124
How can you visualize semantic similarity between tokens?
By plotting reduced-dimension vectors or comparing color-coded embedding patterns.
125
How do similar words appear in embedding space?
They are close together in the vector space, allowing similarity search.
126
What is a key benefit of using embeddings in search?
They enable semantic search by finding contextually related results, not just keyword matches.
127
What are Guardrails in Amazon Bedrock?
They are controls that help manage interactions between users and Foundation Models by filtering undesirable or harmful content.
128
What can Guardrails block?
They can block specific topics (e.g., food recipes), PII, or other harmful content.
129
What is an example of Guardrails in action?
If a Guardrail is set to block food recipes and the user asks for a cooking suggestion, the model will respond that it's a restricted topic.
130
How do Guardrails help with privacy?
They can automatically detect and remove personally identifiable information (PII).
131
What other benefit do Guardrails provide aside from filtering?
They help reduce hallucinations by ensuring answers are factual and controlled.
132
Can you create multiple Guardrails in Amazon Bedrock?
Yes, you can configure multiple Guardrails and apply different levels of control.
133
How can Guardrails be monitored?
You can analyze user inputs that violate Guardrails to refine and improve their configuration.
134
Why are Guardrails important in Gen AI applications?
They enhance safety, privacy, and compliance by restricting harmful or unwanted content.
135
What is an Amazon Bedrock Agent?
It is an intelligent component that can perform multi-step tasks, integrate with systems, and act beyond just answering questions.
136
What are action groups in Bedrock Agents?
They define specific tasks or API endpoints the agent can interact with to perform operations.
137
How do agents interact with external systems?
They use action groups configured via APIs or AWS Lambda functions to execute tasks.
138
What is an example use case for a Bedrock Agent?
Accessing customer purchase history, recommending products, and placing new orders.
139
What schema defines the APIs used by agents?
OpenAPI schema.
140
Can agents access knowledge bases?
Yes, they can retrieve relevant information from defined knowledge bases for context-aware responses.
141
What is 'chain of thought' in Bedrock Agents?
It is the process where the agent plans a step-by-step execution strategy using a GenAI model.
142
How does the agent decide what steps to take?
It uses prompt, conversation history, available actions, and knowledge base context to plan tasks.
143
What AWS feature allows agents to run code without managing infrastructure?
AWS Lambda.
144
How can developers debug an agent's behavior in Bedrock?
By using the tracing feature, which shows the sequence of actions taken by the agent.
145
How does Amazon Bedrock integrate with CloudWatch?
Through model invocation logging and publishing metrics to CloudWatch.
146
What is model invocation logging in Bedrock?
It records all inputs and outputs of model calls, including text, images, and embeddings, to CloudWatch Logs or S3.
147
What service allows you to analyze Bedrock logs in real-time?
CloudWatch Logs Insights.
148
What is the benefit of model invocation logging?
Provides a full history and enables monitoring, debugging, and auditing of Bedrock usage.
149
What is the 'content filtered count' metric used for?
Tracks how often content is filtered by guardrails in Bedrock.
150
Can CloudWatch create alerts for Bedrock activity?
Yes, using CloudWatch Alarms based on published metrics.
151
What are the three main pricing modes in Amazon Bedrock?
On-Demand, Batch Mode, and Provisioned Throughput.
152
How are you charged in On-Demand mode?
Based on input and output tokens for text models, input tokens for embeddings, and per image for image models.
153
What is the benefit of Batch Mode pricing in Amazon Bedrock?
Up to 50% discount compared to On-Demand, with responses delivered later.
154
What is Provisioned Throughput used for?
To reserve guaranteed throughput for base, fine-tuned, or custom models.
155
When is Provisioned Throughput mandatory?
When using fine-tuned, custom, or imported models.
156
What is the cost of using prompt engineering?
Very low or free, as it doesn’t require training or compute resources.
157
What does RAG cost depend on?
External infrastructure like vector databases—not model retraining.
158
What is the main driver of cost in Amazon Bedrock?
The number of input and output tokens processed.
159
Does changing temperature, Top K, or Top P affect pricing?
No, they do not impact the cost.