language:en region:us
---
language: en
dataset_info:
  features:
  - name: id
    dtype: int64
  - name: instruction
    dtype: string
  - name: input
    dtype: string
  - name: response
    dtype: string
  splits:
  - name: train
    num_bytes: 12208698
    num_examples: 15014
  download_size: 7936782
  dataset_size: 12208698
---

- Format for Instruction task

```python
def preprocess(
    sample, 
    instruction_key="### Instruction:",
    input_key="Input:",
    response_key="### Response:",
    end_key="<|endoftext|>"
):
    
    instruction = sample['instruction']
    input = sample['input']
    response = sample['response']
    
    if input:
        return {'text': """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
{instruction_key}
{instruction}
{input_key}
{input}
{response_key}
{response}
{end_key}""".format(
    instruction_key=instruction_key,
    instruction=instruction,
    input_key=input_key,
    input=input,
    response_key=response_key,
    response=response,
    end_key=end_key,
)}
    else:
        return {'text': """Below is an instruction that describes a task. Write a response that appropriately completes the request.
{instruction_key}
{instruction}
{response_key}
{response}
{end_key}""".format(
    instruction_key=instruction_key,
    instruction=instruction,
    response_key=response_key,
    response=response,
    end_key=end_key,
)}

"""
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
When did Virgin Australia start operating?
Input: 
Virgin Australia, the trading name of Virgin Australia Airlines Pty Ltd, is an Australian-based airline. It is the largest airline by fleet size to use the Virgin brand. It commenced services on 31 August 2000 as Virgin Blue, with two aircraft on a single route.[3] It suddenly found itself as a major airline in Australia's domestic market after the collapse of Ansett Australia in September 2001. The airline has since grown to directly serve 32 cities in Australia, from hubs in Brisbane, Melbourne and Sydney.[4]
### Response:
Virgin Australia commenced services on 31 August 2000 as Virgin Blue, with two aircraft on a single route.
<|endoftext|>
"""
```