dyck_languages.yaml 2.99 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dataset_name: dyck_languages
description: 'Correctly close a Dyck-n word.


  '
doc_to_text: 'Q: {{input}}

  A: Let''s think step by step.

  '
fewshot_config:
  sampler: first_n
  samples:
  - input: 'Complete the rest of the sequence, making sure that the parentheses are
      closed properly. Input: [ { ['
16
    target: 'We should process each input one by one and keep track of the stack configuration.
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

      0: empty stack

      1: [ ; stack: [

      2: { ; stack: [ {

      3: [ ; stack: [ { [

      Now, we have reached the end. The final stack is "[ { [".

      We will need to pop out "[", "{", "[" one by one in that order.

      So, we need "]", "}", "]". So the answer is ] } ].'
  - input: 'Complete the rest of the sequence, making sure that the parentheses are
      closed properly. Input: < > ( ( [ [ ( { } ) [ < > ] ]'
33
    target: 'We should process each input one by one and keep track of the stack configuration.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

      0: empty stack

      1: < ; stack: <

      2: > ; stack: empty

      3: ( ; stack: (

      4: ( ; stack: ( (

      5: [ ; stack: ( ( [

      6: [ ; stack: ( ( [ [

      7: ( ; stack: ( ( [ [ (

      8: { ; stack: ( ( [ [ ( {

      9: } ; stack: ( ( [ [ (

      10: ) ; stack: ( ( [ [

      11: [ ; stack: ( ( [ [ [

      12: < ; stack: ( ( [ [ [ <

      13: > ; stack: ( ( [ [ [

      14: ] ; stack: ( ( [ [

      15: ] ; stack: ( ( [

      Now, we have reached the end. The final stack is "( ( [".

      We will need to pop out "[", "(", "(" one by one in that order.

      So, we need "]", ")", ")". So the answer is ] ) ).'
  - input: 'Complete the rest of the sequence, making sure that the parentheses are
      closed properly. Input: < [ < [ { < [ ] < { } > > } ] > { { ( ) } { < [ < >
      ] > }'
75
    target: 'We should process each input one by one and keep track of the stack configuration.
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

      0: empty stack

      1: < ; stack: <

      2: [ ; stack: < [

      3: < ; stack: < [ <

      4: [ ; stack: < [ < [

      5: { ; stack: < [ < [ {

      6: < ; stack: < [ < [ { <

      7: [ ; stack: < [ < [ { < [

      8: ] ; stack: < [ < [ { <

      9: < ; stack: < [ < [ { < <

      10: { ; stack: < [ < [ { < < {

      11: } ; stack: < [ < [ { < <

      12: > ; stack: < [ < [ { <

      13: > ; stack: < [ < [ {

      14: } ; stack: < [ < [

      15: ] ; stack: < [ <

      16: > ; stack: < [

      17: { ; stack: < [ {

      18: { ; stack: < [ { {

      19: ( ; stack: < [ { { (

      20: ) ; stack: < [ { {

      21: } ; stack: < [ {

      22: { ; stack: < [ { {

      23: < ; stack: < [ { { <

      24: [ ; stack: < [ { { < [

      25: < ; stack: < [ { { < [ <

      26: > ; stack: < [ { { < [

      27: ] ; stack: < [ { { <

      28: > ; stack: < [ { {

      29: } ; stack: < [ {

      Now, we have reached the end. The final stack is "< [ {".

      We will need to pop out "{", "[", "<" one by one in that order.

      So, we need "}", "]", ">". So the answer is } ] >.'
include: _cot_fewshot_template_yaml
task: bbh_cot_fewshot_dyck_languages