07-prompt-engineering Flashcards

(4 cards)

1
Q

What does Huyen mean by “prompt engineering is context construction”?

A

Prompt engineering is not just writing good text — it is systematically constructing the information context the model needs: instruction hierarchy, defensive constraints, retrieved knowledge, and examples — all optimized for utility per token.

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

What is the Instruction Hierarchy?

A

The ordering of prompt instructions where system-level instructions take precedence over user-level inputs. This ensures behavioral compliance (e.g., federal neutrality mandates) cannot be overridden by user prompts or prompt injection attacks.

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

What is defensive prompt engineering?

A

Techniques to prevent prompt injection and jailbreak attacks — including instruction hierarchy enforcement, input validation rails, and system prompt constraints that override adversarial user inputs.

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

What is In-Context Learning?

A

The ability of LLMs to learn tasks from examples provided in the prompt (few-shot prompting) without updating model weights. Includes few-shot prompting, chain-of-thought prompting, and structured output formatting.

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