default_max_attempts_per_step: 3
sections:
  - section_id: "section_1"
    title: "Math Quiz: From Basics to Algebra"
    steps:
      - step_id: "step_1"
        title: "Basic Addition"
        content_blocks:
          - "Solve the following problem: 5 + 3"
          - "You can show your work and provide the final answer."
        question: "What is 5 + 3? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is 8.
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Great job! You got the correct answer. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_2"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_1"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_1"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_1"

      - step_id: "step_2"
        title: "Basic Subtraction"
        content_blocks:
          - "Solve the following problem: 10 - 4"
          - "You can show your work and provide the final answer."
        question: "What is 10 - 4? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is 6.
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Great job! You got the correct answer. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_3"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_2"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_2"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_2"

      - step_id: "step_3"
        title: "Basic Multiplication"
        content_blocks:
          - "Solve the following problem: 4 * 2"
          - "You can show your work and provide the final answer."
        question: "What is 4 * 2? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is 8.
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Great job! You got the correct answer. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_4"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_3"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_3"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_3"

      - step_id: "step_4"
        title: "Basic Division"
        content_blocks:
          - "Solve the following problem: 16 / 4"
          - "You can show your work and provide the final answer."
        question: "What is 16 / 4? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is 4.
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Great job! You got the correct answer. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_5"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_4"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_4"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_4"

      - step_id: "step_5"
        title: "Introduction to Variables"
        content_blocks:
          - "Solve for x: x + 5 = 10"
          - "You can show your work and provide the final answer."
        question: "What is the value of x in the equation x + 5 = 10? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is x = 5.
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Great job! You got the correct answer for x. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_6"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_5"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_5"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_5"

      - step_id: "step_6"
        title: "Solving Linear Equations"
        content_blocks:
          - "Solve for x: 2x + 3 = 11"
          - "You can show your work and provide the final answer."
        question: "What is the value of x in the equation 2x + 3 = 11? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is x = 4.
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Great job! You got the correct answer for x. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_7"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_6"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_6"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_6"

      - step_id: "step_7"
        title: "Quadratic Equations"
        content_blocks:
          - "Solve the quadratic equation: x^2 - 5x + 6 = 0"
          - "You can show your work and provide the final answer."
        question: "What are the values of x in the equation x^2 - 5x + 6 = 0? Show your work and provide the answers."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answers are x = 2 and x = 3.
          If the user shows their work but doesn't provide final answers, categorize as 'show_work'.
          If the answers are incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Well done! You found the correct roots of the equation. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_1:step_8"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_7"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_7"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_7"

      - step_id: "step_8"
        title: "Simplifying Expressions"
        content_blocks:
          - "Simplify the expression: 3(x + 2) - 4x"
          - "You can show your work and provide the final answer."
        question: "What is the simplified form of the expression 3(x + 2) - 4x? Show your work and provide the answer."
        tokens_for_ai: |
          Determine if the user's response is correct by checking if the final answer is: 6 - x or -x + 6
          If the user shows their work but doesn't provide a final answer, categorize as 'show_work'.
          If the answer is incorrect, categorize as 'incorrect'.
          If the user wants to change the language, categorize as 'set_language'.
        feedback_tokens_for_ai: |
          DO NOT answer or solve the question problem when explaining the problem. Instead use a different contrived problem.
        buckets:
          - correct
          - incorrect
          - show_work
          - set_language
        transitions:
          correct:
            ai_feedback:
              tokens_for_ai: "Excellent! You simplified the expression correctly. if 'correct' give the answer and solve the question problem showing all work and explain the problem."
            metadata_add:
              score: "n+1"
            next_section_and_step: "section_2:step_1"
          incorrect:
            ai_feedback:
              tokens_for_ai: "The answer is not right. Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              attempts: "n+1"
            next_section_and_step: "section_1:step_8"
          show_work:
            ai_feedback:
              tokens_for_ai: "Thanks the user for showing work. Catch mistakes and suggest next steps. Remember give a separate example to show how to solve the answer, never reveal it."
            metadata_add:
              user_work: "the-users-response"
            next_section_and_step: "section_1:step_8"
          set_language:
            content_blocks:
              - "language updated!"
            metadata_add:
              language: "the-users-response"
            counts_as_attempt: false
            next_section_and_step: "section_1:step_8"

  - section_id: "section_2"
    title: "Quiz Complete"
    steps:
      - step_id: "step_1"
        title: "Completion"
        content_blocks:
          - "Congratulations! You've completed the math quiz."
          - "Your final score will be displayed at the end."
