
Answer-first summary for fast verification
Answer: Few-shot prompting with structured templates
## Explanation **Few-shot prompting with structured templates** is the correct approach because: 1. **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. 2. **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 3. **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. 4. **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.
Author: Ritesh Yadav
Ultimate access to all questions.
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
No comments yet.