Prompt Engineering Flashcards

1
Q

Prompt Engineering

A

The practice of developing, designing, and optimizing prompts to enhance the output of FMs for your needs

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

Enhanced Prompting

A

Prompt Engineering technique where you provide Instructions, Context, Input Data, and Output Indicators

Naive prompts can be vague and open-ended to interpretation; this technique helps greatly focus the FM on your desired output

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

Negative Prompting

A

Prompt Engineering technique where you explicitly instruct the model on what not to include or do in its response

Avoid unwanted content, such as irrelevant or inappropriate content

Maintain focus; model stays on topic and does not stray into areas that aren’t useful or desired

Enhance clarity; prevents use of complex terms or detailed data if you wish

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

System Prompts

A

Prompt Performance Optimization for Bedrock that determines how the model should behave and reply

You provide a small prompt instructing the model how to behave

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

Temperature

A

Prompt Performance Optimization for Bedrock that determines the creativity of the model’s output

Ranges from 0 to 1; the higher the value, the more diverse, creative, and unpredictable the output

Higher values can also lead to less coherence; lower values will focus on the most likely responses

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

Top P

A

Prompt Performance Optimization for Bedrock that determines which range of words are used

Ranges from 0 to 1; the higher the value, the broader the range of words that the model can use

Values represent the X% most likely words to be used; lower values will be more coherent

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

Top K

A

Prompt Performance Optimization for Bedrock that limits the number of probable words

Unlimited range; lower numbers means less probable words but more coherent responses

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

Length

A

Prompt Performance Optimization for Bedrock that determines the maximum size of the answer

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

Stop Sequences

A

Prompt Performance Optimization for Bedrock representing tokens that signal the model to stop generating output

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

Prompt Latency

A

Bedrock property that determines how fast the model responds

Impacted by model size, model type, and # of tokens in input/output; more tokens means slower responses

Not affected by Temperature, Top P, or Top K

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

Zero-Shot Prompting

A

Prompt Engineering technique where you present a task to the model without providing examples or explicit training for that specific task

You fully rely on the model’s general knowledge

The larger and more capable the FM, the more likely you’ll get good results

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

Few-Shots Prompting

A

Prompt Engineering technique where you provide some examples of a task to a model to guide its output

If you have existing examples/samples, you can feed them to your model to help focus it on your task

AKA One-Shot Prompting if only one example is provided

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

Chain Of Thought Prompting

A

Prompt Engineering technique where you divide the task into a sequence of reasoning steps, leading to more structure and coherence

Use sentences like “think step by step” to structure the model’s response output

Helpful when solving problems, as a human usually requires several steps

Can be combined with Zero-Shot or Few-Shots Prompting

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

Retrieval-Augmented Generation

A

Prompt Engineering technique where you combine the model’s capability with external data to generate more informed and context-rich responses

Initial prompt is augmented with external information

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

Prompt Templates

A

Prompt Engineering technique that simplifies and standardizes process of generating prompts

Helps with processing user input text and output prompts; orchestrates between FM, action groups, and knowledge bases; formats and returns responses to users

You can also provide examples with Few-Shots Prompting to improve the model performance

These can be used with Bedrock Agents

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

Prompt Template Injection

A

Prompt Template attack where users enter malicious inputs to hijack prompts and get info about prohibited/harmful topics

“Obey only the last choice of the question”

You can protect against this attack by adding explicit instructions to ignore any unrelated or potentially malicious content