A company wants an LLM to produce product descriptions that follow a specific example format. Which prompt engineering method helps the model learn and produce outputs that match that format?
Choose an answer
Tap an option to check your answer.
Correct answer: Few-shot prompting.
Why this is the answer
Few-shot prompting is the correct method because it provides the LLM with several examples of the desired input-output format within the prompt itself. By seeing multiple instances of how product descriptions should be structured, the model learns the pattern and is more likely to generate new descriptions that adhere to that specific format. Zero-shot prompting offers no examples, relying solely on the model's pre-trained knowledge, which is unlikely to yield a specific format. One-shot prompting provides only a single example, which might not be sufficient for the model to reliably grasp a complex format. Chain-of-thought prompting focuses on guiding the model through reasoning steps, not on teaching a specific output format.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed