자 여러분! 드디어 챕터6의 마지막 컨텐츠까지 잘 따라오셨네요 🍀

이 컨텐츠에서는 LLM 수학 능력을 향상시키기 위해 사용할 수 있는 여러 가지 프롬프팅 방법들을 살펴보도록 하겠습니다!

최근에는 MathPrompter이라는 접근 방법이 소개되었는데, 이는 CoT, PAL 등의 몇 가지 방법을 하나의 기술로 통합하는 것입니다. 즉, 이 방법의 핵심 아이디어는 수학 문제를 대수적 용어로 분해한 다음, Python 코드를 사용하여 다양한 방식으로 해결하는 것입니다.

Untitled

MathPrompter는 네 가지 단계로 이루어져 있기 때문에 아래 예제 문제를 사용하여 각 단계를 설명해보도록 하겠습니다 😍

#STEP1 : 대수 템플릿 생성하기(Generate Algabraic Template)

첫 번째 단계는 문제에서 각 숫자에 변수를 할당하는 것입니다. 이렇게 하면 문제를 추상적인 수학 문제, 그리고 프로그래밍 코드로 쉽게 변환할 수 있습니다.

Prompt ↓

Q: A zoo charges $12 per adult ticket and allows children under 5 to enter for free. A family of 4 adults and 2 children under 5 visit the zoo. What is the total cost for the family to enter? Qt: At a zoo, each adult ticket costs $A and children under 5 can enter for free. If a family of B adults and C children under 5 visit the zoo, what is the total cost for the family to enter? Mapping: {A: 12, B: 4, C: 2} Q: A store sells shoes at $60 per pair and socks at $8 per pair. If a customer buys 2 pairs of shoes and 3 pairs of socks, what is the total cost of the purchase? Qt: At a store, shoes cost $A per pair and socks cost $B per pair. If a customer buys C pairs of shoes and D pairs of socks, what is the total cost of the purchase? Mapping: {A: 60, B: 8, C: 2, D: 3} Q: At a restaurant, each adult meal costs $5 and kids eat free. If a group of 15 people came in and 8 were kids, how much would it cost for the group to eat?

Output ↓

Qt: At a restaurant, each adult meal costs $A and kids eat free. If a group of B people came in and C were kids, how much would it cost for the group to eat? Mapping: {A: 5, B: 15, C: 8}

#STEP2 : 수학 프롬프트 (Math Prompt)