Q13 · Domain 4 · Prompt Engineering & Structured Output
You extract the delivery date from scanned delivery notes. The instruction "Return the delivery date as YYYY-MM-DD" works on clean notes and fails on unusual layouts, where the date sits in a stamp or a handwritten box. What do you try next?
- A. Fine-tune a model on a few thousand labelled delivery notes before going any further.
- B. Ask for step-by-step written reasoning on every single note before it gives its final answer.
- C. Add a few examples of awkward layouts with the correct output, including one with no date (null).
- D. Raise max_tokens so that the model has more room to search each note carefully.
Answer and explanation
Answer: C. The desired behaviour is easier to show than to describe, which is what few-shot examples are for, and including a no-date case stops the model inventing one. Fine-tuning is a last resort. Step-by-step reasoning helps when the reasoning path matters; spotting a date in a stamp is recognition. max_tokens caps output length and has nothing to do with this.
- A. Fine-tuning is a last resort. Showing the model a few examples comes first.
- B. Step-by-step reasoning helps when the reasoning path matters. Spotting a date in a stamp is recognition.
- C. Right. The behaviour is easier to show than to describe, which is what few-shot examples are for. The no-date example stops the model inventing a date.
- D. max_tokens caps output length. It has nothing to do with where the date sits on the page.