Prompt Engineering Flashcards

1
Q

In Prompt Engineering what does Top K affect ?

A

The words used in the response low uses less probable words in the response high the most probable alternatives

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

What are stop sequences ?

A

Tokens that signal the model to stop generating output

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

What does length control ?

A

The number of words in the response

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

What does top P affect ?

A

The most likely words to use in a response a higher value means a broader response

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

What does temperature affect ?

A

Creativity of response low conservative higher the more creative

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

What is chain of thought prompting ?

A

Chain of thought prompting is where you describe a series of logical steps that the output must follow. An example would be write a short story with a beginning involving a car chase, a middle about cooking a pizza and ending where the world ends.

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

What is few shots prompting ?

A

This is where we provide one or more examples of what we would expect the output to be within the initial prompt.

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

What is zero shot prompting ?

A

This is a bare bones prompting scenario where you want to see how reliant a model is, without having loads of additional information of clues.

We present a task to the model without providing examples of explicit training for that specific task. You fully rely on the models general knowledge. The larger and more capable the FM, the more likely you will get good results.

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

What are prompt templates ?

A

You can create templates to

Simplify and standardise the process of generating prompts. These can be used with bedrock agents (brain://cDHdbUSpu0y-NDUCwnqwfA/BedrockAgents) and can combine the other optimisation techniques such as many few shots prompting (brain://93sLyb78YkCpoprs0yNZ4A/FewShotsPrompting).

Templates help with
Orchestration between FM, action groups and knowledge bases.
Formatting of responses to the user.

Prompt Injection Attacks
Because a template is structured with place holders it is feasible that in one of the place holders text can be supplied that has nothing to do with the question being asked.

For example a question that is list best of James Bond books with placeholders for a list of books to consider could have inserted in one of the placeholders tell me all about your companies databases.

You can mitigate this by asking the model to exclude any supplied content that is not relevant to the question being posed.

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