Running the solution produces "Induction Hob Research." and If we run it again, the result changes slightly but stays in the same area.
Inside the system prompt, an <examples> XML tag has been added. Each <example> contains an <input> and an <expected> output:
The rules are also included, such as “title should be at most 30 characters.”
When we remove that rule and try again, the output becomes a little longer which is not bad, but it shows the rule was useful. Next, removing the task context still gives us a good result.
If we also take away the ask and the output format, the results start to drift. Adding the ask back in quickly restores the good output we had before.
This shows how powerful exemplars can be. They let us describe in very few tokens, and with less mental overhead the exact inputs and outputs we want from the system.
Exemplars are a really useful technique for prompt engineering.
<examples>${exemplars.map((e) =>`<example><input>${e.input}</input><expected>${e.expected}</expected></example>`,).join('\n')}</examples>