
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A travel company wants their LLM to generate friendly itinerary suggestions. They want the output to follow a specific structure and tone. Which prompting strategy should they apply?
A
Zero-shot prompting
B
Few-shot prompting with structured templates
C
Chain-of-thought prompting
D
Repetition penalty prompting
Explanation:
Few-shot prompting with structured templates is the correct approach because:
Specific Structure and Tone Requirements: The travel company needs the LLM to generate itinerary suggestions that follow both a specific structure (format/layout) and a particular tone (friendly). Few-shot prompting provides examples that demonstrate exactly what is expected.
How Few-shot Prompting Works: This technique provides the LLM with several examples ("shots") of the desired input-output format before asking it to generate new content. These examples serve as templates that show:
The exact structure to follow
The appropriate tone to use
The type of content expected
Why Other Options Are Incorrect:
Zero-shot prompting (A): Only provides instructions without examples. This is insufficient when specific structure and tone are required.
Chain-of-thought prompting (C): Focuses on showing step-by-step reasoning processes, which is useful for complex reasoning tasks but not for enforcing specific output formats and tones.
Repetition penalty prompting (D): Is a technique to reduce repetitive outputs by penalizing repeated tokens, not for controlling structure and tone.
Practical Application: The company would provide 3-5 examples of friendly itinerary suggestions with the desired structure, then ask the LLM to generate new suggestions following the same pattern. This ensures consistency in both format and tone across all generated content.