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: [ { ['
    target: 'We should process each input one by one and keep track of the stack configuration.

      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: < > ( ( [ [ ( { } ) [ < > ] ]'
    target: 'We should process each input one by one and keep track of the stack configuration.

      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: < [ < [ { < [ ] < { } > > } ] > { { ( ) } { < [ < >
      ] > }'
    target: 'We should process each input one by one and keep track of the stack configuration.

      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
