Fundamentals of Generative AI
Prompt Engineering
Prompt engineering shapes model output without changing model weights. AIF-C01 commonly tests zero-shot and few-shot prompting, templates, negative prompts, and prompt-injection risk.
Concepts
- Zero-shot prompting gives instructions without examples.
- Few-shot prompting includes examples to guide output style or task behavior.
- Prompt templates standardize reusable prompts with variables.
- Negative prompts describe content or behavior to avoid, especially in image generation.
- Chain-of-thought style prompting can improve reasoning but sensitive reasoning traces should be handled carefully.
- Prompt injection tries to override developer or system instructions or exfiltrate hidden context.
Exam tips
- Zero-shot prompts include instructions without examples; few-shot prompts include examples.
- Prompt templates standardize repeated prompts with variables.
- Prompt injection attempts to override instructions or expose hidden context.