Flashcards
AI
_________ is a field of computer science dedicated to solving
problems that we commonly associate with human intelligence
Artificial Intelligence
Used to generate new data that is similar to the data it was trained on
* Text
* Image
* Audio
* Code
* Video…
Generative AI
To generate data, we must rely on a __________
* ___________ are trained on a wide variety of input data
* The models may cost tens of millions of dollars to train
Foundation Model
Type of AI designed to generate coherent human-like text
* One notable example: GPT-4 (ChatGPT / Open AI)
* Trained on large corpus of text data
* Usually very big models
* Billions of parameters
* Trained on books, articles, websites, other textual data
* Can perform language-related tasks
* Translation, Summarization
* Question answering * Content creatio
Large Language Models (LLM)
We usually interact with the LLM by giving a ____
prompt
What is the term for below: the generated text may be different for every user that uses
the same prompt
Non-deterministic:
What’s Amazon Titan?
- High-performing Foundation Models from AWS
- Image, text, multimodal model choices via a fully-managed APIs
- Can be customized with your own data
What term goes with this:
-Adapt a copy of a foundation model with your own data
Fine Tuning
*Improves the performance of
a pre-trained FM on domain-specific tasks
* = further trained on a
particular field or area of
knowledge
Instruction based fine tuning
-make a model expert in a specific domain
* For example: feeding the entire AWS
documentation to a model to make it an expert on AWS
* Good to feed industry-specific terminology
into a model (acronyms, etc…)
* Can continue to train the model as more
data becomes available
domain-adaptation fine-tuning
- Part of instruction-based
fine-tuning - system (optional) : context
for the conversation. - messages : An array of
message objects, each
containing: - role :
Either user or assistant - content : The text content
of the message
single turn messaging
- To provide instructionbased fine tuning for a
conversation (vs SingleTurn Messaging) - Chatbots = multi-turn
environment - You must alternate
between “user” and
“assistant” roles
multi turn messaging
True or false: Instruction-based fine-tuning is usually cheaper than re training an FM as computations are
less intense and the amount of data required usually less
true
_________ the broader concept of re-using a pre-trained model to adapt it to a new related task
* Widely used for image classification
* And for NLP (models like BERT and GPT)
transfer learning
This is a good use case of _____
- A chatbot designed with a particular persona or tone, or geared
towards a specific purpose (e.g., assisting customers, crafting
advertisements) - Training using more up-to-date information than what the language
model previously accessed - Training with exclusive data (e.g., your historical emails or messages,
records from customer service interactions) - Targeted use cases (categorization, assessing accuracy)
fine tuning
What does it mean to automatically evaluate a model?
Evaluate a model for quality control.
Scores are calculated automatically
What does it mean to have human evaluation of a model?
- Choose a work team to evaluate
- Employees of your company
- Subject-Matter Experts (SMEs)
- Define metrics and how to evaluate
- Thumbs up/down, ranking
- Curated collections of data designed specifically
at evaluating the performance of language
models - Wide range of topics, complexities, linguistic
phenomena - Helpful to measure: accuracy, speed and
efficiency, scalability
benchmark datasets
_________
* Semantic similarity between generated text
* Uses pre-trained ___ models (Bidirectional Encoder Representations from Transformers) to compare the
contextualized embeddings of both texts and computes the cosine similarity between them.
* Capable of capturing more nuance between the texts
- BERTScore
- Evaluate the quality of generated text, especially for translations
- Considers both precision and penalizes too much brevity
- Looks at a combination of n-grams (1, 2, 3, 4)
BLEU: Bilingual Evaluation Understudy
Evaluating automatic summarization and machine translation systems
* ____-N – measure the number of matching n-grams between reference and generated text
* _____–L – longest common subsequence between reference and generated text
- ROUGE: Recall-Oriented Understudy for Gisting Evaluation
- Allows a Foundation Model to reference a data source outside of its training data
- Bedrock takes care of creating Vector Embeddings in the database of your choice based on your data
- Use where real-time data is needed to be fed into the Foundation Model
- RAG = Retrieval-Augmented Generation
search & analytics database
real time similarity queries, store millions of vector embeddings
scalable index management, and fast nearest-neighbor (kNN) search capability
Amazon OpenSearch Service
[with MongoDB compatibility] – NoSQL database
real time similarity queries, store millions of vector embeddings
Amazon DocumentDB