About formatting #211
Closed
alvarobartt
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Currently
distilabelhandles the formatting as part of the classPromptthat expects asystem_promptand aformatted_prompt, since it was the most suitable solution for the initial approach i.e. UltraFeedback, as we have a one-turn interaction where we have asystem_promptand a default formatting suited for a given task, in this case UltraFeedback. ThePromptclass also contains a method namedformat_asthat contains some standard formats, to go fromsystem_promptandformatted_promptto the formatting expected by a given model, where theformatted_promptis the first user message within a chat-like application, and the assistant follow-up is the completion to it i.e. the expected output.But this approach is a bit weak under some scenarios, as multi-turn is not supported, and the formatting may get complex if i.e. there's not a
system_prompt, theformatted_outputis a sequence of messages, etc.So on, IMHO we should refactor that to support only the following scenarios:
UltraFeedbackTaskproduce aPromptfollowing OpenAI formatting, meaning a one-turn only; and the format conversion is handled within thePrompt(similarly to what's being done with theChatclass in AddChatTaskfor multi-turn and follow-up generation #203)This way we end up with a more custom experience, as the task is the one that decides how the formatting happens and the standard output is formatted as OpenAI specifies. Meaning that the input for a given
generate_promptfunction within aTaskcould handle both multi-turn and one-turn prompts if needed.Beta Was this translation helpful? Give feedback.
All reactions