What are the best practices for formatting conversation history into a single prompt (i.e. newline usage, specifying roles, spacing, special formatting, etc)? In most cases I just pass in an array of previous messages that I have selected to be used as context, but in some cases I want to format the conversation history into a single prompt.
{'role':'system', 'content': 'Given the conversation history: XXXX, write XYZ.'}
Simply formatting the messages into a single string “System: M1, User: M2, System: M3, …” is okay but doesn’t seem like it’s the best solution for formatting conversation history into a prompt.
Not sure how that thread is specifically relevant.
When evaling response quality for some use cases I have found specific context existing in the single shot prompt more effective than system prompt + array of messages, so I am curious if there is a “best practice” for formatting conversation history into a prompt.
I don’t know why you would want to put it all in a single prompt, but I’m pretty sure there’s not really a better way than just telling the AI something like “The following was a conversation:
bob: hi Alice
alice: hi Bob
etc…”
In other words I don’t think there’s any special format, and whatever format humans understand best (like above) is what LLMs understand best too.