First and Second person confused in a rewrite task

I am using the API to rewrite sentences, into a verbose version that should not change their basic semantics. I have the following issue.

When asking GPT to rewrite eg: “Summarize my emails and documents related to topic T”, I am getting the verbose version OK, but GPT sometimes thinks this is a conversation and replaces “my” with “your”, or “I” with “You”.

The result is a verbose version of “Summarize your emails and documents related to topic T”.

It becomes better when adding examples in the context. However we still get what looks like an artifact of being in some dialog mode, whereas our task is simply to rewrite.

Please advise.

Welcome to the Forum!

It looks to me like you need to expand your prompt, specifying the nature of the task and your expectations for the output.

Among other things, you should clarify the nature of inputs you are providing to the model (e.g. multiple emails from just yourself or emails from multiple persons) as well as provide clear stylistic instructions regarding the person you’d like the model to write the summary in, the tone, level of detail etc.

Adding examples, i.e. few-shot prompting, like you already do is a good practice but it does not entirely replace the need for instructions.

If in doubt about your prompt you can also try to use the model to reverse engineer a prompt by showing it the inputs and the desired outputs and having it construct an example prompt for the summarization task.

Finally, if these changes still don’t lead to significant improvements, you can consider fine-tuning a model such as gpt-4o for this task.

1 Like