4 ms·
In most cases prompt engineers are hired solely to achieve consistency, in order to reliably integrate the responses into other areas of their stacks which may
by TobyTheDog123 4y ago
In most cases prompt engineers are hired solely to achieve consistency, in order to reliably integrate the responses into other areas of their stacks which may only be able to handle certain kinds of inputs.
Let me give a real example (cant go into too much depth but this is generic enough). I was told to create a prompt that would make ChatGPT generate ten of the hottest real estate markets:
"You must always format this data in exactly the following format: ${index (as a single numeral)}: ${name of location} ${median housing price} ${YoY increase} ${link to internal system} ${number of available locations}"
You would think this would be a pretty easy task for ChatGPT/Davinci to handle, but like I said, consistency is completely missing.
- Sometimes it will say "Market ${index}" instead of just the number, even with the single numeral qualifier.
- Sometimes it will comma separate the data, even if there are explicit instructions not to do so
- Sometimes it will provide the prices/percentages/numbers as regular integers, sometimes it will format them, again, even if explicit instructions are provided
- Sometimes it will place an empty space in between the lines, even if there are explicit instructions not to do so
- Sometimes it will place random punctuation at the end, even if there are explicit instructions not to do so
It's entirely random, you could have a 4000 token prompt or a 40 token prompt, and the results will be of the same quality.
Usually, this is fine for content generation. But content formatting? Anything remotely specific? Forget about it. All of the models (I haven't been able to try ChatGPT 4 yet, however) will simply ignore things, even if (and I promise it's the last time I'll say this) there are explicit instructions not to do so.
- simonw 4y agoDoes it help if you give it a few examples of correctly formatted data instead of trying to describe the desired format to it?
- TobyTheDog123 4y agoUnfortunately this suffers from the same effect as the descriptions. I would say a solid 7 times out of 10 everything works as expected, but sometimes it seems the model goes down another path and ignores most instructions. I would claim that using examples do improve its chances, but it is still too random to assume the edits were what improved the response, or whether it just happened to be a lucky roll of the dice.
- mncharity 4y agoVery not my field, but I've seen it suggested that attempting to highly constrain response format can degrade semantic quality, so one does separate report and reformatting prompts? Perhaps ask for json, to simplify the output space? I imagine in the near future we'll be able to prompt with a json schema, and have it enforced.