region:us
---
dataset_info:
  features:
  - name: Problem
    dtype: string
  - name: Rationale
    dtype: string
  - name: options
    dtype: string
  - name: correct
    dtype: string
  - name: annotated_formula
    dtype: string
  - name: linear_formula
    dtype: string
  - name: category
    dtype: string
  splits:
  - name: train
    num_bytes: 18338902
    num_examples: 29837
  - name: test
    num_bytes: 1841164
    num_examples: 2985
  - name: validation
    num_bytes: 2748461
    num_examples: 4475
  download_size: 11267298
  dataset_size: 22928527
---
# DailyDialog

- Source: https://huggingface.co/datasets/math_qa
- Num examples: 
  - 29,837 (train)
  - 4,475 (validation)
  - 2,985 (test)
- Language: English

```python
from datasets import load_dataset

load_dataset("vietgpt/math_qa_en")
```

- Format for QA task

```python
def preprocess(sample):
    Problem = sample['Problem']
    options = sample['options']
    correct = sample['correct']
    return {'text': f'<|startoftext|><|question|>{Problem}\n{options}<|answer|>{correct}<|endoftext|>'}

"""
<|startoftext|><|question|>average age of students of an adult school is 40 years . 120 new students whose average age is 32 years joined the school . as a result the average age is decreased by 4 years . find the number of students of the school after joining of the new students .
a ) 1200 , b ) 120 , c ) 360 , d ) 240 , e ) none of these<|answer|>d<|endoftext|>
"""

def preprocess_rationale(sample):
    Problem = sample['Problem']
    options = sample['options']
    correct = sample['correct']
    Rationale = sample['Rationale']
    return {'text': f'<|startoftext|><|question|>{Problem}\n{options}<|rationale|>{Rationale}<|endoftext|>'}

"""
<|startoftext|><|question|>average age of students of an adult school is 40 years . 120 new students whose average age is 32 years joined the school . as a result the average age is decreased by 4 years . find the number of students of the school after joining of the new students .
a ) 1200 , b ) 120 , c ) 360 , d ) 240 , e ) none of these<|rationale|>"explanation : let the original no . of students be x . according to situation , 40 x + 120 * 32 = ( x + 120 ) 36 ⇒ x = 120 so , required no . of students after joining the new students = x + 120 = 240 . answer : d"<|endoftext|>
"""
```