提示词库/填空即用的框架/Separating the Instructions from the Dataset(指令与数据集分离)
Separating the Instructions from the Dataset(指令与数据集分离)
exp-0129未验证
You'll notice that we never gave the dataset to the LLM in our first prompt. Instead, the prompt gives only the task instructions for the dataset analysis, with this added to the bottom:
# START ANALYSIS
If you understand, ask me for my dataset.
ChatGPT then responded that it understands, and we passed the dataset to it as a CSV string in our next prompt.
Doing so helps the LLM maintain clarity in understanding each, with lower likelihood of missing out information, especially in more complex tasks such as this one with longer instructions.
You might have experienced scenarios where the LLM "accidentally forgets" a certain instruction you gave as part of a longer prompt - for example, if you asked for a 100-word response and the LLM gives you a longer paragraph back. By receiving the instructions first, before the dataset that the instructions are for, the LLM can first digest what it should do, before executing it on the dataset provided next.
Note however that this separation of instructions and dataset can only be achieved with chat LLMs as they maintain a conversational memory, unlike completion LLMs which do not.