Skip to content

[FEATURE] Add Task for multi-turn dialogue distillation #1120

Closed
@AndreasMadsen

Description

@AndreasMadsen

Is your feature request related to a problem? Please describe.

I have a dataset like:

[
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": "I'm doing great. How can I help you today?"},
  {"role": "user", "content": "I'd like to show off how chat templating works!"},
  {"role": "assistant", "content": "Okay, let me show you ..."},
]

And I would like to distill the all the "role": "assistant" answers from a newer model, assuming the user will ask the same question. However, it appears that distilabel doesn't support this kind of recursive interaction with an LLM.

Describe the solution you'd like

Instead I would like to able to have an LLM recursively fill in the assistant responses.

input = [
  {"role": "user", "content": "Hello, how are you?"},
]
output = [
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": new_response_1},
]
input = [
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": new_response_1},
  {"role": "user", "content": "I'd like to show off how chat templating works!"},
]
output = [
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": new_response_1},
  {"role": "user", "content": "I'd like to show off how chat templating works!"},
  {"role": "assistant", "content": new_response_2},
]

I apologize if this is already supported, but I couldn't see it anywhere.

Describe alternatives you've considered

The only alternative choice would be to split the observation as:

input = [
  {"role": "user", "content": "Hello, how are you?"},
]
output = [
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": new_response_1},
]
input = [
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": "I'm doing great. How can I help you today?"},
  {"role": "user", "content": "I'd like to show off how chat templating works!"},
]
output = [
  {"role": "user", "content": "Hello, how are you?"},
  {"role": "assistant", "content": "I'm doing great. How can I help you today?"},
  {"role": "user", "content": "I'd like to show off how chat templating works!"},
  {"role": "assistant", "content": new_response_2},
]

However, this is not the same, as I would still be distilling with content from an older LLM. I'm also not sure how to even do this kind of input expansion. Meaning, turning one observation into multiple observations.

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions