AWS Certified AI PractitionerFoundation ModelsMedium
A developer is iterating quickly on an application that uses a foundation model for creative writing. They frequently need to adjust the model's behavior, such as making its output more concise, more imaginative, or adhere to a specific persona, without retraining the entire model or even fine-tuning it. Which method allows for flexible and immediate control over a foundation model's output characteristics purely through its input?
- AChanging the model architecture (e.g., adding more layers).
- BPrompt engineering.
- CDomain-Adaptive Pre-training (DAPT).
- DReinforcement Learning from Human Feedback (RLHF).
Show answer & explanationAnswer & explanation
Correct answer: B. Prompt engineering.
Prompt engineering is the practice of designing and refining input prompts to guide a foundation model's behavior and output characteristics. It allows developers to control aspects like conciseness, tone, style, and persona without altering the model's parameters, making it ideal for flexible and immediate adjustments.
Why the other options are wrong
- A. Changing the model architecture is a fundamental alteration to the model itself, requiring extensive retraining, not a quick adjustment via input.
- C. DAPT involves further pre-training on domain-specific data, which is a form of model modification, not just input control.
- D. RLHF is a method for aligning models through a training loop with human feedback, not a real-time input-based control mechanism.
Prompt Engineering
Prompt engineering is the art and science of crafting effective input prompts for foundation models to elicit desired behaviors, responses, and output characteristics without modifying the model's underlying parameters.
- No model retraining or fine-tuning required.
- Directly influences output style, tone, and content.
- Crucial for optimizing FM performance in various applications.
Memory trick: Prompt, fine-tune, or retrain.