File size: 9,010 Bytes
fe26e98
 
 
13784ec
 
 
 
 
fe26e98
 
bbc85ab
cc907ab
e7f4844
 
 
cc907ab
 
 
 
 
 
 
 
 
 
e7f4844
fe26e98
13784ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
75
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
---
library_name: peft
base_model: MLP-KTLim/llama-3-Korean-Bllossom-8B
license: llama3
datasets:
- HAERAE-HUB/K2-Feedback
language:
- ko
---

# ํ•œ๊ตญ์–ด Prometheus ๋ชจ๋ธ (Test Model)

LoRA ํ•™์Šตํ•œ ๋’ค, [LogicKor](https://github.com/instructkr/LogicKor)์— ๊ณต๊ฐœ๋œ GPT-4์˜ judgement์™€ ๋น„๊ตํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. 
์˜ˆ์ œ์— ์žˆ๋Š” ํ”„๋กฌํ”„ํŠธ๋กœ ํ‰๊ฐ€ ํ›„ ์ƒ๊ด€๊ณ„์ˆ˜๋ฅผ ๋ถ„์„ํ•˜์˜€์œผ๋‚˜ (Spearman), ์ƒ๊ด€๊ณ„์ˆ˜๋Š” 0.3647๋กœ ๋†’์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. 
์‹ฑ๊ธ€ํ„ด ์งˆ๋ฌธ์˜ ๋Œ€๋‹ต๋งŒ ํ‰๊ฐ€ํ–ˆ์œผ๋ฉฐ, reference๊ฐ€ ์—†๋Š” ์งˆ๋ฌธ์€ GPT-4์˜ ๋Œ€๋‹ต์„ 5์  reference๋กœ ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. 

์นดํ…Œ๊ณ ๋ฆฌ๋ณ„ ์ƒ๊ด€๊ณ„์ˆ˜

- ๊ธ€์“ฐ๊ธฐ: 0.436584
- ์ˆ˜ํ•™: 0.551298
- ์ถ”๋ก : 0.395449
- ๋ฌธ๋ฒ•: 0.262858
- ์ดํ•ด: 0.436034
- ์ฝ”๋”ฉ: 0.290976

๋ฌธ๋ฒ•๊ณผ ์ฝ”๋”ฉ ๋ถ€๋ถ„์ด ๋น„๊ต์  ๋‚ฎ์€ ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

### ์‚ฌ์šฉ ์˜ˆ์ œ

```python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("MLP-KTLim/llama-3-Korean-Bllossom-8B", device_map="cuda", torch_dtype="auto").eval()
tokenizer = AutoTokenizer.from_pretrained("MLP-KTLim/llama-3-Korean-Bllossom-8B")
model.load_adapter("heegyu/ko-prometheus-8b-lora-0708")


PROMETHEUS_PROMPT = """###Task Description:
An instruction (might include an Input inside it), a response to evaluate, a reference answer that gets a score of 5, and a score rubric representing a evaluation criteria are given.
1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)"
4. Please do not generate any other opening, closing, and explanations.

###The instruction to evaluate:
{instruction}

###Response to evaluate:
{response}

###Reference Answer (Score 5):
{reference}

###Score Rubrics:
{rubrics}

###Feedback:"""

RUBRICS = {
    "์ถ”๋ก (Reasoning)":"""[์–ธ์–ด ๋ชจ๋ธ์˜ ๋‹ต๋ณ€์ด ๋…ผ๋ฆฌ์ ์ด๊ณ , ์ผ๊ด€์„ฑ ์žˆ์œผ๋ฉฐ, ๊นŠ์ด ์žˆ๋Š” ๋ถ„์„์„ ์ œ๊ณตํ•˜๋Š”๊ฐ€?]
Score 1: ๋‹ต๋ณ€์ด ๋น„๋…ผ๋ฆฌ์ ์ด๊ณ  ์ผ๊ด€์„ฑ์ด ์—†์œผ๋ฉฐ, ํ‘œ๋ฉด์ ์ธ ๋ถ„์„์— ๊ทธ์นœ๋‹ค.
Score 2: ๋‹ต๋ณ€์— ์ผ๋ถ€ ๋…ผ๋ฆฌ์ ์ธ ์š”์†Œ๊ฐ€ ์žˆ์ง€๋งŒ, ์ผ๊ด€์„ฑ์ด ๋ถ€์กฑํ•˜๊ณ  ๋ถ„์„์ด ์–•๋‹ค.
Score 3: ๋‹ต๋ณ€์ด ๋Œ€์ฒด๋กœ ๋…ผ๋ฆฌ์ ์ด๊ณ  ์ผ๊ด€์„ฑ์ด ์žˆ์œผ๋‚˜, ์ผ๋ถ€ ๋…ผ๋ฆฌ์  ๋น„์•ฝ์ด ์žˆ๊ณ  ๋ถ„์„์˜ ๊นŠ์ด๊ฐ€ ๋ณดํ†ต ์ˆ˜์ค€์ด๋‹ค.
Score 4: ๋‹ต๋ณ€์ด ๋…ผ๋ฆฌ์ ์ด๊ณ  ์ผ๊ด€์„ฑ์ด ์žˆ์œผ๋ฉฐ, ๋Œ€์ฒด๋กœ ๊นŠ์ด ์žˆ๋Š” ๋ถ„์„์„ ์ œ๊ณตํ•œ๋‹ค. ์‚ฌ์†Œํ•œ ๋…ผ๋ฆฌ์  ๊ฒฐํ•จ์ด ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค.
Score 5: ๋‹ต๋ณ€์ด ์™„๋ฒฝํ•˜๊ฒŒ ๋…ผ๋ฆฌ์ ์ด๊ณ  ์ผ๊ด€์„ฑ์ด ์žˆ์œผ๋ฉฐ, ๋งค์šฐ ๊นŠ์ด ์žˆ๊ณ  ํ†ต์ฐฐ๋ ฅ ์žˆ๋Š” ๋ถ„์„์„ ์ œ๊ณตํ•œ๋‹ค.""",
    "์ˆ˜ํ•™(Math)": """[์–ธ์–ด ๋ชจ๋ธ์˜ ๋‹ต๋ณ€์ด ์ˆ˜ํ•™์ ์œผ๋กœ ์ •ํ™•ํ•˜๊ณ , ํ’€์ด ๊ณผ์ •์ด ๋ช…ํ™•ํ•˜๋ฉฐ, ํšจ์œจ์ ์ธ ํ•ด๋ฒ•์„ ์ œ์‹œํ•˜๋Š”๊ฐ€?]
Score 1: ๋‹ต๋ณ€์ด ์ˆ˜ํ•™์ ์œผ๋กœ ์™„์ „ํžˆ ๋ถ€์ •ํ™•ํ•˜๊ณ , ํ’€์ด ๊ณผ์ •์ด ์—†๊ฑฐ๋‚˜ ์ดํ•ดํ•  ์ˆ˜ ์—†์œผ๋ฉฐ, ๋น„ํšจ์œจ์ ์ธ ์ ‘๊ทผ๋ฒ•์„ ์‚ฌ์šฉํ•œ๋‹ค.
Score 2: ๋‹ต๋ณ€์— ์ผ๋ถ€ ์ •ํ™•ํ•œ ์ˆ˜ํ•™์  ์š”์†Œ๊ฐ€ ์žˆ์ง€๋งŒ ์ค‘์š”ํ•œ ์˜ค๋ฅ˜๊ฐ€ ์žˆ๊ณ , ํ’€์ด ๊ณผ์ •์ด ๋ถˆ์™„์ „ํ•˜๋ฉฐ, ๋น„ํšจ์œจ์ ์ธ ํ•ด๋ฒ•์„ ์ œ์‹œํ•œ๋‹ค.
Score 3: ๋‹ต๋ณ€์ด ๋Œ€์ฒด๋กœ ์ˆ˜ํ•™์ ์œผ๋กœ ์ •ํ™•ํ•˜์ง€๋งŒ ์ผ๋ถ€ ์˜ค๋ฅ˜๊ฐ€ ์žˆ๊ณ , ํ’€์ด ๊ณผ์ •์ด ์–ด๋Š ์ •๋„ ๋ช…ํ™•ํ•˜๋ฉฐ, ๊ธฐ๋ณธ์ ์ธ ํšจ์œจ์„ฑ์„ ๊ฐ–์ถ˜ ํ•ด๋ฒ•์„ ์ œ์‹œํ•œ๋‹ค.
Score 4: ๋‹ต๋ณ€์ด ์ˆ˜ํ•™์ ์œผ๋กœ ์ •ํ™•ํ•˜๊ณ , ํ’€์ด ๊ณผ์ •์ด ๋ช…ํ™•ํ•˜๋ฉฐ, ํšจ์œจ์ ์ธ ํ•ด๋ฒ•์„ ์ œ์‹œํ•œ๋‹ค. ์‚ฌ์†Œํ•œ ๊ฐœ์„ ์˜ ์—ฌ์ง€๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค.
Score 5: ๋‹ต๋ณ€์ด ์ˆ˜ํ•™์ ์œผ๋กœ ์™„๋ฒฝํ•˜๊ฒŒ ์ •ํ™•ํ•˜๊ณ , ํ’€์ด ๊ณผ์ •์ด ๋งค์šฐ ๋ช…ํ™•ํ•˜๋ฉฐ, ๊ฐ€์žฅ ํšจ์œจ์ ์ด๊ณ  ์ฐฝ์˜์ ์ธ ํ•ด๋ฒ•์„ ์ œ์‹œํ•œ๋‹ค.""",
    "๊ธ€์“ฐ๊ธฐ(Writing)": """[์–ธ์–ด ๋ชจ๋ธ์˜ ๋‹ต๋ณ€์ด ๊ตฌ์กฐ์ ์ด๊ณ , ๋ฌธ์ฒด๊ฐ€ ์ ์ ˆํ•˜๋ฉฐ, ๋‚ด์šฉ์ด ํ’๋ถ€ํ•˜๊ณ  ์ฐฝ์˜์ ์ธ๊ฐ€?]
Score 1: ๋‹ต๋ณ€์˜ ๊ตฌ์กฐ๊ฐ€ ์—†๊ณ , ๋ฌธ์ฒด๊ฐ€ ๋ถ€์ ์ ˆํ•˜๋ฉฐ, ๋‚ด์šฉ์ด ๋นˆ์•ฝํ•˜๊ณ  ์ฐฝ์˜์„ฑ์ด ์ „ํ˜€ ์—†๋‹ค.
Score 2: ๋‹ต๋ณ€์— ๊ธฐ๋ณธ์ ์ธ ๊ตฌ์กฐ๊ฐ€ ์žˆ์ง€๋งŒ ๋ถˆ์™„์ „ํ•˜๊ณ , ๋ฌธ์ฒด๊ฐ€ ์ผ๊ด€์„ฑ์ด ์—†์œผ๋ฉฐ, ๋‚ด์šฉ์ด ์ œํ•œ์ ์ด๊ณ  ์ฐฝ์˜์„ฑ์ด ๋ถ€์กฑํ•˜๋‹ค.
Score 3: ๋‹ต๋ณ€์ด ์–ด๋Š ์ •๋„ ๊ตฌ์กฐ์ ์ด๊ณ , ๋ฌธ์ฒด๊ฐ€ ๋ณดํ†ต ์ˆ˜์ค€์ด๋ฉฐ, ๋‚ด์šฉ์ด ์ ๋‹นํ•˜๊ณ  ์•ฝ๊ฐ„์˜ ์ฐฝ์˜์„ฑ์ด ์žˆ๋‹ค.
Score 4: ๋‹ต๋ณ€์ด ์ž˜ ๊ตฌ์กฐํ™”๋˜์–ด ์žˆ๊ณ , ๋ฌธ์ฒด๊ฐ€ ์ ์ ˆํ•˜๋ฉฐ, ๋‚ด์šฉ์ด ํ’๋ถ€ํ•˜๊ณ  ์ฐฝ์˜์ ์ธ ์š”์†Œ๊ฐ€ ์žˆ๋‹ค.
Score 5: ๋‹ต๋ณ€์ด ์™„๋ฒฝํ•˜๊ฒŒ ๊ตฌ์กฐํ™”๋˜์–ด ์žˆ๊ณ , ๋ฌธ์ฒด๊ฐ€ ํƒ์›”ํ•˜๋ฉฐ, ๋‚ด์šฉ์ด ๋งค์šฐ ํ’๋ถ€ํ•˜๊ณ  ๋†’์€ ์ˆ˜์ค€์˜ ์ฐฝ์˜์„ฑ์„ ๋ณด์ธ๋‹ค.""",
    "์ฝ”๋”ฉ(Coding)": """[์–ธ์–ด ๋ชจ๋ธ์˜ ๋‹ต๋ณ€์ด ์ •ํ™•ํ•˜๊ณ , ํšจ์œจ์ ์ด๋ฉฐ, ๊ฐ€๋…์„ฑ ์žˆ๋Š” ์ฝ”๋“œ๋ฅผ ์ œ๊ณตํ•˜๋Š”๊ฐ€?]
Score 1: ์ฝ”๋“œ๊ฐ€ ์ „ํ˜€ ์ž‘๋™ํ•˜์ง€ ์•Š๊ณ , ๋น„ํšจ์œจ์ ์ด๋ฉฐ, ๊ฐ€๋…์„ฑ์ด ๋งค์šฐ ๋‚ฎ๋‹ค.
Score 2: ์ฝ”๋“œ๊ฐ€ ๋ถ€๋ถ„์ ์œผ๋กœ ์ž‘๋™ํ•˜์ง€๋งŒ ์ฃผ์š” ์˜ค๋ฅ˜๊ฐ€ ์žˆ๊ณ , ํšจ์œจ์„ฑ์ด ๋‚ฎ์œผ๋ฉฐ, ๊ฐ€๋…์„ฑ์ด ๋ถ€์กฑํ•˜๋‹ค.
Score 3: ์ฝ”๋“œ๊ฐ€ ๋Œ€์ฒด๋กœ ์ž‘๋™ํ•˜๊ณ  ๊ธฐ๋ณธ์ ์ธ ํšจ์œจ์„ฑ์„ ๊ฐ–์ถ”์—ˆ์œผ๋‚˜, ์ผ๋ถ€ ๋ฒ„๊ทธ๊ฐ€ ์žˆ๊ณ  ๊ฐ€๋…์„ฑ์ด ๋ณดํ†ต ์ˆ˜์ค€์ด๋‹ค.
Score 4: ์ฝ”๋“œ๊ฐ€ ์ •ํ™•ํ•˜๊ฒŒ ์ž‘๋™ํ•˜๊ณ  ํšจ์œจ์ ์ด๋ฉฐ, ๊ฐ€๋…์„ฑ์ด ์ข‹๋‹ค. ์‚ฌ์†Œํ•œ ๊ฐœ์„ ์˜ ์—ฌ์ง€๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ๋‹ค.
Score 5: ์ฝ”๋“œ๊ฐ€ ์™„๋ฒฝํ•˜๊ฒŒ ์ž‘๋™ํ•˜๊ณ  ๋งค์šฐ ํšจ์œจ์ ์ด๋ฉฐ, ๋›ฐ์–ด๋‚œ ๊ฐ€๋…์„ฑ๊ณผ ์ตœ์ ํ™”๋œ ๊ตฌ์กฐ๋ฅผ ๊ฐ–์ถ”๊ณ  ์žˆ๋‹ค.""",
    "์ดํ•ด(Understanding)": """[์–ธ์–ด ๋ชจ๋ธ์ด ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ์˜ ์˜๋ฏธ, ๋‰˜์•™์Šค, ๋ฌธ๋งฅ์„ ์ •ํ™•ํ•˜๊ฒŒ ์ดํ•ดํ•˜๊ณ  ์ ์ ˆํ•˜๊ฒŒ ์‘๋‹ตํ•˜๋Š”๊ฐ€?]
Score 1: ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ์˜ ์˜๋ฏธ๋ฅผ ์ „ํ˜€ ์ดํ•ดํ•˜์ง€ ๋ชปํ•˜๊ณ , ๋ฌธ๋งฅ๊ณผ ๋‰˜์•™์Šค๋ฅผ ์™„์ „ํžˆ ๋†“์น˜๋ฉฐ, ๋ถ€์ ์ ˆํ•œ ์‘๋‹ต์„ ํ•œ๋‹ค.
Score 2: ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ์˜ ๊ธฐ๋ณธ์ ์ธ ์˜๋ฏธ๋งŒ ๋ถ€๋ถ„์ ์œผ๋กœ ์ดํ•ดํ•˜๊ณ , ๋Œ€๋ถ€๋ถ„์˜ ๋ฌธ๋งฅ๊ณผ ๋‰˜์•™์Šค๋ฅผ ๋†“์น˜๋ฉฐ, ๋ถ€์ ์ ˆํ•œ ์‘๋‹ต์ด ๋งŽ๋‹ค.
Score 3: ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ์˜ ์ฃผ์š” ์˜๋ฏธ๋ฅผ ์ดํ•ดํ•˜์ง€๋งŒ ์ผ๋ถ€ ๋‰˜์•™์Šค๋ฅผ ๋†“์น˜๊ณ , ๋ฌธ๋งฅ์„ ๋ถ€๋ถ„์ ์œผ๋กœ ํŒŒ์•…ํ•˜๋ฉฐ, ๋Œ€์ฒด๋กœ ์ ์ ˆํ•œ ์‘๋‹ต์„ ํ•œ๋‹ค.
Score 4: ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ์˜ ์˜๋ฏธ๋ฅผ ์ •ํ™•ํžˆ ์ดํ•ดํ•˜๊ณ , ๋Œ€๋ถ€๋ถ„์˜ ๋‰˜์•™์Šค์™€ ๋ฌธ๋งฅ์„ ํŒŒ์•…ํ•˜๋ฉฐ, ์ ์ ˆํ•œ ์‘๋‹ต์„ ํ•œ๋‹ค.
Score 5: ํ•œ๊ตญ์–ด ํ…์ŠคํŠธ์˜ ์˜๋ฏธ, ๋‰˜์•™์Šค, ๋ฌธ๋งฅ์„ ์™„๋ฒฝํ•˜๊ฒŒ ์ดํ•ดํ•˜๊ณ , ๋งค์šฐ ์ ์ ˆํ•˜๊ณ  ์„ธ๋ จ๋œ ์‘๋‹ต์„ ํ•œ๋‹ค.""",
    "๋ฌธ๋ฒ•(Grammar)":"""[์–ธ์–ด ๋ชจ๋ธ์˜ ๋‹ต๋ณ€์ด ํ•œ๊ตญ์–ด ๋ฌธ๋ฒ• ๊ทœ์น™์„ ์ •ํ™•ํžˆ ๋”ฐ๋ฅด๊ณ , ์ ์ ˆํ•œ ์–ดํœ˜์™€ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€?]
Score 1: ์‹ฌ๊ฐํ•œ ๋ฌธ๋ฒ• ์˜ค๋ฅ˜๊ฐ€ ๋งŽ๊ณ , ๋ถ€์ ์ ˆํ•œ ์–ดํœ˜์™€ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์˜๋ฏธ ์ „๋‹ฌ์ด ๊ฑฐ์˜ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค.
Score 2: ์ค‘์š”ํ•œ ๋ฌธ๋ฒ• ์˜ค๋ฅ˜๊ฐ€ ์žˆ๊ณ , ์ œํ•œ๋œ ์–ดํœ˜์™€ ๋ถ€์ ์ ˆํ•œ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์˜๋ฏธ ์ „๋‹ฌ์— ์–ด๋ ค์›€์ด ์žˆ๋‹ค.
Score 3: ์ผ๋ถ€ ๋ฌธ๋ฒ• ์˜ค๋ฅ˜๊ฐ€ ์žˆ์ง€๋งŒ ์ „๋ฐ˜์ ์œผ๋กœ ์ดํ•ด ๊ฐ€๋Šฅํ•˜๋ฉฐ, ๊ธฐ๋ณธ์ ์ธ ์–ดํœ˜์™€ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•œ๋‹ค.
Score 4: ์‚ฌ์†Œํ•œ ๋ฌธ๋ฒ• ์˜ค๋ฅ˜๋งŒ ์žˆ๊ณ , ์ ์ ˆํ•œ ์–ดํœ˜์™€ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์˜๋ฏธ๋ฅผ ๋ช…ํ™•ํžˆ ์ „๋‹ฌํ•œ๋‹ค.
Score 5: ์™„๋ฒฝํ•œ ๋ฌธ๋ฒ•์„ ๊ตฌ์‚ฌํ•˜๊ณ , ๋‹ค์–‘ํ•˜๊ณ  ์ •ํ™•ํ•œ ์–ดํœ˜์™€ ์„ธ๋ จ๋œ ํ‘œํ˜„์„ ์‚ฌ์šฉํ•˜์—ฌ ์˜๋ฏธ๋ฅผ ํƒ์›”ํ•˜๊ฒŒ ์ „๋‹ฌํ•œ๋‹ค.""",
}

def judge(instruction, response, reference, rubrics):
    prompt = PROMETHEUS_PROMPT.format(
        instruction=instruction,
        response=response,
        reference=reference,
        rubrics=rubrics
    )
    input_ids = tokenizer.apply_chat_template(
        [{"role": "user", "content": prompt}],
        return_tensors="pt",
        add_generation_prompt=True
    ).to(model.device)
    judgement = model.generate(
        input_ids, 
        max_new_tokens=256,
        early_stopping=True, 
        eos_token_id=tokenizer.eos_token_id,
        )
    judgement = tokenizer.decode(judgement[0, input_ids.shape[-1]:], skip_special_tokens=True)
    score = int(judgement.split("[RESULT]")[1])
    return judgement, score

print(judge(
    "f(x) = 3x^3 + 2x^2 + 58์„ ๋ฏธ๋ถ„ํ•˜์‹œ์˜ค.",
    "ํ•จ์ˆ˜ f(x) = 3x^3 + 2x^2 + 58๋ฅผ ๋ฏธ๋ถ„ํ•˜๋ฉด,\n\nf'(x) = d(3x^3)/dx + d(2x^2)/dx + d(58)/dx\n\n= 3d(x^3)/dx + 2d(x^2)/dx + 0 (์ƒ์ˆ˜ํ•ญ์€ ๋ฏธ๋ถ„ํ•˜๋ฉด 0)\n\n= 3(3x^2) + 2(2x)\n\n= 9x^2 + 4x\n\n๋”ฐ๋ผ์„œ, ํ•จ์ˆ˜ f(x) = 3x^3 + 2x^2 + 58์˜ ๋ฏธ๋ถ„๊ฐ’์€ f'(x) = 9x^2 + 4x์ž…๋‹ˆ๋‹ค.",
    "9x^2 + 4x",
    RUBRICS["์ˆ˜ํ•™(Math)"]
))

```

๊ฒฐ๊ณผ: ์ด ๋‹ต๋ณ€์€ ํ•จ์ˆ˜ f(x) = 3x^3 + 2x^2 + 58๋ฅผ ๋ฏธ๋ถ„ํ•˜๋Š” ๊ณผ์ •์„ ์ •ํ™•ํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ํ•ญ์˜ ๋ฏธ๋ถ„์„ ๋ช…ํ™•ํ•˜๊ฒŒ ์„ค๋ช…ํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ์ƒ์ˆ˜ํ•ญ์— ๋Œ€ํ•œ ๋ฏธ๋ถ„์˜ ๊ฒฐ๊ณผ๋ฅผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋‚˜ํƒ€๋ƒˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋ฏธ๋ถ„ ๊ณผ์ •์„ ์„ค๋ช…ํ•˜๋Š” ๊ณผ์ •์—์„œ ์ข€ ๋” ์„ธ๋ถ€์ ์ธ ์„ค๋ช…์„ ์ œ๊ณตํ•  ์ˆ˜ ์žˆ์—ˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ๊ฐ ํ•ญ์— ๋Œ€ํ•œ ๋ฏธ๋ถ„์„ ์–ด๋–ป๊ฒŒ ์ˆ˜ํ–‰ํ•˜๋Š”์ง€์— ๋Œ€ํ•œ ์„ค๋ช…์ด ๋” ๋ช…ํ™•ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์‚ฌ์†Œํ•œ ๊ฐœ์„ ์˜ ์—ฌ์ง€๊ฐ€ ์žˆ๊ธด ํ•˜์ง€๋งŒ, ์ „๋ฐ˜์ ์œผ๋กœ ์ˆ˜ํ•™์ ์œผ๋กœ ์ •ํ™•ํ•˜๊ณ  ํšจ์œจ์ ์ธ ํ•ด๋ฒ•์„ ์ œ์‹œํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— 4์ ์ด ์ ์ ˆํ•ฉ๋‹ˆ๋‹ค. [RESULT] 4', 4