(item, prompt_mode, discipline)
| 9 | |
| 10 | |
| 11 | def _parse(item, prompt_mode, discipline): |
| 12 | choices = item['choices'] |
| 13 | |
| 14 | item['q4'] = f'You are an expert in {discipline}.\n' |
| 15 | item['q4'] += item['prompt']['default'] + '\n' + item['question'] + '\n' |
| 16 | label_texts = [] |
| 17 | for label_meta, text_meta in zip(choices['label'], choices['text']): |
| 18 | label_texts.append(f'{label_meta}. {text_meta}') |
| 19 | item['q4'] += '\n'.join(label_texts) # noqa: E501, E741, E741 |
| 20 | item['prompt_mode'] = prompt_mode |
| 21 | return item |
| 22 | |
| 23 | |
| 24 | @LOAD_DATASET.register_module() |