Datasets:
Download scripts/prompts.py from RL-MIND/SUM: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/datasets/RL-MIND/SUM/resolve/main/scripts/prompts.py
- Command line
-
hf download hf://datasets/RL-MIND/SUM/scripts/prompts.py
-
curl -L -o prompts.py https://huggingface.co/datasets/RL-MIND/SUM/resolve/main/scripts/prompts.py
590 Bytes
| """Reference prompt builders for the normalized release and legacy experiments.""" | |
| def build_prompt(sample, legacy=False): | |
| choices=sample['choices'] | |
| letters=', '.join(c['label'] for c in choices) | |
| question=sample['question_raw'] if legacy else sample['question'] | |
| return ( | |
| 'Please answer the following multiple-choice question based on the image.\n' | |
| f'You must output only one uppercase letter from: {letters}. Do not output anything else.\n' | |
| f'Question: {question}\nOptions:\n' | |
| + '\n'.join(f"{c['label']}. {c['text']}" for c in choices) | |
| ) | |